@@ -502,6 +502,10 @@ pub struct OplogConfig {
502502 /// (`oplog_writes_per_second`). Defaults to false (disabled).
503503 #[ serde( default ) ]
504504 pub oplog_rate_limit_enabled : bool ,
505+ /// Retry configuration for transient indexed-storage errors (pool exhaustion,
506+ /// connection resets). Defaults to 3 attempts, 100 ms–1 s exponential backoff.
507+ #[ serde( default = "default_oplog_indexed_storage_retry" ) ]
508+ pub indexed_storage_retry : RetryConfig ,
505509}
506510
507511impl SafeDisplay for OplogConfig {
@@ -557,10 +561,19 @@ impl SafeDisplay for OplogConfig {
557561 "oplog rate limit enabled: {}" ,
558562 self . oplog_rate_limit_enabled
559563 ) ;
564+ let _ = writeln ! (
565+ & mut result,
566+ "indexed storage retry: {:?}" ,
567+ self . indexed_storage_retry
568+ ) ;
560569 result
561570 }
562571}
563572
573+ fn default_oplog_indexed_storage_retry ( ) -> RetryConfig {
574+ RetryConfig :: max_attempts_3 ( )
575+ }
576+
564577#[ derive( Clone , Debug , Serialize , Deserialize ) ]
565578#[ serde( tag = "type" , content = "config" ) ]
566579pub enum KeyValueStorageConfig {
@@ -812,6 +825,8 @@ pub struct IndexedStoragePostgresConfig {
812825 pub postgres : DbPostgresConfig ,
813826 #[ serde( default = "default_indexed_storage_postgres_drop_prefix_delete_batch_size" ) ]
814827 pub drop_prefix_delete_batch_size : u64 ,
828+ #[ serde( default ) ]
829+ pub max_concurrent_ops : Option < u32 > ,
815830}
816831
817832impl SafeDisplay for IndexedStoragePostgresConfig {
@@ -823,6 +838,11 @@ impl SafeDisplay for IndexedStoragePostgresConfig {
823838 "drop prefix delete batch size: {}" ,
824839 self . drop_prefix_delete_batch_size
825840 ) ;
841+ let _ = writeln ! (
842+ & mut result,
843+ "max concurrent ops: {:?}" ,
844+ self . max_concurrent_ops
845+ ) ;
826846 result
827847 }
828848}
@@ -1330,6 +1350,7 @@ impl Default for OplogConfig {
13301350 plugin_max_commit_count : 3 ,
13311351 plugin_max_elapsed_time : Duration :: from_secs ( 5 ) ,
13321352 oplog_rate_limit_enabled : false ,
1353+ indexed_storage_retry : default_oplog_indexed_storage_retry ( ) ,
13331354 }
13341355 }
13351356}
0 commit comments