-
Hi, I do that : curl -u$credentials -s -H "Content-type: application/json" -XPOST But the job failed with this error:
I tries to compact the db, but no change |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Thanks for reaching out. A few question to help debug it:
It would be idea if we could have a script or a few steps to reproduce the issue. |
Beta Was this translation helpful? Give feedback.
-
We are using the 3.0.0, on a 3 nodes cluster, but i'have tested on the lastest docker image, and i get the same result I'have tested to play with shards for recreating all shards and in this case it's ok (remove shards from node 0 and 2 then re-add them, remove shards form node 1 and recreate them), but it is not an option for us on our production envirronment due to the time taken for shards recreation Db info :
it is possible that the database come from a migration of a 2.x version, I do not have the history there's some warning and errors in logs (logs come from another db with the same problems :
Another point _local_docs give me this :
I can't delete the first item couchdb tell me that the document is missing Steps to reproduce are very simple : |
Beta Was this translation helpful? Give feedback.
-
Thank you for the detailed information. I think this is a bug in how purge sequences are iterated over during shard splitting. It would happen in a database where purges were used extensively, as it seems to be this case, where the number of purges is higher than the max purge limit (1000) per shard. In that case, iterating over the purge sequence cannot happen from 0 and instead the minimal purge sequence has to be used, or it would crash. |
Beta Was this translation helpful? Give feedback.
-
I'll create an issue from this discussion. In the meantime I think, you should be able to replicate to a new database (timezones3) with a higher Q value. Alternatively, replicate to one with the same Q/N values, then perform shard splitting (as purge sequences will be reset to 0, but once replication happens, might as well perform the shard expansion at that point). If you don't mind building couchdb from scratch, could try to apply the patch where instead of 0 in here we pass in the oldest known sequence which can be obtained as: StartSeq = couch_db_engine:get_oldest_purge_seq(Db) - 1, https://github.com/apache/couchdb/blob/3.x/src/couch/src/couch_db_split.erl#L304 |
Beta Was this translation helpful? Give feedback.
-
Issued a PR with the fix #3739 |
Beta Was this translation helpful? Give feedback.
Issued a PR with the fix #3739