1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-27 21:01:50 +03:00

feat(FDB): [FDB BlobHandler] Add writeOrUpdateBlob, update read and remove. (#3373)

This patch:
1) Adds a `writeOrUpdateBlob` function.
2) Updates `read` and `remove` to take in account the size of the
`keys` and `values` for one FDB transaction.
This commit is contained in:
Denis Khalikov
2025-03-14 14:39:06 +03:00
committed by GitHub
parent 001367e68a
commit 6a6db672db
4 changed files with 196 additions and 79 deletions

View File

@ -54,7 +54,7 @@ static void testBlobHandler(std::shared_ptr<FDBCS::FDBDataBase> db)
std::vector<uint32_t> blobSizes{0, 1, 11, 101, 1001, 10001, 100001, 1000001, 10000001, 100000001};
std::vector<uint32_t> blockSizes{10000, 100000};
#else
std::vector<uint32_t> blobSizes{0, 1, 10001, 100001, 10000001, 100000001};
std::vector<uint32_t> blobSizes{0, 1, 100001, 10000001, 100000001};
std::vector<uint32_t> blockSizes{100000};
#endif
@ -87,6 +87,10 @@ static void testBlobHandler(std::shared_ptr<FDBCS::FDBDataBase> db)
std::cout << "Read blob time: " << ms_int.count() << std::endl;
t1 = high_resolution_clock::now();
#endif
auto blobB = generateBlob(blobSize + 1);
assert_internal(handler.writeOrUpdateBlob(db, rootKey, blobB), "Remove blob error");
p = handler.readBlob(db, rootKey);
assert_internal(p.second == blobB, "Blobs not equal");
assert_internal(handler.removeBlob(db, rootKey), "Remove blob error");
#ifdef TEST_PERF
t2 = high_resolution_clock::now();