/home/tyleryin/worker/xstore/deps/rlib/rpc_handler.hpp:15:30: error: ‘function’ in namespace ‘std’ does not name a template type
15 | using req_handler_f = std::function<Buf_t(const Buf_t& req)>;
| ^~~~~~~~
/home/tyleryin/worker/xstore/deps/rlib/rpc_handler.hpp:1:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
+++ |+#include <functional>
1 | #pragma once
In file included from /home/tyleryin/worker/xstore/src/stores/mod.hpp:3,
from /home/tyleryin/worker/xstore/server/controler/../internal/table.hpp:6,
from /home/tyleryin/worker/xstore/server/controler/../internal/tables.hpp:3,
from /home/tyleryin/worker/xstore/server/controler/handlers.hpp:8,
from /home/tyleryin/worker/xstore/server/startup.hpp:8,
from /home/tyleryin/worker/xstore/server/worker.hpp:14,
from /home/tyleryin/worker/xstore/server/main.cc:6:
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp: In instantiation of ‘VAL* fstore::store::NaiveTree<KEY, VAL, P>::insert(KEY, fstore::Option<std::pair<_FIter, _FIter> >&) [with KEY = long unsigned int; VAL = fstore::OpaqueData<8>; P = fstore::BlockPager; fstore::Option<std::pair<_FIter, _FIter> > = std::experimental::fundamentals_v1::optional<std::pair<long unsigned int, long unsigned int> >]’:
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:185:16: required from ‘std::pair<VAL*, std::experimental::fundamentals_v1::optional<std::pair<_FIter, _FIter> > > fstore::store::NaiveTree<KEY, VAL, P>::safe_get_with_insert_check_split(fstore::u64) [with KEY = long unsigned int; VAL = fstore::OpaqueData<8>; P = fstore::BlockPager; fstore::u64 = long unsigned int]’
/home/tyleryin/worker/xstore/server/controler/handlers.hpp:372:67: required from here
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:220:39: error: cannot bind packed field ‘new_leaf->fstore::store::LeafNode<long unsigned int, fstore::OpaqueData<8>, fstore::BlockPager>::keys[0]’ to ‘long unsigned int&’
220 | root = new Node(new_leaf->keys[0], root, new_leaf);
| ~~~~~~~~~~~~~~^
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp: In instantiation of ‘VAL* fstore::store::NaiveTree<KEY, VAL, P>::insert(KEY, fstore::Option<std::pair<_FIter, _FIter> >&) [with KEY = long unsigned int; VAL = fstore::sources::tpcc::order_value*; P = fstore::MallocPager; fstore::Option<std::pair<_FIter, _FIter> > = std::experimental::fundamentals_v1::optional<std::pair<long unsigned int, long unsigned int> >]’:
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:172:12: required from ‘VAL* fstore::store::NaiveTree<KEY, VAL, P>::get_with_insert(fstore::u64) [with KEY = long unsigned int; VAL = fstore::sources::tpcc::order_value*; P = fstore::MallocPager; fstore::u64 = long unsigned int]’
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:165:14: required from ‘VAL* fstore::store::NaiveTree<KEY, VAL, P>::safe_get_with_insert(fstore::u64) [with KEY = long unsigned int; VAL = fstore::sources::tpcc::order_value*; P = fstore::MallocPager; fstore::u64 = long unsigned int]’
/home/tyleryin/worker/xstore/server/tpcc/./bootstrap.hpp:40:39: required from here
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:220:39: error: cannot bind packed field ‘new_leaf->fstore::store::LeafNode<long unsigned int, fstore::sources::tpcc::order_value*, fstore::MallocPager>::keys[0]’ to ‘long unsigned int&’
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp: In instantiation of ‘VAL* fstore::store::NaiveTree<KEY, VAL, P>::insert(KEY, fstore::Option<std::pair<_FIter, _FIter> >&) [with KEY = long unsigned int; VAL = fstore::sources::tpcc::ol_value*; P = fstore::MallocPager; fstore::Option<std::pair<_FIter, _FIter> > = std::experimental::fundamentals_v1::optional<std::pair<long unsigned int, long unsigned int> >]’:
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:172:12: required from ‘VAL* fstore::store::NaiveTree<KEY, VAL, P>::get_with_insert(fstore::u64) [with KEY = long unsigned int; VAL = fstore::sources::tpcc::ol_value*; P = fstore::MallocPager; fstore::u64 = long unsigned int]’
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:165:14: required from ‘VAL* fstore::store::NaiveTree<KEY, VAL, P>::safe_get_with_insert(fstore::u64) [with KEY = long unsigned int; VAL = fstore::sources::tpcc::ol_value*; P = fstore::MallocPager; fstore::u64 = long unsigned int]’
/home/tyleryin/worker/xstore/server/tpcc/tpcc_handlers.hpp:138:60: required from here
/home/tyleryin/worker/xstore/src/stores/naive_tree.hpp:220:39: error: cannot bind packed field ‘new_leaf->fstore::store::LeafNode<long unsigned int, fstore::sources::tpcc::ol_value*, fstore::MallocPager>::keys[0]’ to ‘long unsigned int&’
In file included from /home/tyleryin/worker/xstore/src/model_config.hpp:4,
from /home/tyleryin/worker/xstore/server/controler/../internal/table.hpp:4,
from /home/tyleryin/worker/xstore/server/controler/../internal/tables.hpp:3,
from /home/tyleryin/worker/xstore/server/controler/handlers.hpp:8,
from /home/tyleryin/worker/xstore/server/startup.hpp:8,
from /home/tyleryin/worker/xstore/server/worker.hpp:14,
from /home/tyleryin/worker/xstore/server/main.cc:6:
我查看了这部分代码,这部分代码的error来自于类型转换的问题,可能可以的解决方案是在/xtore/src/stores/naive_tree.hpp中的第220行进行强制类型转换,修改成root = new Node((long unsigned int&)new_leaf->keys[0], root, new_leaf);
;
不是很清楚这块应该如何正确的修改,因为这部分参数是KEY& k,其中KEY来自于template ;