Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/storage/shard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,13 @@ bool Shard::ProcessReq(KvRequest *req)
auto lbd = [task, req]() -> KvError
{
auto floor_req = static_cast<FloorRequest *>(req);
// Floor's large_value_ is an IoStringBuffer; in pinned mode its
// fragments come from the unrecyclable shard-private GC pool, same
// as the Read IoStringBuffer arm rejected above.
if (!shard->store_->Options().pinned_memory_chunks.empty())
{
return KvError::InvalidArgs;
}
KvError err = task->Floor(req->TableId(),
floor_req->Key(),
floor_req->floor_key_,
Expand Down
22 changes: 22 additions & 0 deletions tests/large_value_e2e.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,28 @@ TEST_CASE("EloqStore pinned write + read round-trips with metadata",
CleanupStore(opts);
}

// Floor has only an IoStringBuffer destination, which draws from the
// unrecyclable shard-private GC pool in pinned mode, so it is rejected.
TEST_CASE("EloqStore rejects Floor in pinned mode", "[large-value-e2e][pinned]")
{
PinnedHarness harness;
auto opts = MakePinnedOpts(harness);
auto *store = InitStore(opts);

eloqstore::TableIdent tbl{"pinned-floor", 0};
const size_t value_size = harness.SegmentSize() * 3;
auto write_buf = harness.AllocateSegmentAligned(value_size);
WritePinned(store, harness, tbl, "k", write_buf, 0xf0u);

eloqstore::FloorRequest r;
r.SetArgs(tbl, "k");
store->ExecSync(&r);
REQUIRE(r.Error() == eloqstore::KvError::InvalidArgs);

store->Stop();
CleanupStore(opts);
}

TEST_CASE("EloqStore mixed metadata / no-metadata large values via overload A",
"[large-value-e2e][pinned]")
{
Expand Down
Loading