From acde49c349b6856f25ab0b00ef50412b844182a0 Mon Sep 17 00:00:00 2001 From: Yan Zhao Date: Thu, 9 Nov 2023 19:05:21 +0800 Subject: [PATCH] Make AutoRecovery enable stickyReadS as default. (#4125) ### Motivation The AutoRecovery would move the data to another alive bookie to ensure the data replicas. So it will read data from the alive bookie at the ensemble, then write the data to the new bookie. When reading data, it will choose the bookie in the ensemble randomly, so it may choose the bookie that may be already shut down, and then print many warm logs. If we make stickyReadSEnabled=true, it will read the data from the alive bookie continually, and won't print any warm log, and the stickyReadS can improve hit rate of the bookie server read cache, speed the read operation. --- conf/bk_server.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/conf/bk_server.conf b/conf/bk_server.conf index 408f8ac4c03..79e10f5851d 100755 --- a/conf/bk_server.conf +++ b/conf/bk_server.conf @@ -617,7 +617,7 @@ ledgerDirectories=/tmp/bk-data gcEntryLogMetadataCacheEnabled=false # Directory to persist Entrylog metadata if gcPersistentEntrylogMetadataMapEnabled is true -# [Default: it creates a sub-directory under a first available base ledger directory with +# [Default: it creates a sub-directory under a first available base ledger directory with # name "entrylogIndexCache"] # gcEntryLogMetadataCachePath= @@ -918,7 +918,7 @@ zkEnableSecurity=false # latency stats rollover interval, in seconds # prometheusStatsLatencyRolloverSeconds=60 -# Expose the default JVM Metrics or not. If you are using the BookKeeper as an embedded service and you want to +# Expose the default JVM Metrics or not. If you are using the BookKeeper as an embedded service and you want to # expose metrics in your application, you might need to disable this to avoid the JVM metrics register duplicated. # exposeDefaultJVMMetrics=true @@ -1054,6 +1054,9 @@ zkEnableSecurity=false # The number of entries that a replication will rereplicate in parallel. # rereplicationEntryBatchSize=10 +# Enable/disable having read operations for a ledger to be sticky to a single bookie. +stickyReadSEnabled=true + # The grace period, in milliseconds, that the replication worker waits before fencing and # replicating a ledger fragment that's still being written to upon bookie failure. # openLedgerRereplicationGracePeriod=30000