Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.1.0, 7.1.1, 7.1.2, 7.1.3
-
Untriaged
-
0
-
Unknown
Description
MagmaKVStore is reaching KVStore "sanitise" code that logs a warning.
2023-03-14T13:29:22.783670+00:00 WARNING (SynchronousEPEngine:default) KVStore::checkAndFixKVStoreCreatedItem: vb:0 correcting invalid datatype <ud>Item[0x10e123350] with key:cid:0xa:k0
|
value:Blob[0x10e12b910] with size:0 age:0 data: <>
|
metadata:ItemMetaData[0x10e123360] with cas:1678800562778472448 revSeqno:3 flags:0 exptime:1678800562
|
bySeqno:4 queuedTime:0 vb:0 op:mutation datatype:1 deleted:true(Explicit)</ud>
|
This was noted in the logs for MB-55919 and assumed to of been solely caused by changes made in 7.2 by https://review.couchbase.org/c/kv_engine/+/186911, i.e. a regression.
In the process of fixing this it was noted that changes from https://review.couchbase.org/c/kv_engine/+/186911 are not the cause, we have unit tests which when https://review.couchbase.org/c/kv_engine/+/186911 is reverted, reach that warning, not a regression!
Investigation shows that MagmaKVStore creates deleted item objects with the original datatype and is commonly logging that warning, e.g. when backfilling.
The fix is to update MagmaKVStore::makeItem to force datatype raw when the value is empty.
Not a CDC bug, but a fix is available if we wish to plug this in 7.2