coderzc commented on code in PR #18801: URL: https://github.com/apache/pulsar/pull/18801#discussion_r1044046819
########## conf/standalone.conf: ########## @@ -29,6 +29,11 @@ metadataStoreUrl= # Configuration file path for metadata store. It's supported by RocksdbMetadataStore and EtcdMetadataStore for now metadataStoreConfigPath= +# Whether we should enable fsync for local metadata store. It's supported by RocksdbMetadataStore for now +# If this flag is true, metadata writes will be slower. +# If this flag is false, and the machine crashes, some recent metadata writes may be lost. +# Note that if it is just the process that crashes (i.e., the machine does not reboot), no writes will be lost even if it is false. +metadataFsyncEnabled=true Review Comment: > Maybe we don't need to expose it to users? We just want to improve the test. Suppose we allow users to configure with false. The machine crash might lead to the metadata being corrupted. @codelipenghui Rocksdb still can sync `wal`/`memtable` file by `wal_bytes_per_sync` and `bytes_per_sync` config, I think when setting `wal_bytes_per_sync=1` metadata no write will be lost even if it is false. https://github.com/facebook/rocksdb/blob/534fb06dd38234a2d6234d17366a7b0ac5272f48/include/rocksdb/options.h#L981-L1004 Whether we should automatically set `wal_bytes_per_sync=1` and set `WriteOptions.sync=false` ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
