Skip to content

Commit

Permalink
Fix: Clear last reads
Browse files Browse the repository at this point in the history
  • Loading branch information
davvard committed Apr 7, 2023
1 parent fff1f49 commit 94200d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flight_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,11 +1155,13 @@ void ukv_sample(ukv_sample_t* c_ptr) {

ukv_sample_t& c = *c_ptr;
return_error_if_m(c.db, c.error, uninitialized_state_k, "DataBase is uninitialized");
rpc_client_t& db = *reinterpret_cast<rpc_client_t*>(c.db);
if (!(c.options & ukv_option_dont_discard_memory_k))
db.readers.clear();

linked_memory_lock_t arena = linked_memory(c.arena, c.options, c.error);
return_if_error_m(c.error);

rpc_client_t& db = *reinterpret_cast<rpc_client_t*>(c.db);
strided_iterator_gt<ukv_collection_t const> collections {c.collections, c.collections_stride};
strided_iterator_gt<ukv_length_t const> limits {c.count_limits, c.count_limits_stride};

Expand Down

0 comments on commit 94200d9

Please sign in to comment.