<commit_before>#include "btree/get_fsm.hpp"

#include "utils.hpp"
#include "btree/delete_expired_fsm.hpp"
#include "btree/internal_node.hpp"
#include "btree/leaf_node.hpp"
#include "buffer_cache/buf_lock.hpp"
#include "buffer_cache/co_functions.hpp"

struct value_done_t : public store_t::get_callback_t::done_callback_t {
    coro_t *self;
    value_done_t() : self(coro_t::self()) { }
    void have_copied_value() { self->notify(); }
};

void co_value(store_t::get_callback_t *cb, const_buffer_group_t *value_buffers, mcflags_t flags, cas_t cas) {
    value_done_t done;
    cb->value(value_buffers, &done, flags, cas);
    coro_t::wait();
}

void co_btree_get(btree_key *_key, btree_key_value_store_t *store, store_t::get_callback_t *cb) {
    union {
        char value_memory[MAX_TOTAL_NODE_CONTENTS_SIZE+sizeof(btree_value)];
        btree_value value;
    };
    value_memory[0] = 0; //Make GCC happy--I don't know how to mark value_memory as unused but OK

    union {
        char key_memory[MAX_KEY_SIZE+sizeof(btree_key)];
        btree_key key;
    };
    key_memory[0] = 0; //Make GCC happy--I don't know how to mark value_memory as unused but OK

    block_pm_duration get_time(&pm_cmd_get);

    keycpy(&key, _key);

    btree_slice_t *slice = store->slice_for_key(&key);
    cache_t *cache = &slice->cache;
    int home_thread = get_thread_id();

    coro_t::move_to_thread(slice->home_thread);
    ticks_t start_time;
    pm_cmd_get_without_threads.begin(&start_time);

    transactor_t transactor(cache, rwi_read);

    //Acquire the superblock
    buf_lock_t buf_lock(transactor, SUPERBLOCK_ID, rwi_read);<commit_msg>Marked unused variables in a saner way in get_fsm.<commit_after>#include "btree/get_fsm.hpp"

#include "utils.hpp"
#include "btree/delete_expired_fsm.hpp"
#include "btree/internal_node.hpp"
#include "btree/leaf_node.hpp"
#include "buffer_cache/buf_lock.hpp"
#include "buffer_cache/co_functions.hpp"

struct value_done_t : public store_t::get_callback_t::done_callback_t {
    coro_t *self;
    value_done_t() : self(coro_t::self()) { }
    void have_copied_value() { self->notify(); }
};

void co_value(store_t::get_callback_t *cb, const_buffer_group_t *value_buffers, mcflags_t flags, cas_t cas) {
    value_done_t done;
    cb->value(value_buffers, &done, flags, cas);
    coro_t::wait();
}

void co_btree_get(btree_key *_key, btree_key_value_store_t *store, store_t::get_callback_t *cb) {
    union {
        char value_memory[MAX_TOTAL_NODE_CONTENTS_SIZE+sizeof(btree_value)];
        btree_value value;
    };
    (void)value_memory;

    union {
        char key_memory[MAX_KEY_SIZE+sizeof(btree_key)];
        btree_key key;
    };
    (void)key_memory;

    block_pm_duration get_time(&pm_cmd_get);

    keycpy(&key, _key);

    btree_slice_t *slice = store->slice_for_key(&key);
    cache_t *cache = &slice->cache;
    int home_thread = get_thread_id();

    coro_t::move_to_thread(slice->home_thread);
    ticks_t start_time;
    pm_cmd_get_without_threads.begin(&start_time);

    transactor_t transactor(cache, rwi_read);

    //Acquire the superblock
    buf_lock_t buf_lock(transactor, SUPERBLOCK_ID, rwi_read);
{'fraction_non_alphanumeric': 0.11800063271116736, 'fraction_numerical': 0.0012654223347042075, 'mean_word_length': 4.566901408450704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4079474', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1183, 'n_words': 209}