shuan1026 opened a new pull request, #11478:
URL: https://github.com/apache/ozone/pull/11478

   ## What changes were proposed in this pull request?
   
   `RocksDatabase#delete(ColumnFamily, byte[])` and `RocksDatabase#deleteRange` 
called the RocksDB
   overloads without `WriteOptions`, so RocksJava used its built-in default 
(`sync=false`) instead of the
   configured `writeOptions`. As a result, 
`hadoop.hdds.db.rocksdb.writeoption.sync=true` was not honored
   for these two operations (see Jira for details).
   
   This PR passes `writeOptions` to both calls, consistent with `put`, 
`delete(ByteBuffer)` and `batchWrite`.
   No behavior change with the default `sync=false`.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16909
   
   ## How was this patch tested?
   
   - Added `TestRDBStore#testDirectWritesHonorSyncWriteOption`, which opens an 
`RDBStore` with `sync=true`
   and checks that the RocksDB `WAL_FILE_SYNCED` ticker increases after `put`, 
`delete` and `deleteRange`.
   The test fails without the fix (on `delete`) and passes with it.
   - ci: https://github.com/shuan1026/ozone/actions/runs/38194288205


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to