Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Cheshire-Cat
-
Triaged
-
1
-
Unknown
-
KV-Engine 2021-Feb
Description
[ RUN ] MagmaKVStoreTest.MagmaGetExpiryTimeAlive
|
18:51:21 ..\kv_engine\engines\ep\tests\module_tests\magma-kvstore_test.cc(467): error: Expected equality of these values:
|
18:51:21 10
|
18:51:21 kvstore->getExpiryOrPurgeTime(expiredItemSlice)
|
18:51:21 Which is: 259210
|
Issue is probably that MetaData::deleted may be uninitialized at the time of magmakv::isDeleted(slice).
"persistent_metadata_purge_age": {
|
"default": "259200",
|
TEST_F(MagmaKVStoreTest, MagmaGetExpiryTimeAlive) {
|
magmakv::MetaData expiredItem;
|
expiredItem.exptime = 10;
|
magma::Slice expiredItemSlice = {reinterpret_cast<char*>(&expiredItem),
|
sizeof(magmakv::MetaData)};
|
|
EXPECT_EQ(10, kvstore->getExpiryOrPurgeTime(expiredItemSlice));
|
}
|
uint32_t MagmaKVStore::getExpiryOrPurgeTime(const magma::Slice& slice) {
|
auto exptime = magmakv::getExpiryTime(slice);
|
|
if (magmakv::isDeleted(slice)) {
|
exptime += configuration.getMetadataPurgeAge();
|
}
|
|
return exptime;
|
}
|
class MetaData {
|
..
|
uint8_t metaDataVersion;
|
int64_t bySeqno;
|
uint64_t cas;
|
cb::uint48_t revSeqno;
|
uint32_t exptime;
|
uint32_t flags;
|
uint32_t valueSize;
|
uint16_t vbid;
|
uint8_t datatype;
|
uint8_t deleted : 1;
|
uint8_t deleteSource : 1;
|
uint8_t operation : 2;
|
uint8_t durabilityLevel : 2;
|
cb::uint48_t prepareSeqno;
|
Attachments
Issue Links
- is duplicated by
-
MB-44291 Unit test failure in MagmaKVStoreTest.MagmaGetExpiryTimeAlive
-
- Resolved
-