rnewson commented on code in PR #5558:
URL: https://github.com/apache/couchdb/pull/5558#discussion_r2157086826


##########
src/couch_mrview/src/couch_mrview_index.erl:
##########
@@ -210,7 +215,17 @@ finish_update(State) ->
 
 commit(State) ->
     Header = {State#mrst.sig, couch_mrview_util:make_header(State)},
-    couch_file:write_header(State#mrst.fd, Header).
+    ok = couch_file:sync(State#mrst.fd),

Review Comment:
   the "pluggable storage engine" abstraction has only ever applied to primary 
data. And, at this stage, I think we would remove the abstraction rather than 
extend it to indexes, so I don't agree that "The decision to do sync belongs to 
couch application or more specifically to the storage engine".
   
   I'd prefer not to have the file:sync the .mrview files at all but it seems 
the simplest way to be as sure as we realistically can be that the index 
updates are durable (and thus allowing us to permanently drop deleted documents 
that have already been applied to it). 
   
   In nouveau this is achieved differently as index commits there have to be 
infrequent for performance reasons. I just don't see any easy way to do the 
same approach for mrview.
   
   



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

Reply via email to