File tree Expand file tree Collapse file tree 5 files changed +230
-83
lines changed Expand file tree Collapse file tree 5 files changed +230
-83
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ add_dependencies(binlog_pb protobuf)
2121# Collect all source files (excluding binlog.proto which is in binlog_pb)
2222aux_source_directory (./src DIR_SRCS)
2323
24+ # Add batch_manager source files explicitly
25+ set (DIR_SRCS ${DIR_SRCS}
26+ ${CMAKE_CURRENT_SOURCE_DIR} /batch_manager.cc
27+ )
28+
2429# Create static library (WITHOUT binlog protobuf sources, link binlog_pb instead)
2530add_library (praft STATIC ${DIR_SRCS} )
2631
Original file line number Diff line number Diff line change 2121#include " pstd/include/pstd_mutex.h"
2222#include " pstd/include/pstd_status.h"
2323#include " rocksdb/status.h"
24+ #include " batch_manager.h"
2425
2526class PikaServer ;
2627
@@ -237,6 +238,9 @@ class RaftManager {
237238 mutable std::shared_mutex nodes_mutex_;
238239 std::unordered_map<std::string, std::shared_ptr<PikaRaftNode>> raft_nodes_;
239240
241+ // Batch managers for each database (for request batching optimization)
242+ std::unordered_map<std::string, std::unique_ptr<BatchManager>> batch_managers_;
243+
240244 // Storage reference for applying binlog
241245 storage::Storage* storage_ = nullptr ;
242246
You can’t perform that action at this time.
0 commit comments