jiangphcn 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_r322222976
##########
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:
No. What I check is `<sig>. compact.view`.
For `sig1.view`, the result of
`filename:basename(filename:basename(FilePath, ".view"), ".compact")` is sig1.
For `sig2.compact.view`, the result of
`filename:basename(filename:basename(FilePath, ".view"), ".compact")` is sig2.
So all view files and ongoing compact files are considered.
----------------------------------------------------------------
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