You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/07/11 05:01:10 UTC

[GitHub] [couchdb] nickva commented on issue #2941: Database compaction stuck in a loop

nickva commented on issue #2941:
URL: https://github.com/apache/couchdb/issues/2941#issuecomment-656990181


   Thanks for the report @markusd and good analysis, @wohali. It does look like a bug.
   
   If this was a compaction file left over from before the upgrade to 3.1.0, this is what might have happened:
   
   Previously the `emsort:get_state/1` result was just the [root value](https://github.com/apache/couchdb/blob/master/src/couch/src/couch_emsort.erl#L167) `{BB, PrevPos}` then in 3.1.0 it was converted to be [`[{root, Root}, ...]`](https://github.com/apache/couchdb/blob/3.x/src/couch/src/couch_emsort.erl#L181-L185).  There is an upgrade clause, but it checks for an [integer only](https://github.com/apache/couchdb/blob/3.x/src/couch/src/couch_bt_engine_compactor.erl#L631) and I think we'd want to check for the `{_BB, _PrevPos}` pattern instead there.
   
   @davisp, what do you think, is that about right?


----------------------------------------------------------------
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:
users@infra.apache.org