iilyak commented on a change in pull request #2178: do not cleanup ongoing
compact files using fabric:cleanup_index_files/1
URL: https://github.com/apache/couchdb/pull/2178#discussion_r322240730
##########
File path: src/fabric/src/fabric.erl
##########
@@ -525,7 +525,8 @@ inactive_index_files(DbName) ->
if ActiveSigs =:= [] -> FileList; true ->
lists:filter(fun(FilePath) ->
- not maps:is_key(filename:basename(FilePath, ".view"), ActiveSigs)
+ not maps:is_key(filename:basename(
+ filename:basename(FilePath, ".view"), ".compact"), ActiveSigs)
Review comment:
I think it would be easier to understand if we would abstract the nested
filebase operations into a separate function and add comment there which
mention both possible filename formats. The function could be called
`get_view_signature_from_filename` or something shorter.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services