nickva commented on code in PR #5576:
URL: https://github.com/apache/couchdb/pull/5576#discussion_r2162121159
##########
src/couch/src/couch_bt_engine_compactor.erl:
##########
@@ -660,8 +660,7 @@ commit_compaction_data(#st{header = OldHeader} = St0, Fd) ->
db_header = Header,
meta_st = MetaState
},
- ok = couch_file:sync(Fd),
- ok = couch_file:write_header(Fd, CompHeader),
+ ok = couch_file:commit_header(Fd, CompHeader),
Review Comment:
It seems here we're changing the behavior and adding an extra sync after we
write the header. We only commit periodically in the compactor, and can't think
this would be an issue at first sight but thought it's worth pointing it out at
least.
In other words, at least in the compactor it's not necessarily a pure perf
optimization as fsync calls be a bit more expensive, especially with remote
block storage involved.
--
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]