rnewson commented on code in PR #5576:
URL: https://github.com/apache/couchdb/pull/5576#discussion_r2161975000
##########
src/couch/src/couch_file.erl:
##########
@@ -596,7 +604,28 @@ handle_call({write_header, Bin}, _From, #file{fd = Fd, eof
= Pos} = File) ->
{reply, Error, reset_eof(File)}
end;
handle_call(find_header, _From, #file{fd = Fd, eof = Pos} = File) ->
- {reply, find_header(Fd, Pos div ?SIZE_BLOCK), File}.
+ {reply, find_header(Fd, Pos div ?SIZE_BLOCK), File};
+handle_call({commit_header, Bin}, From, #file{fd = Fd} = File) ->
+ case fsync(Fd) of
Review Comment:
a `maybe` expression would be clearer and is available in all versions of
OTP that couchdb supports.
--
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]