Hello. I try to check an ability to compact tombstones in SG. In documentation it’s said that SG performs compact operation for a document in 5 min by default. Here I have simple example of a document with resolved conflict
Raw document
{
"_id": "doc_9",
"_rev": "2-888888",
"_sync": {
"rev": "2-888888",
"new_rev": "3-81728daea5eeab303b5e80e60e7e077d",
"flags": 20,
"sequence": 361,
"recent_sequences": [
358,
359,
360,
361
],
"history": {
"revs": [
"3-81728daea5eeab303b5e80e60e7e077d",
"2-a4f7c72e8a7a2451d2fdfa9c1ae8f369",
"2-888888",
"1-c14c806c9bc627f753fb32c707b86448"
],
"parents": [
1,
3,
3,
-1
],
"deleted": [
0
],
"bodymap": {
"0": "{\"_deleted\":true,\"b\":1}"
},
"channels": [
[
"doc"
],
[
"doc"
],
[
"doc"
],
[
"doc"
]
]
},
"channels": {
"doc": null
},
"time_saved": "2018-03-27T18:17:45.389488646+05:00"
},
"b": 999
}
We can see here are no conflicts. But the problem is “bodymap” still contains body of tombstone despite 5 mins expired. OK, I thought it might be problem with auto compact mechanism so I tried to execute compact manually using SG Admin API but it did not help.
Considering Compaction section of this manual https://blog.couchbase.com/database-sizes-and-conflict-resolution/ I expect SG should forget about tombstone’s bodies (actually bodies of their parents) after compaction. Did I get it wrong?