diff --git a/AnnService/CMakeLists.txt b/AnnService/CMakeLists.txt index cd23345fd..299faf3ed 100644 --- a/AnnService/CMakeLists.txt +++ b/AnnService/CMakeLists.txt @@ -10,6 +10,12 @@ include_directories(${Zstd}/lib) file(GLOB_RECURSE HDR_FILES ${AnnService}/inc/Core/*.h ${AnnService}/inc/Helper/*.h) file(GLOB_RECURSE SRC_FILES ${AnnService}/src/Core/*.cpp ${AnnService}/src/Helper/*.cpp) +# Include Socket sources in core lib for PostingRouter +file(GLOB SOCKET_HDR_FILES ${AnnService}/inc/Socket/*.h) +file(GLOB SOCKET_SRC_FILES ${AnnService}/src/Socket/*.cpp) +list(APPEND HDR_FILES ${SOCKET_HDR_FILES}) +list(APPEND SRC_FILES ${SOCKET_SRC_FILES}) + set(SPDK_LIBRARIES "") if (SPDK) set(Spdk ${PROJECT_SOURCE_DIR}/ThirdParty/spdk/build) @@ -73,7 +79,7 @@ endif() add_library (SPTAGLib SHARED ${SRC_FILES} ${HDR_FILES} ${TiKV_PROTO_SOURCES}) target_link_libraries (SPTAGLib DistanceUtils ${RocksDB_LIBRARIES} ${uring_LIBRARIES} libzstd_shared ${NUMA_LIBRARY} ${TBB_LIBRARIES} ${SPDK_LIBRARIES} ${TiKV_LIBRARIES}) add_library (SPTAGLibStatic STATIC ${SRC_FILES} ${HDR_FILES} ${TiKV_PROTO_SOURCES}) -target_link_libraries (SPTAGLibStatic DistanceUtils ${RocksDB_LIBRARIES} ${uring_LIBRARIES} libzstd_static ${NUMA_LIBRARY_STATIC} ${TBB_LIBRARIES} ${SPDK_LIBRARIES} ${TiKV_LIBRARIES}) +target_link_libraries (SPTAGLibStatic DistanceUtils ${RocksDB_LIBRARIES} ${uring_LIBRARIES} libzstd_static ${NUMA_LIBRARY_STATIC} ${TBB_LIBRARIES} ${SPDK_LIBRARIES} ${TiKV_LIBRARIES} ${Boost_LIBRARIES}) if (MSVC) # SPANNIndex.cpp can exceed COFF section limits in Debug without /bigobj. diff --git a/AnnService/inc/Core/Common/FineGrainedLock.h b/AnnService/inc/Core/Common/FineGrainedLock.h index 06c8f44d1..1f7d1eab4 100644 --- a/AnnService/inc/Core/Common/FineGrainedLock.h +++ b/AnnService/inc/Core/Common/FineGrainedLock.h @@ -60,6 +60,19 @@ namespace SPTAG { return idx; } + + // Bucket index for the internal mutex-sharded unordered_map of + // per-posting locks. Exposed for callers that need an array sized + // to BucketCount and indexed by the same granularity as the lock + // pool (e.g. ExtraDynamicSearcher::m_remoteBucketLocked). + static inline unsigned BucketIndex(SizeType idx) + { + unsigned key = static_cast(idx); + return ((unsigned)(key * 99991) + _rotl(key, 2) + 101) & BucketMask; + } + + static const int BucketMask = 32767; + static const int BucketCount = BucketMask + 1; private: struct Bucket { std::mutex mutex; @@ -76,14 +89,6 @@ namespace SPTAG return *iter->second; } - static inline unsigned BucketIndex(SizeType idx) - { - unsigned key = static_cast(idx); - return ((unsigned)(key * 99991) + _rotl(key, 2) + 101) & BucketMask; - } - - static const int BucketMask = 32767; - static const int BucketCount = BucketMask + 1; mutable std::unique_ptr m_buckets; }; } diff --git a/AnnService/inc/Core/Common/IVersionMap.h b/AnnService/inc/Core/Common/IVersionMap.h index 4c81acbad..e7621ec2e 100644 --- a/AnnService/inc/Core/Common/IVersionMap.h +++ b/AnnService/inc/Core/Common/IVersionMap.h @@ -30,6 +30,30 @@ namespace SPTAG virtual void DeleteAll() = 0; + /// One-time per-layer setup performed at the end of BuildIndex. + /// size total VID count for this layer (== m_opt->m_vectorSize) + /// blockSize/capacity hints for array-backed legacy maps; ignored + /// by hashmap / TiKV implementations + /// globalIDs (optional) set of GLOBAL VIDs that are alive on + /// this layer. Layers whose "default + /// version" semantics treat unknown VIDs as + /// DELETED (e.g. TiKV layer >0, hashmap + /// LocalVersionMap) MUST persist an + /// explicit alive byte for each globalID; + /// otherwise MergePostings' + /// Deleted()/version-mismatch filter + /// eats every base entry on the first + /// async merge and corrupts the head index. + /// Default impl: just bump the internal count via SetR. + virtual void Initialize(SizeType size, SizeType blockSize, SizeType capacity, + COMMON::Dataset* globalIDs = nullptr) + { + (void)blockSize; + (void)capacity; + (void)globalIDs; + SetR(size); + } + virtual SizeType Count() = 0; virtual SizeType GetDeleteCount() = 0; virtual std::uint64_t BufferSize() = 0; @@ -45,6 +69,18 @@ namespace SPTAG virtual bool TryGetDefaultVersionForNewVector(uint8_t& version) const { return false; } virtual void SetR(SizeType num) {} virtual void SetVersion(const SizeType& key, const uint8_t& version) = 0; + + /// Batch SetVersion: apply (vids[i] -> versions[i]) for all i. + /// Default impl is a per-VID loop. TiKV-backed maps override this + /// to group writes by chunk so N records in the same chunk only + /// trigger 1 ReadChunk + 1 WriteChunk RPC pair + virtual void SetVersionBatch(const std::vector& vids, const std::vector& versions) + { + size_t n = std::min(vids.size(), versions.size()); + for (size_t i = 0; i < n; i++) { + SetVersion(vids[i], versions[i]); + } + } /// Increment the version of a VID. /// @param expectedOld If not 0xff, the caller asserts the current version should be this value. /// If TiKV already holds (expectedOld+1)&0x7f, treat as success (another node did the same increment). diff --git a/AnnService/inc/Core/Common/LocalVersionMap.h b/AnnService/inc/Core/Common/LocalVersionMap.h index 5b185183e..c01e1bdcd 100644 --- a/AnnService/inc/Core/Common/LocalVersionMap.h +++ b/AnnService/inc/Core/Common/LocalVersionMap.h @@ -27,6 +27,29 @@ namespace SPTAG m_label.clear(); } + void Initialize(SizeType size, SizeType blockSize, SizeType capacity, + COMMON::Dataset* globalIDs = nullptr) override + { + (void)size; + (void)blockSize; + (void)capacity; + if (globalIDs == nullptr || globalIDs->R() <= 0) return; + + // Hashmap LocalVersionMap treats missing keys as deleted + // (Deleted() returns true, GetVersion() returns 0xfe). + // Layer-1 build calls Initialize with the alive-head global + // IDs; we must explicitly mark them alive (0x00) so that + // MergePostings' Deleted()/version-mismatch filter does not + // strip every base head entry on the first async merge. + std::unique_lock lock(m_updateMutex); + for (SizeType i = 0; i < globalIDs->R(); i++) { + SizeType globalID = *(globalIDs->At(i)); + if (globalID >= 0) { + m_label[globalID] = 0x00; + } + } + } + SizeType Count() override { std::shared_lock lock(m_updateMutex); return (SizeType)(m_label.size()); diff --git a/AnnService/inc/Core/Common/TiKVVersionMap.h b/AnnService/inc/Core/Common/TiKVVersionMap.h index ae1136139..61b131575 100644 --- a/AnnService/inc/Core/Common/TiKVVersionMap.h +++ b/AnnService/inc/Core/Common/TiKVVersionMap.h @@ -6,6 +6,7 @@ #include "IVersionMap.h" #include "inc/Helper/KeyValueIO.h" +#include #include #include #include @@ -212,7 +213,7 @@ namespace SPTAG std::shared_ptr GetDB() const { return m_db; } - void Initialize(SizeType size, SizeType blockSize, SizeType capacity, COMMON::Dataset* globalIDs = nullptr) + void Initialize(SizeType size, SizeType blockSize, SizeType capacity, COMMON::Dataset* globalIDs = nullptr) override { (void)blockSize; (void)capacity; @@ -233,10 +234,44 @@ namespace SPTAG m_deleted = size; SaveMetadata(); + // Batch the alive-marker writes via MultiPut so they + // can be grouped per TiKV region and issued in parallel. + // Serial PutByte was the build-time hotspot (~1-2ms + // per write × ~200K alive heads at 1M-vector scale). + std::vector aliveSorted; + aliveSorted.reserve(aliveIDs.size()); + for (SizeType id : aliveIDs) aliveSorted.push_back(id); + std::sort(aliveSorted.begin(), aliveSorted.end()); + SizeType written = 0; - for (SizeType globalID : aliveIDs) { - if (PutByte(VersionKey(globalID), 0x00) == ErrorCode::Success) { - written++; + constexpr size_t kBatchSize = 4096; + std::vector keys; + std::vector values; + keys.reserve(kBatchSize); + values.reserve(kBatchSize); + const std::string aliveByte(1, static_cast(0x00)); + for (size_t i = 0; i < aliveSorted.size(); i++) { + keys.push_back(VersionKey(aliveSorted[i])); + values.push_back(aliveByte); + if (keys.size() >= kBatchSize || i + 1 == aliveSorted.size()) { + auto ret = m_db->MultiPut(keys, values, MaxTimeout, nullptr); + if (ret == ErrorCode::Success) { + written += static_cast(keys.size()); + } else if (ret == ErrorCode::Undefined) { + // Backend lacks MultiPut: fall back to serial PutByte. + for (const auto& k : keys) { + if (PutByte(k, 0x00) == ErrorCode::Success) written++; + } + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "TiKVVersionMap::Initialize: MultiPut batch failed layer=%d ret=%d size=%zu; falling back to serial PutByte for this batch.\n", + m_layer, static_cast(ret), keys.size()); + for (const auto& k : keys) { + if (PutByte(k, 0x00) == ErrorCode::Success) written++; + } + } + keys.clear(); + values.clear(); } } m_deleted = size - written; @@ -335,6 +370,56 @@ namespace SPTAG UpdateDeleteCount(oldVal, storedVersion); } + // Per-VID batch write: mirrors SetVersion() for each (vid, ver) pair. + // Uses TiKVIO MultiPut so the writes are grouped per TiKV region + // and issued in parallel. m_deleted accounting is approximate + // here (we do not read the old byte to compute the exact delta); + // GetDeleteCount() returns 0 for the TiKV-backed version map so + // this approximation is acceptable. Callers that need precise + // accounting can call SetVersion() per-VID instead. + void SetVersionBatch(const std::vector& vids, const std::vector& versions) override + { + size_t n = std::min(vids.size(), versions.size()); + if (n == 0) return; + + SizeType count = m_count.load(); + std::vector keys; + std::vector values; + keys.reserve(n); + values.reserve(n); + for (size_t i = 0; i < n; ++i) { + if (vids[i] < 0 || vids[i] >= count) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "TiKVVersionMap::SetVersionBatch: invalid key %d (max %d)\n", + vids[i], count); + continue; + } + keys.push_back(VersionKey(vids[i])); + values.push_back(std::string(1, static_cast(versions[i]))); + } + if (keys.empty()) return; + + auto ret = m_db->MultiPut(keys, values, MaxTimeout, nullptr); + if (ret == ErrorCode::Undefined) { + // Backend lacks MultiPut: fall back to serial SetVersion + // which preserves m_deleted accounting. + for (size_t i = 0; i < n; ++i) { + if (vids[i] >= 0 && vids[i] < count) { + SetVersion(vids[i], versions[i]); + } + } + } else if (ret != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "TiKVVersionMap::SetVersionBatch: MultiPut failed layer=%d ret=%d keys=%zu; falling back to per-VID SetVersion.\n", + m_layer, static_cast(ret), keys.size()); + for (size_t i = 0; i < n; ++i) { + if (vids[i] >= 0 && vids[i] < count) { + SetVersion(vids[i], versions[i]); + } + } + } + } + bool IncVersion(const SizeType& key, uint8_t* newVersion, uint8_t expectedOld = 0xff) override { if (key < 0 || key >= m_count.load()) { diff --git a/AnnService/inc/Core/SPANN/Distributed/AsyncJobWatchdog.h b/AnnService/inc/Core/SPANN/Distributed/AsyncJobWatchdog.h new file mode 100644 index 000000000..31bb8627f --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/AsyncJobWatchdog.h @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef _SPTAG_SPANN_DISTRIBUTED_ASYNCJOBWATCHDOG_H_ +#define _SPTAG_SPANN_DISTRIBUTED_ASYNCJOBWATCHDOG_H_ + +#include "inc/Helper/Logging.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SPTAG { +namespace SPANN { +namespace Distributed { + +// AsyncJobWatchdog tracks async (fire-and-forget) inter-node dispatches +// and resends them on timeout or transport failure. +// +// Today the only fire-and-forget path is QueueRemoteAppend auto-flush in +// WorkerNode: it ships a batch of RemoteAppendRequests to a peer with no +// synchronous error propagation. Without a watchdog, transient network +// or peer-crash failures silently lose those appends. +// +// The watchdog is intentionally small: callers register a batch with a +// resend callback; the watchdog reschedules the callback up to +// MaxAttempts with exponential backoff. RemoteAppend is idempotent on +// the receive side (HandleRemoteAppend de-dups via per-posting RMW), so +// at-least-once delivery is safe. +class AsyncJobWatchdog { +public: + using ResendFn = std::function; // returns true on success + + AsyncJobWatchdog(int maxAttempts = 3, + int initialBackoffMs = 200) + : m_maxAttempts(maxAttempts), + m_initialBackoffMs(initialBackoffMs), + m_stop(false) { + m_worker = std::thread([this]() { Loop(); }); + } + + ~AsyncJobWatchdog() { + { + std::lock_guard lk(m_mutex); + m_stop = true; + } + m_cv.notify_all(); + if (m_worker.joinable()) m_worker.join(); + } + + // Submit a fire-and-forget dispatch. The watchdog calls `resend` if + // and only if a prior attempt has failed; the caller is responsible + // for the initial attempt. After success, call MarkSuccess(id). + uint64_t Track(ResendFn resend, std::string tag = "") { + std::lock_guard lk(m_mutex); + uint64_t id = ++m_nextId; + Entry e; + e.resend = std::move(resend); + e.attempts = 0; + e.tag = std::move(tag); + e.nextDeadline = std::chrono::steady_clock::time_point::max(); + m_entries.emplace(id, std::move(e)); + return id; + } + + void MarkSuccess(uint64_t id) { + std::lock_guard lk(m_mutex); + m_entries.erase(id); + } + + // Schedule a resend after backoff for entry `id`. Called by producer + // when its synchronous attempt fails. Gives up after MaxAttempts. + void MarkFailureAndScheduleResend(uint64_t id) { + std::unique_lock lk(m_mutex); + auto it = m_entries.find(id); + if (it == m_entries.end()) return; + if (++it->second.attempts >= m_maxAttempts) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "AsyncJobWatchdog: %s giving up after %d attempts\n", + it->second.tag.c_str(), it->second.attempts); + m_entries.erase(it); + return; + } + int backoffMs = m_initialBackoffMs << (it->second.attempts - 1); + it->second.nextDeadline = + std::chrono::steady_clock::now() + + std::chrono::milliseconds(backoffMs); + lk.unlock(); + m_cv.notify_all(); + } + + size_t OutstandingCount() const { + std::lock_guard lk(m_mutex); + return m_entries.size(); + } + +private: + struct Entry { + ResendFn resend; + int attempts; + std::string tag; + std::chrono::steady_clock::time_point nextDeadline; + }; + + void Loop() { + std::unique_lock lk(m_mutex); + while (!m_stop) { + auto now = std::chrono::steady_clock::now(); + auto nextWake = now + std::chrono::seconds(1); + std::vector due; + for (auto& kv : m_entries) { + if (kv.second.nextDeadline <= now) { + due.push_back(kv.first); + } else if (kv.second.nextDeadline < nextWake) { + nextWake = kv.second.nextDeadline; + } + } + for (uint64_t id : due) { + auto it = m_entries.find(id); + if (it == m_entries.end()) continue; + ResendFn fn = it->second.resend; + std::string tag = it->second.tag; + int attempt = it->second.attempts; + it->second.nextDeadline = + std::chrono::steady_clock::time_point::max(); + lk.unlock(); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "AsyncJobWatchdog: resending %s attempt=%d\n", + tag.c_str(), attempt + 1); + bool ok = false; + try { ok = fn(); } catch (...) { ok = false; } + lk.lock(); + if (ok) { + m_entries.erase(id); + } else { + auto it2 = m_entries.find(id); + if (it2 != m_entries.end()) { + if (++it2->second.attempts >= m_maxAttempts) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "AsyncJobWatchdog: %s giving up after %d attempts\n", + it2->second.tag.c_str(), it2->second.attempts); + m_entries.erase(it2); + } else { + int backoffMs = + m_initialBackoffMs << (it2->second.attempts - 1); + it2->second.nextDeadline = + std::chrono::steady_clock::now() + + std::chrono::milliseconds(backoffMs); + } + } + } + } + m_cv.wait_until(lk, nextWake, [this]() { return m_stop; }); + } + } + + mutable std::mutex m_mutex; + std::condition_variable m_cv; + std::unordered_map m_entries; + uint64_t m_nextId = 0; + int m_maxAttempts; + int m_initialBackoffMs; + bool m_stop; + std::thread m_worker; +}; + +} // namespace Distributed +} // namespace SPANN +} // namespace SPTAG + +#endif // _SPTAG_SPANN_DISTRIBUTED_ASYNCJOBWATCHDOG_H_ diff --git a/AnnService/inc/Core/SPANN/Distributed/BatchAppendWAL.h b/AnnService/inc/Core/SPANN/Distributed/BatchAppendWAL.h new file mode 100644 index 000000000..6d9bd3315 --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/BatchAppendWAL.h @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef _SPTAG_SPANN_DISTRIBUTED_BATCHAPPENDWAL_H_ +#define _SPTAG_SPANN_DISTRIBUTED_BATCHAPPENDWAL_H_ + +#include "inc/Core/Common.h" +#include "inc/Helper/KeyValueIO.h" +#include "inc/Helper/Logging.h" + +#include +#include +#include +#include +#include +#include + +namespace SPTAG { +namespace SPANN { +namespace Distributed { + +// BatchAppendWAL: durable write-ahead log for accepted BatchRemoteAppend +// requests on the receiver side. +// +// Sender → Receiver flow with this WAL enabled: +// 1. Receiver decodes a BatchRemoteAppendRequest. +// 2. Receiver serializes the request blob and Put()s it under +// wal/rappend//. +// 3. Receiver ACKs the sender immediately ("Accepted"). +// 4. Receiver schedules the per-item Append jobs as before. +// 5. After every item in the batch has been processed, the receiver +// Delete()s the WAL key (best-effort). +// +// Recovery: at startup (after SetWorker has wired the searcher's +// append-callback and job submitter) the receiver scans +// `wal/rappend//` and re-submits each pending batch. +// Items are idempotent — the Append callback checks the versionMap and +// skips RMWs that are already at the recorded version, so duplicate +// replays after a crash do not corrupt postings. +// +// Key schema: +// wal/rappend// → raw BatchRemoteAppendRequest bytes +class BatchAppendWAL { +public: + explicit BatchAppendWAL(std::shared_ptr db, int receiverNode) + : m_db(std::move(db)), m_receiverNode(receiverNode) {} + + bool Enabled() const { return static_cast(m_db); } + + bool Put(std::uint64_t batchID, const std::string& blob) { + if (!m_db) return false; + auto ec = m_db->Put(MakeKey(m_receiverNode, batchID), blob, kTimeout, nullptr); + if (ec != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "BatchAppendWAL::Put node=%d batchID=%llu failed (%d)\n", + m_receiverNode, (unsigned long long)batchID, (int)ec); + return false; + } + return true; + } + + bool Delete(std::uint64_t batchID) { + if (!m_db) return false; + std::vector k{ MakeKey(m_receiverNode, batchID) }; + auto ec = m_db->MultiDelete(k, kTimeout); + if (ec != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "BatchAppendWAL::Delete node=%d batchID=%llu failed (%d) — recovery will replay\n", + m_receiverNode, (unsigned long long)batchID, (int)ec); + return false; + } + return true; + } + + // Returns all (batchID, blob) pairs currently durable for this receiver. + ErrorCode Scan(std::vector>& out) { + out.clear(); + if (!m_db) return ErrorCode::Undefined; + std::vector> kvs; + std::string prefix = MakePrefix(m_receiverNode); + auto ec = m_db->ScanPrefix(prefix, kvs, 0); + if (ec == ErrorCode::Undefined) { + // Backend without ScanPrefix support — no recovery, but logged + // so operators see the gap. + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "BatchAppendWAL::Scan: backend has no ScanPrefix; recovery skipped\n"); + return ec; + } + if (ec != ErrorCode::Success) return ec; + for (auto& kv : kvs) { + // kv.first looks like "wal/rappend//" + auto pos = kv.first.find_last_of('/'); + if (pos == std::string::npos) continue; + std::uint64_t batchID = 0; + try { batchID = std::stoull(kv.first.substr(pos + 1)); } + catch (...) { continue; } + out.emplace_back(batchID, std::move(kv.second)); + } + return ErrorCode::Success; + } + + static std::string MakePrefix(int receiverNode) { + return "wal/rappend/" + std::to_string(receiverNode) + "/"; + } + static std::string MakeKey(int receiverNode, std::uint64_t batchID) { + return MakePrefix(receiverNode) + std::to_string(batchID); + } + +private: + static constexpr auto kTimeout = std::chrono::microseconds(5'000'000); + std::shared_ptr m_db; + int m_receiverNode = -1; +}; + +} // namespace Distributed +} // namespace SPANN +} // namespace SPTAG + +#endif // _SPTAG_SPANN_DISTRIBUTED_BATCHAPPENDWAL_H_ diff --git a/AnnService/inc/Core/SPANN/Distributed/ConsistentHashRing.h b/AnnService/inc/Core/SPANN/Distributed/ConsistentHashRing.h new file mode 100644 index 000000000..ec5c7855c --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/ConsistentHashRing.h @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include "inc/Core/Common.h" +#include +#include +#include + +namespace SPTAG::SPANN { + + /// Consistent hash ring for distributing headIDs across compute nodes. + /// Uses virtual nodes (vnodes) for balanced distribution. + /// When nodes are added/removed, only ~1/N of keys are remapped. + class ConsistentHashRing { + public: + explicit ConsistentHashRing(int vnodeCount = 150) + : m_vnodeCount(vnodeCount) {} + + /// Add a physical node to the ring with its virtual nodes. + void AddNode(int nodeIndex) { + for (int i = 0; i < m_vnodeCount; i++) { + uint32_t h = HashVNode(nodeIndex, i); + m_ring[h] = nodeIndex; + } + m_nodes.insert(nodeIndex); + } + + /// Remove a physical node and all its virtual nodes from the ring. + void RemoveNode(int nodeIndex) { + for (int i = 0; i < m_vnodeCount; i++) { + uint32_t h = HashVNode(nodeIndex, i); + m_ring.erase(h); + } + m_nodes.erase(nodeIndex); + } + + /// Find the owner node for a given key (headID). + /// Returns -1 if the ring is empty. + int GetOwner(SizeType headID) const { + if (m_ring.empty()) return -1; + uint32_t h = HashKey(headID); + auto it = m_ring.lower_bound(h); + if (it == m_ring.end()) it = m_ring.begin(); + return it->second; + } + + bool Empty() const { return m_ring.empty(); } + size_t NodeCount() const { return m_nodes.size(); } + bool HasNode(int nodeIndex) const { return m_nodes.count(nodeIndex) > 0; } + const std::set& GetNodes() const { return m_nodes; } + int GetVNodeCount() const { return m_vnodeCount; } + + private: + static uint32_t HashKey(SizeType headID) { + uint32_t hash = 2166136261u; // FNV-1a offset basis + uint32_t val = static_cast(headID); + for (int i = 0; i < 4; i++) { + hash ^= (val >> (i * 8)) & 0xFF; + hash *= 16777619u; // FNV prime + } + return hash; + } + + static uint32_t HashVNode(int nodeIndex, int vnodeIdx) { + // Raw FNV-1a on tiny nodeIndex (1, 2, 3) produces a + // pathologically biased ring (71.9% vs 28.1% for nodes 1/2 with + // 150 vnodes). Pre-mix nodeIndex through Knuth's golden-ratio + // multiplier so small node IDs become full-spectrum uint32 values + // before they hit FNV's accumulator. Validated to give ≈50/50 + // for K=2 and stay within ±15% of even split for K up to 8. + uint32_t saltedVnode = + static_cast(vnodeIdx) ^ + (static_cast(nodeIndex) * 2654435761u); + uint32_t hash = 2166136261u; + auto mix = [&](uint32_t v) { + for (int i = 0; i < 4; i++) { + hash ^= (v >> (i * 8)) & 0xFF; + hash *= 16777619u; + } + }; + mix(saltedVnode); + mix(static_cast(nodeIndex)); + return hash; + } + + int m_vnodeCount; + std::map m_ring; // hash position → nodeIndex + std::set m_nodes; // active physical node indices + }; + +} // namespace SPTAG::SPANN diff --git a/AnnService/inc/Core/SPANN/Distributed/DelayedJobScheduler.h b/AnnService/inc/Core/SPANN/Distributed/DelayedJobScheduler.h new file mode 100644 index 000000000..9661439fd --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/DelayedJobScheduler.h @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef _SPTAG_SPANN_DISTRIBUTED_DELAYEDJOBSCHEDULER_H_ +#define _SPTAG_SPANN_DISTRIBUTED_DELAYEDJOBSCHEDULER_H_ + +#include "inc/Helper/Concurrent.h" +#include "inc/Helper/ThreadPool.h" +#include "inc/Helper/Logging.h" +#include "inc/Core/Common.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace SPTAG { +namespace SPANN { +namespace Distributed { + +// DelayedJobScheduler runs a single worker thread that re-enqueues +// previously-failed ThreadPool jobs after an exponential backoff. It +// exists so async Merge/Split job retries can wait before retrying +// (instead of busy-spinning the pool worker) without blocking any actual +// pool slot during the wait. +// +// Jobs are owned by the scheduler between Schedule() and the moment they +// are transferred to the destination pool. If the scheduler is destroyed +// while jobs are still pending (e.g. process shutdown), the destructor +// drains the heap and deletes every undispatched job so the Helper:: +// ThreadPool::Job allocations do not leak. +// +// The destination pool is held via shared_ptr so the scheduler can survive +// teardown ordering — the pool stays alive as long as either the scheduler +// or the original owner still holds a reference. +class DelayedJobScheduler { +public: + DelayedJobScheduler() : m_stop(false) { + m_worker = std::thread([this] { Loop(); }); + } + + ~DelayedJobScheduler() { + { + std::lock_guard g(m_mu); + m_stop = true; + } + m_cv.notify_all(); + if (m_worker.joinable()) m_worker.join(); + std::lock_guard g(m_mu); + for (auto& e : m_heap) { + if (e.job) delete e.job; + } + m_heap.clear(); + } + + // Take ownership of `job` and add it to `pool` after `delayMs`. + // `pool` must be non-null; `job` must be non-null and not already + // queued anywhere. + void Schedule(std::shared_ptr pool, + Helper::ThreadPool::Job* job, int delayMs) { + if (!pool || !job) { if (job) delete job; return; } + Entry e; + e.deadline = std::chrono::steady_clock::now() + + std::chrono::milliseconds(delayMs); + e.pool = std::move(pool); + e.job = job; + { + std::lock_guard g(m_mu); + m_heap.push_back(std::move(e)); + std::push_heap(m_heap.begin(), m_heap.end(), Cmp{}); + } + m_cv.notify_all(); + } + + std::size_t Pending() const { + std::lock_guard g(m_mu); + return m_heap.size(); + } + +private: + struct Entry { + std::chrono::steady_clock::time_point deadline; + std::shared_ptr pool; + Helper::ThreadPool::Job* job = nullptr; + }; + struct Cmp { + bool operator()(const Entry& a, const Entry& b) const { + return a.deadline > b.deadline; + } + }; + + void Loop() { + std::unique_lock lk(m_mu); + while (!m_stop) { + if (m_heap.empty()) { + m_cv.wait(lk); + continue; + } + auto now = std::chrono::steady_clock::now(); + if (m_heap.front().deadline <= now) { + Entry e = std::move(m_heap.front()); + std::pop_heap(m_heap.begin(), m_heap.end(), Cmp{}); + m_heap.pop_back(); + lk.unlock(); + if (e.pool) { + e.pool->add(e.job); + } else if (e.job) { + delete e.job; + } + lk.lock(); + continue; + } + m_cv.wait_until(lk, m_heap.front().deadline); + } + } + + mutable std::mutex m_mu; + std::condition_variable m_cv; + std::vector m_heap; + bool m_stop; + std::thread m_worker; +}; + +// Classify an async-job failure into transient (retry with backoff) +// vs permanent (drop with warning). Transient codes capture TiKV / IO +// errors that should clear on a later attempt; permanent codes capture +// logical inconsistencies (e.g. a vector ID outside the version map, +// a posting whose serialized header is malformed) that no number of +// retries can repair. +// +// ErrorCode::Fail is intentionally classified transient: every TiKV +// failure path in ExtraTiKVController returns Fail, and the few logical +// callers that also return Fail (e.g. MergePostings when the head vector +// is missing from its own posting) are rare enough that a bounded number +// of wasted retries is acceptable. If a more specific ErrorCode value +// becomes available for the logical case, demote those returns there +// and remove Fail from the transient set. +inline bool IsTransientAsyncJobError(ErrorCode ret) { + switch (ret) { + case ErrorCode::Fail: + case ErrorCode::DiskIOFail: + case ErrorCode::EmptyDiskIO: + case ErrorCode::Socket_FailedConnectToEndPoint: + case ErrorCode::Socket_FailedResolveEndPoint: + return true; + default: + return false; + } +} + +// Exponential backoff with a cap. `attempt` is 0-based (0 = first retry). +inline int AsyncJobRetryBackoffMs(int attempt, + int initialMs = 200, + int capMs = 30000) { + if (attempt < 0) attempt = 0; + if (attempt > 20) attempt = 20; + long long delay = (long long)initialMs << attempt; + if (delay > capMs) delay = capMs; + return (int)delay; +} + +} // namespace Distributed +} // namespace SPANN +} // namespace SPTAG + +#endif // _SPTAG_SPANN_DISTRIBUTED_DELAYEDJOBSCHEDULER_H_ diff --git a/AnnService/inc/Core/SPANN/Distributed/DispatchCoordinator.h b/AnnService/inc/Core/SPANN/Distributed/DispatchCoordinator.h new file mode 100644 index 000000000..ffd02f05c --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/DispatchCoordinator.h @@ -0,0 +1,369 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include "inc/Core/SPANN/Distributed/DistributedProtocol.h" +#include "inc/Socket/Client.h" +#include "inc/Socket/Packet.h" +#include "inc/Socket/SimpleSerialization.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SPTAG::SPANN { + + /// Coordinates driver↔worker dispatch for distributed benchmarks. + /// + /// The driver broadcasts Insert/Search/Stop commands to all workers and + /// collects their results. Workers execute commands via a callback and + /// report results back. + /// + /// This class is independent of posting routing — it only needs a way to + /// send packets to peer nodes (provided via PeerNetwork interface). + class DispatchCoordinator { + public: + /// Abstract interface for sending packets to peer nodes. + /// NetworkNode implements this so DispatchCoordinator doesn't + /// depend on the full node class. + class PeerNetwork { + public: + virtual ~PeerNetwork() = default; + /// Get connection to a peer node (reconnecting if needed). + virtual Socket::ConnectionID GetPeerConnection(int nodeIndex) = 0; + /// Total number of nodes in the cluster. + virtual int GetNumNodes() const = 0; + /// Index of this node. + virtual int GetLocalNodeIndex() const = 0; + /// Send a packet via the client socket. + virtual void SendPacket(Socket::ConnectionID connID, Socket::Packet&& pkt, + std::function callback) = 0; + }; + + using DispatchCallback = std::function; + + DispatchCoordinator() = default; + + ~DispatchCoordinator() { + ClearDispatchCallback(); + } + + /// Attach to a peer network (must outlive this coordinator). + void SetNetwork(PeerNetwork* network) { + m_network = network; + } + + /// Mark a worker node as "local" — its work is done inline by the + /// driver so it should be skipped during broadcast/result collection. + void SetLocalWorkerIndex(int idx) { m_localWorkerIndex = idx; } + + /// Set the callback for executing dispatch commands (worker side). + void SetDispatchCallback(DispatchCallback cb) { + m_dispatchCallback = std::move(cb); + } + + /// Clear the dispatch callback and wait for in-flight dispatch + /// threads to complete. Call before destroying callback state. + void ClearDispatchCallback() { + m_dispatchCallback = nullptr; + std::unique_lock lock(m_activeDispatchMutex); + m_activeDispatchCV.wait(lock, [this]() { + return m_activeDispatchCount == 0; + }); + } + + // ---- Driver side ---- + + /// Broadcast a dispatch command to all worker nodes. + /// Returns the dispatchId assigned to this command. + std::uint64_t BroadcastDispatchCommand(DispatchCommand::Type type, std::uint32_t round) { + std::uint64_t dispatchId = m_nextDispatchId.fetch_add(1); + + DispatchCommand cmd; + cmd.m_type = type; + cmd.m_dispatchId = dispatchId; + cmd.m_round = round; + + int numNodes = m_network->GetNumNodes(); + int localIdx = m_network->GetLocalNodeIndex(); + + // Build list of nodes to skip (dispatcher + local worker if set) + auto shouldSkip = [&](int i) { + return i == localIdx || i == m_localWorkerIndex; + }; + + // Count remote workers (nodes we will actually dispatch to) + int remoteWorkers = 0; + for (int i = 0; i < numNodes; i++) { + if (!shouldSkip(i)) remoteWorkers++; + } + + // Set up pending state for collecting results (not for Stop / Heartbeat) + if (type != DispatchCommand::Type::Stop && + type != DispatchCommand::Type::Heartbeat && + remoteWorkers > 0) { + auto state = std::make_shared(); + state->remaining.store(remoteWorkers); + for (int i = 0; i < numNodes; i++) { + if (!shouldSkip(i)) state->pendingNodes.insert(i); + } + { + std::lock_guard lock(m_dispatchMutex); + m_pendingDispatches[dispatchId] = state; + } + } + + auto bodySize = static_cast(cmd.EstimateBufferSize()); + + for (int i = 0; i < numNodes; i++) { + if (shouldSkip(i)) continue; + + Socket::ConnectionID connID = m_network->GetPeerConnection(i); + if (connID == Socket::c_invalidConnectionID) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "DispatchCoordinator: Cannot dispatch to node %d (no connection)\n", i); + if (type != DispatchCommand::Type::Stop && + type != DispatchCommand::Type::Heartbeat) { + std::lock_guard lock(m_dispatchMutex); + auto it = m_pendingDispatches.find(dispatchId); + if (it != m_pendingDispatches.end()) { + it->second->errors++; + if (it->second->remaining.fetch_sub(1) == 1) { + it->second->done.set_value(); + } + } + } + continue; + } + + Socket::Packet pkt; + pkt.Header().m_packetType = Socket::PacketType::DispatchCommand; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + pkt.Header().m_bodyLength = bodySize; + pkt.AllocateBuffer(bodySize); + cmd.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + m_network->SendPacket(connID, std::move(pkt), nullptr); + } + + // Heartbeats fire every interval seconds — keep logs clean. + if (type != DispatchCommand::Type::Heartbeat) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatchCoordinator: Dispatched %s (id=%llu round=%u) to %d workers\n", + type == DispatchCommand::Type::Search ? "Search" : + type == DispatchCommand::Type::Insert ? "Insert" : "Stop", + (unsigned long long)dispatchId, round, remoteWorkers); + } + + return dispatchId; + } + + /// Wait for all workers to report results for a dispatch. + /// Returns collected wall times from workers. Empty on timeout. + std::vector WaitForAllResults(std::uint64_t dispatchId, int timeoutSec = 300) { + std::shared_ptr state; + { + std::lock_guard lock(m_dispatchMutex); + auto it = m_pendingDispatches.find(dispatchId); + if (it == m_pendingDispatches.end()) return {}; + state = it->second; + } + + auto future = state->done.get_future(); + auto status = future.wait_for(std::chrono::seconds(timeoutSec)); + + { + std::lock_guard lock(m_dispatchMutex); + m_pendingDispatches.erase(dispatchId); + } + + if (status == std::future_status::timeout) { + std::string nodeList; + { + std::lock_guard lock(state->mutex); + for (int n : state->pendingNodes) { + if (!nodeList.empty()) nodeList += ","; + nodeList += std::to_string(n); + } + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "DispatchCoordinator: Timeout waiting for results (id=%llu, %d remaining, nodes=[%s])\n", + (unsigned long long)dispatchId, state->remaining.load(), nodeList.c_str()); + return {}; + } + + if (state->errors > 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "DispatchCoordinator: Dispatch %llu completed with %d errors\n", + (unsigned long long)dispatchId, (int)state->errors); + } + + std::lock_guard lock(state->mutex); + return state->wallTimes; + } + + // ---- Worker side ---- + + /// Send a dispatch result back to the driver (worker side). + void SendDispatchResult(const DispatchResult& result) { + int driverNode = 0; + if (driverNode == m_network->GetLocalNodeIndex()) return; + + Socket::ConnectionID connID = m_network->GetPeerConnection(driverNode); + if (connID == Socket::c_invalidConnectionID) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "DispatchCoordinator: Cannot send result to driver\n"); + return; + } + + Socket::Packet pkt; + auto bodySize = static_cast(result.EstimateBufferSize()); + pkt.Header().m_packetType = Socket::PacketType::DispatchResult; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + pkt.Header().m_bodyLength = bodySize; + pkt.AllocateBuffer(bodySize); + result.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + m_network->SendPacket(connID, std::move(pkt), nullptr); + } + + // ---- Packet handlers (called by NetworkNode's server/client) ---- + + /// Handle an incoming dispatch command from the driver (worker side). + void HandleDispatchCommand(Socket::ConnectionID connID, Socket::Packet packet) { + if (packet.Header().m_bodyLength == 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "DispatchCoordinator: Empty DispatchCommand received\n"); + return; + } + + DispatchCommand cmd; + if (cmd.Read(packet.Body()) == nullptr) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "DispatchCoordinator: DispatchCommand parse failed\n"); + return; + } + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatchCoordinator: Received command type=%d id=%llu round=%u\n", + (int)cmd.m_type, (unsigned long long)cmd.m_dispatchId, cmd.m_round); + + auto callback = m_dispatchCallback; + if (!callback) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "DispatchCoordinator: No callback set, ignoring command\n"); + return; + } + + { + std::lock_guard lock(m_activeDispatchMutex); + m_activeDispatchCount++; + } + + auto self = this; + int localIdx = m_network->GetLocalNodeIndex(); + std::thread([self, callback, cmd, localIdx]() { + DispatchResult result = callback(cmd); + result.m_nodeIndex = localIdx; + result.m_dispatchId = cmd.m_dispatchId; + result.m_round = cmd.m_round; + + if (cmd.m_type != DispatchCommand::Type::Stop && + cmd.m_type != DispatchCommand::Type::Heartbeat) { + self->SendDispatchResult(result); + } + + { + std::lock_guard lock(self->m_activeDispatchMutex); + self->m_activeDispatchCount--; + } + self->m_activeDispatchCV.notify_all(); + }).detach(); + } + + /// Handle an incoming dispatch result from a worker (driver side). + void HandleDispatchResult(Socket::ConnectionID connID, Socket::Packet packet) { + if (packet.Header().m_bodyLength == 0) return; + + DispatchResult result; + if (result.Read(packet.Body()) == nullptr) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "DispatchCoordinator: DispatchResult parse failed\n"); + return; + } + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatchCoordinator: Result id=%llu round=%u node=%d status=%d errorCode=%d wallTime=%.3f\n", + (unsigned long long)result.m_dispatchId, result.m_round, + result.m_nodeIndex, (int)result.m_status, (int)result.m_errorCode, + result.m_wallTime); + + std::shared_ptr state; + { + std::lock_guard lock(m_dispatchMutex); + auto it = m_pendingDispatches.find(result.m_dispatchId); + if (it == m_pendingDispatches.end()) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "DispatchCoordinator: Result for unknown dispatch %llu (late/expired)\n", + (unsigned long long)result.m_dispatchId); + return; + } + state = it->second; + } + + if (result.m_status != DispatchResult::Status::Success) { + state->errors++; + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "DispatchCoordinator: dispatch %llu node=%d failed errorCode=%d\n", + (unsigned long long)result.m_dispatchId, result.m_nodeIndex, + (int)result.m_errorCode); + } + + { + std::lock_guard lock(state->mutex); + state->wallTimes.push_back(result.m_wallTime); + if (result.m_nodeIndex >= 0) + state->pendingNodes.erase(result.m_nodeIndex); + } + + if (state->remaining.fetch_sub(1) == 1) { + state->done.set_value(); + } + } + + private: + struct PendingDispatch { + std::atomic remaining{0}; + std::atomic errors{0}; + std::promise done; + std::mutex mutex; + std::vector wallTimes; + std::set pendingNodes; // nodes that haven't responded yet + }; + + PeerNetwork* m_network = nullptr; + int m_localWorkerIndex = -1; // driver's worker node to skip in broadcasts + DispatchCallback m_dispatchCallback; + std::atomic m_nextDispatchId{1}; + std::mutex m_dispatchMutex; + std::unordered_map> m_pendingDispatches; + + std::mutex m_activeDispatchMutex; + std::condition_variable m_activeDispatchCV; + int m_activeDispatchCount{0}; + }; + +} // namespace SPTAG::SPANN diff --git a/AnnService/inc/Core/SPANN/Distributed/DispatcherNode.h b/AnnService/inc/Core/SPANN/Distributed/DispatcherNode.h new file mode 100644 index 000000000..00b7bbdb6 --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/DispatcherNode.h @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include "inc/Core/SPANN/Distributed/NetworkNode.h" + +namespace SPTAG::SPANN { + + /// Dispatcher node: manages the consistent hash ring and coordinates + /// external dispatch commands (Insert/Search/Stop) to worker nodes. + /// + /// The dispatcher does NOT perform search or posting operations. + /// It is a lightweight coordination point that: + /// - Accepts NodeRegister requests from workers + /// - Maintains the authoritative hash ring and broadcasts updates + /// - Tracks per-worker ACK status with retry + /// - Delegates BroadcastDispatchCommand / WaitForAllResults + class DispatcherNode : public NetworkNode { + public: + using DispatchCallback = DispatchCoordinator::DispatchCallback; + + /// Initialize the dispatcher with separate addresses. + /// Builds the full hash ring at startup (workers 1..N). + bool Initialize( + const std::pair& dispatcherAddr, + const std::vector>& workerAddrs, + int vnodeCount = 150) + { + // Build combined addr list: [dispatcher, worker0, worker1, ...] + std::vector> allAddrs; + allAddrs.push_back(dispatcherAddr); + allAddrs.insert(allAddrs.end(), workerAddrs.begin(), workerAddrs.end()); + + if (!InitializeNetwork(0, allAddrs, vnodeCount)) return false; + + // [Bug 30] Dispatcher has no local data shard; mark with -1. + m_numDispatchNodes = 1; + m_numWorkerNodes = static_cast(workerAddrs.size()); + m_workerNodeIndex = -1; + + // Pre-build complete ring with all workers (internal indices 1..N) + int numWorkers = static_cast(workerAddrs.size()); + auto ring = std::make_shared(vnodeCount); + for (int i = 1; i <= numWorkers; i++) { + ring->AddNode(i); + } + std::atomic_store(&m_hashRing, + std::shared_ptr(std::move(ring))); + m_currentRingVersion.store(1); + + m_dispatch.SetNetwork(this); + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: initialized with %d workers, ring v1\n", numWorkers); + return true; + } + + bool Start() { return StartNetwork(); } + + // ---- Dispatch protocol ---- + + /// Mark the driver's local worker node so broadcasts skip it. + void SetLocalWorkerIndex(int idx) { m_dispatch.SetLocalWorkerIndex(idx); } + + std::uint64_t BroadcastDispatchCommand(DispatchCommand::Type type, std::uint32_t round) { + return m_dispatch.BroadcastDispatchCommand(type, round); + } + + std::vector WaitForAllResults(std::uint64_t dispatchId, int timeoutSec = 300) { + return m_dispatch.WaitForAllResults(dispatchId, timeoutSec); + } + + void SetDispatchCallback(DispatchCallback cb) { + m_dispatch.SetDispatchCallback(std::move(cb)); + } + + void ClearDispatchCallback() { + m_dispatch.ClearDispatchCallback(); + } + + // ---- Heartbeat pump ---- + // + // Periodically broadcasts a Heartbeat dispatch to every remote worker. + // Workers use the heartbeat to detect driver failure / network + // partition and exit cleanly rather than relying on a fixed + // wall-clock receiver timeout. + // + // Idempotent: callable from any thread; second call without StopHeartbeat + // is a no-op. StopHeartbeat joins the thread; destructor calls it. + + void StartHeartbeat(int intervalSec) { + if (intervalSec <= 0) return; + if (m_heartbeatThread.joinable()) return; + m_heartbeatStop.store(false); + m_heartbeatThread = std::thread([this, intervalSec]() { + std::uint32_t round = 0; + while (!m_heartbeatStop.load()) { + BroadcastDispatchCommand(DispatchCommand::Type::Heartbeat, round++); + for (int i = 0; i < intervalSec * 10 && !m_heartbeatStop.load(); i++) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + } + }); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: heartbeat pump started (interval=%ds)\n", intervalSec); + } + + void StopHeartbeat() { + if (!m_heartbeatThread.joinable()) return; + m_heartbeatStop.store(true); + m_heartbeatThread.join(); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: heartbeat pump stopped\n"); + } + + ~DispatcherNode() { + StopHeartbeat(); + } + + // ---- Ring management ---- + + bool AllWorkersAcked() const { + std::uint32_t currentVer = m_currentRingVersion.load(); + if (currentVer == 0) return false; + std::lock_guard lock(m_ackMutex); + int numNodes = static_cast(m_nodeAddrs.size()); + for (int i = 0; i < numNodes; i++) { + if (i == m_localNodeIndex) continue; + auto it = m_workerAckedVersion.find(i); + if (it == m_workerAckedVersion.end() || it->second < currentVer) return false; + } + return true; + } + + protected: + void RegisterServerHandlers(Socket::PacketHandlerMapPtr& handlers) override { + handlers->emplace(Socket::PacketType::NodeRegisterRequest, + [this](Socket::ConnectionID c, Socket::Packet p) { HandleNodeRegisterRequest(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::RingUpdateACK, + [this](Socket::ConnectionID c, Socket::Packet p) { HandleRingUpdateACK(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::DispatchCommand, + [this](Socket::ConnectionID c, Socket::Packet p) { m_dispatch.HandleDispatchCommand(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::DispatchResult, + [this](Socket::ConnectionID c, Socket::Packet p) { m_dispatch.HandleDispatchResult(c, std::move(p)); }); + } + + void RegisterClientHandlers(Socket::PacketHandlerMapPtr& handlers) override { + handlers->emplace(Socket::PacketType::DispatchResult, + [this](Socket::ConnectionID c, Socket::Packet p) { m_dispatch.HandleDispatchResult(c, std::move(p)); }); + } + + void BgProtocolStep() override { + if (m_currentRingVersion.load() > 0) { + RetryUnackedRingUpdates(); + } + } + + bool IsRingSettled() const override { + return AllWorkersAcked(); + } + + private: + void HandleNodeRegisterRequest(Socket::ConnectionID connID, Socket::Packet packet) { + NodeRegisterMsg msg; + if (!msg.Read(packet.Body())) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "DispatcherNode: Failed to parse NodeRegisterRequest\n"); + return; + } + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: NodeRegister from node %d (%s:%s, store=%s)\n", + msg.m_nodeIndex, msg.m_host.c_str(), msg.m_port.c_str(), msg.m_store.c_str()); + + // Ring is pre-built at startup, just broadcast current ring to the new connection + BroadcastRingUpdate(); + } + + void HandleRingUpdateACK(Socket::ConnectionID connID, Socket::Packet packet) { + RingUpdateACKMsg msg; + if (!msg.Read(packet.Body())) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "DispatcherNode: Failed to parse RingUpdateACK\n"); + return; + } + { + std::lock_guard lock(m_ackMutex); + auto& ver = m_workerAckedVersion[msg.m_nodeIndex]; + if (msg.m_ringVersion > ver) ver = msg.m_ringVersion; + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: RingUpdateACK from node %d (v%u)\n", + msg.m_nodeIndex, msg.m_ringVersion); + } + + void BroadcastRingUpdate() { + auto ring = std::atomic_load(&m_hashRing); + if (!ring) return; + + std::uint32_t version = m_currentRingVersion.load(); + RingUpdateMsg msg; + msg.m_ringVersion = version; + msg.m_vnodeCount = ring->GetVNodeCount(); + for (int idx : ring->GetNodes()) { + msg.m_nodeIndices.push_back(idx); + } + + std::size_t bodySize = msg.EstimateBufferSize(); + int numNodes = static_cast(m_nodeAddrs.size()); + + for (int i = 0; i < numNodes; i++) { + if (i == m_localNodeIndex) continue; + auto peerConn = GetPeerConnection(i); + if (peerConn == Socket::c_invalidConnectionID) continue; + + Socket::Packet pkt; + pkt.Header().m_packetType = Socket::PacketType::RingUpdate; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + pkt.Header().m_bodyLength = static_cast(bodySize); + pkt.AllocateBuffer(static_cast(bodySize)); + msg.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + m_client->SendPacket(peerConn, std::move(pkt), nullptr); + } + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: Broadcast RingUpdate v%u (%d nodes)\n", + version, (int)msg.m_nodeIndices.size()); + } + + void RetryUnackedRingUpdates() { + auto ring = std::atomic_load(&m_hashRing); + if (!ring) return; + std::uint32_t currentVer = m_currentRingVersion.load(); + if (currentVer == 0) return; + + std::vector unacked; + { + std::lock_guard lock(m_ackMutex); + int numNodes = static_cast(m_nodeAddrs.size()); + for (int i = 0; i < numNodes; i++) { + if (i == m_localNodeIndex) continue; + auto it = m_workerAckedVersion.find(i); + if (it == m_workerAckedVersion.end() || it->second < currentVer) + unacked.push_back(i); + } + } + if (unacked.empty()) return; + + RingUpdateMsg msg; + msg.m_ringVersion = currentVer; + msg.m_vnodeCount = ring->GetVNodeCount(); + for (int idx : ring->GetNodes()) msg.m_nodeIndices.push_back(idx); + std::size_t bodySize = msg.EstimateBufferSize(); + + for (int nodeIdx : unacked) { + auto peerConn = GetPeerConnection(nodeIdx); + if (peerConn == Socket::c_invalidConnectionID) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: RetryUnackedRingUpdates skip node %d (no peer conn)\n", nodeIdx); + continue; + } + + Socket::Packet pkt; + pkt.Header().m_packetType = Socket::PacketType::RingUpdate; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + pkt.Header().m_bodyLength = static_cast(bodySize); + pkt.AllocateBuffer(static_cast(bodySize)); + msg.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + m_client->SendPacket(peerConn, std::move(pkt), nullptr); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "DispatcherNode: Retried RingUpdate to node %d (connID=%u)\n", nodeIdx, peerConn); + } + } + + DispatchCoordinator m_dispatch; + std::atomic m_currentRingVersion{0}; + mutable std::mutex m_ackMutex; + std::unordered_map m_workerAckedVersion; + + std::thread m_heartbeatThread; + std::atomic m_heartbeatStop{false}; + }; + +} // namespace SPTAG::SPANN diff --git a/AnnService/inc/Core/SPANN/Distributed/DistributedProtocol.h b/AnnService/inc/Core/SPANN/Distributed/DistributedProtocol.h new file mode 100644 index 000000000..082bdb373 --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/DistributedProtocol.h @@ -0,0 +1,694 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include "inc/Core/Common.h" +#include "inc/Socket/SimpleSerialization.h" +#include +#include +#include +#include + +namespace SPTAG::SPANN { + + /// Serializable request for remote Append operations sent between compute nodes. + /// MirrorVersion 1 added m_layer to disambiguate which ExtraDynamicSearcher on + /// the receiver side handles the request. Version 0 packets default m_layer=0. + /// MirrorVersion 2 added m_fencingToken: when nonzero the receiver must + /// validate the token against its RemoteLeaseTable for the head's bucket + /// before applying. Token 0 means "no fencing required" (used by the + /// normal owner-ring auto-route path that does not hold any remote lock). + struct RemoteAppendRequest { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 2; } + + SizeType m_headID = 0; + std::string m_headVec; // raw head vector bytes + std::int32_t m_appendNum = 0; + std::string m_appendPosting; // serialized posting data + std::int32_t m_layer = 0; // originating ExtraDynamicSearcher layer + std::uint64_t m_fencingToken = 0; // 0 = unfenced (legacy path) + + std::size_t EstimateBufferSize() const { + std::size_t size = 0; + size += sizeof(std::uint16_t) * 2; // version fields + size += sizeof(SizeType); // headID + size += sizeof(std::uint32_t) + m_headVec.size(); // headVec (len-prefixed) + size += sizeof(std::int32_t); // appendNum + size += sizeof(std::uint32_t) + m_appendPosting.size(); // appendPosting (len-prefixed) + size += sizeof(std::int32_t); // layer (mirrorVer >= 1) + size += sizeof(std::uint64_t); // fencingToken (mirrorVer >= 2) + return size; + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_headID, p_buffer); + p_buffer = SimpleWriteBuffer(m_headVec, p_buffer); + p_buffer = SimpleWriteBuffer(m_appendNum, p_buffer); + p_buffer = SimpleWriteBuffer(m_appendPosting, p_buffer); + p_buffer = SimpleWriteBuffer(m_layer, p_buffer); + p_buffer = SimpleWriteBuffer(m_fencingToken, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + return Read(p_buffer, nullptr); + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer, const std::uint8_t* p_bufEnd) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, majorVer); + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, mirrorVer); + if (p_buffer == nullptr || majorVer != MajorVersion()) return nullptr; + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_headID); + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_headVec); + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_appendNum); + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_appendPosting); + if (mirrorVer >= 1) { + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_layer); + } else { + m_layer = 0; + } + if (mirrorVer >= 2) { + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_fencingToken); + } else { + m_fencingToken = 0; + } + return p_buffer; + } + }; + + /// Response for remote Append operations. + struct RemoteAppendResponse { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + enum class Status : std::uint8_t { Success = 0, Failed = 1 }; + Status m_status = Status::Success; + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(std::uint8_t); + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_status, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + p_buffer = SimpleReadBuffer(p_buffer, m_status); + return p_buffer; + } + }; + + /// Identifies a compute node target for routing decisions. + struct RouteTarget { + int nodeIndex = -1; + bool isLocal = true; + }; + + /// Batch of remote append requests sent to a single node in one round-trip. + struct BatchRemoteAppendRequest { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + std::uint32_t m_count = 0; + std::vector m_items; + + std::size_t EstimateBufferSize() const { + std::size_t size = sizeof(std::uint16_t) * 2; // version + size += sizeof(std::uint32_t); // count + for (auto& item : m_items) size += item.EstimateBufferSize(); + return size; + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_count, p_buffer); + for (auto& item : m_items) p_buffer = item.Write(p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer, std::uint32_t bodyLength = 0) { + using namespace Socket::SimpleSerialization; + const std::uint8_t* bufEnd = (bodyLength > 0) ? (p_buffer + bodyLength) : nullptr; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SafeSimpleReadBuffer(p_buffer, bufEnd, majorVer); + p_buffer = SafeSimpleReadBuffer(p_buffer, bufEnd, mirrorVer); + if (p_buffer == nullptr || majorVer != MajorVersion()) { + m_items.clear(); + return nullptr; + } + p_buffer = SafeSimpleReadBuffer(p_buffer, bufEnd, m_count); + if (p_buffer == nullptr) { + m_items.clear(); + return nullptr; + } + // Reject obviously corrupt counts before allocating + if (bodyLength > 0 && m_count > bodyLength / 8) { + m_items.clear(); + return nullptr; + } + m_items.resize(m_count); + for (std::uint32_t i = 0; i < m_count; i++) { + if (bufEnd && p_buffer >= bufEnd) { + m_items.clear(); + return nullptr; + } + p_buffer = m_items[i].Read(p_buffer, bufEnd); + if (!p_buffer) { + m_items.clear(); + return nullptr; + } + if (bufEnd && p_buffer > bufEnd) { + m_items.clear(); + return nullptr; + } + } + return p_buffer; + } + }; + + /// Response for batch remote append. + struct BatchRemoteAppendResponse { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + std::uint32_t m_successCount = 0; + std::uint32_t m_failCount = 0; + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(std::uint32_t) * 2; + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_successCount, p_buffer); + p_buffer = SimpleWriteBuffer(m_failCount, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + p_buffer = SimpleReadBuffer(p_buffer, m_successCount); + p_buffer = SimpleReadBuffer(p_buffer, m_failCount); + return p_buffer; + } + }; + + /// Cross-node merge hint. Search-side trigger on node X observed that + /// posting `m_headID` (owned by the target node based on consistent-hash + /// ownership) is below the merge threshold. The receiver enqueues a + /// local MergeAsync; the local MergePostings logic decides whether the + /// posting really needs merging at execution time. Fire-and-forget: no + /// response packet, no retry queue. Multiple notifications for the same + /// head are dedup'd by m_mergeList on the receiver. + struct RemoteMergeRequest { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + SizeType m_headID = 0; + std::int32_t m_layer = 0; + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(SizeType) + sizeof(std::int32_t); + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_headID, p_buffer); + p_buffer = SimpleWriteBuffer(m_layer, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer, const std::uint8_t* p_bufEnd) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, majorVer); + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, mirrorVer); + if (p_buffer == nullptr || majorVer != MajorVersion()) return nullptr; + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_headID); + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, m_layer); + return p_buffer; + } + }; + + /// Batch of cross-node merge hints sent to a single owner node in one + /// fire-and-forget packet. Sender-side dedups by (layer, headID) so + /// each entry appears at most once per flush window. + struct BatchRemoteMergeRequest { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + std::uint32_t m_count = 0; + std::vector m_items; + + std::size_t EstimateBufferSize() const { + std::size_t size = sizeof(std::uint16_t) * 2; + size += sizeof(std::uint32_t); + for (auto& item : m_items) size += item.EstimateBufferSize(); + return size; + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_count, p_buffer); + for (auto& item : m_items) p_buffer = item.Write(p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer, std::uint32_t bodyLength = 0) { + using namespace Socket::SimpleSerialization; + const std::uint8_t* bufEnd = (bodyLength > 0) ? (p_buffer + bodyLength) : nullptr; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SafeSimpleReadBuffer(p_buffer, bufEnd, majorVer); + p_buffer = SafeSimpleReadBuffer(p_buffer, bufEnd, mirrorVer); + if (p_buffer == nullptr || majorVer != MajorVersion()) { + m_items.clear(); + return nullptr; + } + p_buffer = SafeSimpleReadBuffer(p_buffer, bufEnd, m_count); + if (p_buffer == nullptr) { m_items.clear(); return nullptr; } + if (bodyLength > 0 && m_count > bodyLength / 8) { + m_items.clear(); + return nullptr; + } + m_items.resize(m_count); + for (std::uint32_t i = 0; i < m_count; i++) { + if (bufEnd && p_buffer >= bufEnd) { m_items.clear(); return nullptr; } + p_buffer = m_items[i].Read(p_buffer, bufEnd); + if (!p_buffer) { m_items.clear(); return nullptr; } + if (bufEnd && p_buffer > bufEnd) { m_items.clear(); return nullptr; } + } + return p_buffer; + } + }; + + /// Entry in a head sync broadcast: one add or delete of a head node. + /// `m_layer` identifies the originating ExtraDynamicSearcher so the + /// receiver applies the entry to the matching layer's head index + /// (with multi-layer SPANN, layer 0 and layer 1 both broadcast head + /// add/delete; without the layer field every entry would be misrouted + /// to a single shared callback). + struct HeadSyncEntry { + enum class Op : std::uint8_t { Add = 0, Delete = 1 }; + Op op; + SizeType headVID; + std::string headVector; // only for Add; empty for Delete + std::int32_t m_layer = 0; // originating ExtraDynamicSearcher layer + + size_t EstimateBufferSize() const { + return sizeof(std::uint8_t) // op + + sizeof(SizeType) // headVID + + sizeof(std::uint32_t) // headVector length + + headVector.size() + + sizeof(std::int32_t); // layer + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(static_cast(op), p_buffer); + p_buffer = SimpleWriteBuffer(headVID, p_buffer); + std::uint32_t vecLen = static_cast(headVector.size()); + p_buffer = SimpleWriteBuffer(vecLen, p_buffer); + if (vecLen > 0) { + memcpy(p_buffer, headVector.data(), vecLen); + p_buffer += vecLen; + } + p_buffer = SimpleWriteBuffer(m_layer, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint8_t rawOp = 0; + p_buffer = SimpleReadBuffer(p_buffer, rawOp); + op = static_cast(rawOp); + p_buffer = SimpleReadBuffer(p_buffer, headVID); + std::uint32_t vecLen = 0; + p_buffer = SimpleReadBuffer(p_buffer, vecLen); + if (vecLen > 0) { + headVector.assign(reinterpret_cast(p_buffer), vecLen); + p_buffer += vecLen; + } else { + headVector.clear(); + } + p_buffer = SimpleReadBuffer(p_buffer, m_layer); + return p_buffer; + } + }; + + /// Dispatch command from driver to workers (replaces file-based barriers). + struct DispatchCommand { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + enum class Type : std::uint8_t { Search = 0, Insert = 1, Stop = 2, Heartbeat = 3 }; + Type m_type = Type::Search; + std::uint64_t m_dispatchId = 0; // unique ID from driver + std::uint32_t m_round = 0; // search round or insert batch index + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(std::uint8_t) + + sizeof(std::uint64_t) + sizeof(std::uint32_t); + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(static_cast(m_type), p_buffer); + p_buffer = SimpleWriteBuffer(m_dispatchId, p_buffer); + p_buffer = SimpleWriteBuffer(m_round, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + std::uint8_t rawType = 0; + p_buffer = SimpleReadBuffer(p_buffer, rawType); + m_type = static_cast(rawType); + p_buffer = SimpleReadBuffer(p_buffer, m_dispatchId); + p_buffer = SimpleReadBuffer(p_buffer, m_round); + return p_buffer; + } + }; + + /// Result from worker back to driver after executing a dispatch command. + /// MirrorVersion 2 added m_errorCode so failures can carry SPTAG::ErrorCode + /// detail back to the driver instead of collapsing into a boolean. + struct DispatchResult { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 2; } + + enum class Status : std::uint8_t { Success = 0, Failed = 1 }; + Status m_status = Status::Success; + std::uint64_t m_dispatchId = 0; + std::uint32_t m_round = 0; + double m_wallTime = 0.0; + std::int32_t m_nodeIndex = -1; // which worker sent this result + // SPTAG::ErrorCode cast to int32 (Success == 0). Populated by the + // worker's dispatch callback so the driver can distinguish e.g. + // KeyNotFound from disk-full from network-fail. Older peers (mirror + // 1) leave this at 0 even when m_status == Failed. + std::int32_t m_errorCode = 0; + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(std::uint8_t) + + sizeof(std::uint64_t) + sizeof(std::uint32_t) + sizeof(double) + + sizeof(std::int32_t) * 2; + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(static_cast(m_status), p_buffer); + p_buffer = SimpleWriteBuffer(m_dispatchId, p_buffer); + p_buffer = SimpleWriteBuffer(m_round, p_buffer); + p_buffer = SimpleWriteBuffer(m_wallTime, p_buffer); + p_buffer = SimpleWriteBuffer(m_nodeIndex, p_buffer); + p_buffer = SimpleWriteBuffer(m_errorCode, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + std::uint8_t rawStatus = 0; + p_buffer = SimpleReadBuffer(p_buffer, rawStatus); + m_status = static_cast(rawStatus); + p_buffer = SimpleReadBuffer(p_buffer, m_dispatchId); + p_buffer = SimpleReadBuffer(p_buffer, m_round); + p_buffer = SimpleReadBuffer(p_buffer, m_wallTime); + if (mirrorVer >= 1) { + p_buffer = SimpleReadBuffer(p_buffer, m_nodeIndex); + } + if (mirrorVer >= 2) { + p_buffer = SimpleReadBuffer(p_buffer, m_errorCode); + } + return p_buffer; + } + }; + + /// Request to lock/unlock a headID on its owner node (for cross-node Merge). + /// MirrorVersion 1 added m_layer so multi-layer setups dispatch to the + /// correct lock pool (each ExtraDynamicSearcher owns its own bucket flags). + /// MirrorVersion 2 added m_token for fencing: Lock requests send token=0; + /// Unlock requests send the token issued by the prior Lock so a zombie + /// holder whose lease expired cannot release a lock now held by someone else. + struct RemoteLockRequest { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 2; } + + enum class Op : std::uint8_t { Lock = 0, Unlock = 1 }; + Op m_op = Op::Lock; + SizeType m_headID = 0; + std::int32_t m_layer = 0; + std::uint64_t m_token = 0; + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(std::uint8_t) + + sizeof(SizeType) + sizeof(std::int32_t) + sizeof(std::uint64_t); + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(static_cast(m_op), p_buffer); + p_buffer = SimpleWriteBuffer(m_headID, p_buffer); + p_buffer = SimpleWriteBuffer(m_layer, p_buffer); + p_buffer = SimpleWriteBuffer(m_token, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + std::uint8_t rawOp = 0; + p_buffer = SimpleReadBuffer(p_buffer, rawOp); + m_op = static_cast(rawOp); + p_buffer = SimpleReadBuffer(p_buffer, m_headID); + if (mirrorVer >= 1) { + p_buffer = SimpleReadBuffer(p_buffer, m_layer); + } else { + m_layer = 0; + } + if (mirrorVer >= 2) { + p_buffer = SimpleReadBuffer(p_buffer, m_token); + } else { + m_token = 0; + } + return p_buffer; + } + }; + + /// Response for remote lock operations. + /// MirrorVersion 1 added m_token: the owner returns the issued fencing + /// token on a successful Lock so the holder can attach it to subsequent + /// lock-protected operations. Unlock responses return token=0. + struct RemoteLockResponse { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 1; } + + enum class Status : std::uint8_t { Granted = 0, Denied = 1 }; + Status m_status = Status::Granted; + std::uint64_t m_token = 0; + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(std::uint8_t) + sizeof(std::uint64_t); + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(static_cast(m_status), p_buffer); + p_buffer = SimpleWriteBuffer(m_token, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + std::uint8_t rawOp = 0; + p_buffer = SimpleReadBuffer(p_buffer, rawOp); + m_status = static_cast(rawOp); + if (mirrorVer >= 1) { + p_buffer = SimpleReadBuffer(p_buffer, m_token); + } else { + m_token = 0; + } + return p_buffer; + } + }; + + /// Worker → dispatcher registration message. + struct NodeRegisterMsg { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + std::int32_t m_nodeIndex = 0; + std::string m_host; + std::string m_port; + std::string m_store; + + std::size_t EstimateBufferSize() const { + std::size_t size = 0; + size += sizeof(std::uint16_t) * 2; + size += sizeof(std::int32_t); + size += sizeof(std::uint32_t) + m_host.size(); + size += sizeof(std::uint32_t) + m_port.size(); + size += sizeof(std::uint32_t) + m_store.size(); + return size; + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_nodeIndex, p_buffer); + p_buffer = SimpleWriteBuffer(m_host, p_buffer); + p_buffer = SimpleWriteBuffer(m_port, p_buffer); + p_buffer = SimpleWriteBuffer(m_store, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + p_buffer = SimpleReadBuffer(p_buffer, m_nodeIndex); + p_buffer = SimpleReadBuffer(p_buffer, m_host); + p_buffer = SimpleReadBuffer(p_buffer, m_port); + p_buffer = SimpleReadBuffer(p_buffer, m_store); + return p_buffer; + } + }; + + /// Dispatcher → worker ring update (full node list, versioned). + struct RingUpdateMsg { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + std::uint32_t m_ringVersion = 0; + std::int32_t m_vnodeCount = 150; + std::vector m_nodeIndices; + + std::size_t EstimateBufferSize() const { + std::size_t size = 0; + size += sizeof(std::uint16_t) * 2; + size += sizeof(std::uint32_t); // ringVersion + size += sizeof(std::int32_t); // vnodeCount + size += sizeof(std::uint32_t); // numNodes + size += sizeof(std::int32_t) * m_nodeIndices.size(); + return size; + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_ringVersion, p_buffer); + p_buffer = SimpleWriteBuffer(m_vnodeCount, p_buffer); + std::uint32_t count = static_cast(m_nodeIndices.size()); + p_buffer = SimpleWriteBuffer(count, p_buffer); + for (auto idx : m_nodeIndices) { + p_buffer = SimpleWriteBuffer(idx, p_buffer); + } + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + p_buffer = SimpleReadBuffer(p_buffer, m_ringVersion); + p_buffer = SimpleReadBuffer(p_buffer, m_vnodeCount); + std::uint32_t count = 0; + p_buffer = SimpleReadBuffer(p_buffer, count); + m_nodeIndices.resize(count); + for (std::uint32_t i = 0; i < count; i++) { + p_buffer = SimpleReadBuffer(p_buffer, m_nodeIndices[i]); + } + return p_buffer; + } + }; + + /// Worker → dispatcher ACK for a ring update. + struct RingUpdateACKMsg { + static constexpr std::uint16_t MajorVersion() { return 1; } + static constexpr std::uint16_t MirrorVersion() { return 0; } + + std::int32_t m_nodeIndex = -1; + std::uint32_t m_ringVersion = 0; + + std::size_t EstimateBufferSize() const { + return sizeof(std::uint16_t) * 2 + sizeof(std::int32_t) + sizeof(std::uint32_t); + } + + std::uint8_t* Write(std::uint8_t* p_buffer) const { + using namespace Socket::SimpleSerialization; + p_buffer = SimpleWriteBuffer(MajorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(MirrorVersion(), p_buffer); + p_buffer = SimpleWriteBuffer(m_nodeIndex, p_buffer); + p_buffer = SimpleWriteBuffer(m_ringVersion, p_buffer); + return p_buffer; + } + + const std::uint8_t* Read(const std::uint8_t* p_buffer) { + using namespace Socket::SimpleSerialization; + std::uint16_t majorVer = 0, mirrorVer = 0; + p_buffer = SimpleReadBuffer(p_buffer, majorVer); + p_buffer = SimpleReadBuffer(p_buffer, mirrorVer); + if (majorVer != MajorVersion()) return nullptr; + p_buffer = SimpleReadBuffer(p_buffer, m_nodeIndex); + p_buffer = SimpleReadBuffer(p_buffer, m_ringVersion); + return p_buffer; + } + }; + +} // namespace SPTAG::SPANN diff --git a/AnnService/inc/Core/SPANN/Distributed/HeadSyncLog.h b/AnnService/inc/Core/SPANN/Distributed/HeadSyncLog.h new file mode 100644 index 000000000..eb71f666e --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/HeadSyncLog.h @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef _SPTAG_SPANN_DISTRIBUTED_HEADSYNCLOG_H_ +#define _SPTAG_SPANN_DISTRIBUTED_HEADSYNCLOG_H_ + +#include "inc/Core/Common.h" +#include "inc/Helper/KeyValueIO.h" +#include "inc/Helper/Logging.h" +#include "inc/Core/SPANN/Distributed/DistributedProtocol.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SPTAG { +namespace SPANN { +namespace Distributed { + +// HeadSyncLog: durable per-shard log of HeadSync entries in TiKV. +// +// Per the distributed design, the canonical source of truth for head +// topology changes is TiKV, not the in-memory broadcast. Each shard +// (today: per owner node) holds: +// * `hs/v/` little-endian uint64 latest version +// * `hs/e//` serialized HeadSyncEntry payload +// * `hs/c//` little-endian uint64 applied version +// +// Versions are monotonically increasing per shard. Producers serialize +// their version-bump under `m_appendMutex` and write entry-then-version; +// readers tolerate a transient lag where version points slightly past +// the last entry (treat the missing entry as not-yet-visible and retry). +// TiKV's raw KV API gives no multi-key atomicity; the design (per user +// direction) accepts this and relies on idempotent apply + cursor +// catch-up to converge. +// +// This header is intentionally self-contained; it does not depend on +// any SPANN searcher type. ExtraDynamicSearcher wires it up by +// constructing one instance per layer-0 ExtraDynamicSearcher, calling +// Append() in BroadcastHeadSync, and supplying an ApplyFn callback for +// the reconciler. +class HeadSyncLog { +public: + // Decoded entry returned by ReadSince. Carries the version so the + // reconciler can advance its cursor strictly past it on success. + struct VersionedEntry { + std::uint64_t version; + HeadSyncEntry entry; + }; + + using ApplyFn = std::function; + + HeadSyncLog(std::shared_ptr db, + int nodeIndex, + int reconcileIntervalMs = 2000) + : m_db(std::move(db)), + m_nodeIndex(nodeIndex), + m_reconcileIntervalMs(reconcileIntervalMs), + m_stop(false) {} + + ~HeadSyncLog() { Stop(); } + + // Append a batch of entries to the given shard's log. Returns the + // version of the last written entry (>= 1 on success, 0 on failure). + std::uint64_t Append(int shard, const std::vector& entries) { + if (!m_db || entries.empty()) return 0; + std::lock_guard lk(GetShardAppendMutex(shard)); + std::uint64_t base = LoadLatestVersion(shard); + std::vector keys; + std::vector values; + keys.reserve(entries.size()); + values.reserve(entries.size()); + std::uint64_t v = base; + for (const auto& e : entries) { + ++v; + keys.push_back(MakeEntryKey(shard, v)); + values.push_back(EncodeEntry(e)); + } + auto ec = m_db->MultiPut(keys, values, kTimeout, nullptr); + if (ec != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "HeadSyncLog::Append shard=%d entries=%zu MultiPut failed (%d)\n", + shard, entries.size(), (int)ec); + return 0; + } + ec = m_db->Put(MakeVersionKey(shard), + EncodeUint64(v), + kTimeout, nullptr); + if (ec != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "HeadSyncLog::Append shard=%d version Put failed (%d), entries durable but version lag\n", + shard, (int)ec); + // Entries are durable; the next Append (or reconciler in + // another node) will discover them via probe. + return v; + } + return v; + } + + // Read latest version that the shard publisher has advanced to. + // Returns 0 if no version is published yet or on read failure. + std::uint64_t GetLatestVersion(int shard) const { return LoadLatestVersion(shard); } + + // Read entries (cursor, latest], one at a time. Stops at the first + // missing version (which indicates writer lag). + std::vector ReadSince(int shard, + std::uint64_t cursor, + std::uint64_t latest, + size_t maxBatch = 256) const { + std::vector out; + if (!m_db || cursor >= latest) return out; + size_t want = std::min(maxBatch, + static_cast(latest - cursor)); + std::vector keys; + keys.reserve(want); + for (size_t i = 0; i < want; ++i) { + keys.push_back(MakeEntryKey(shard, cursor + 1 + i)); + } + std::vector values; + auto ec = m_db->MultiGet(keys, &values, kTimeout, nullptr); + if (ec != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "HeadSyncLog::ReadSince shard=%d MultiGet failed (%d)\n", + shard, (int)ec); + return out; + } + for (size_t i = 0; i < values.size(); ++i) { + if (values[i].empty()) break; // writer lag; stop here + VersionedEntry ve; + ve.version = cursor + 1 + i; + if (!DecodeEntry(values[i], ve.entry)) break; + out.push_back(std::move(ve)); + } + return out; + } + + // Cursor I/O for a (node, shard) pair. + std::uint64_t LoadCursor(int shard) const { + if (!m_db) return 0; + std::string out; + auto ec = m_db->Get(MakeCursorKey(m_nodeIndex, shard), &out, kTimeout, nullptr); + if (ec != ErrorCode::Success || out.size() < sizeof(std::uint64_t)) return 0; + return DecodeUint64(out); + } + + bool StoreCursor(int shard, std::uint64_t version) { + if (!m_db) return false; + auto ec = m_db->Put(MakeCursorKey(m_nodeIndex, shard), + EncodeUint64(version), + kTimeout, nullptr); + return ec == ErrorCode::Success; + } + + // Start a background reconciler that wakes every interval and, for + // each known shard, fetches missing entries since the local cursor + // and feeds them to `apply`. `apply` must be idempotent. + void StartReconciler(std::vector shards, ApplyFn apply) { + if (m_reconciler.joinable()) return; + m_shards = std::move(shards); + m_apply = std::move(apply); + m_stop = false; + m_reconciler = std::thread([this]() { ReconcileLoop(); }); + } + + void Stop() { + { + std::lock_guard lk(m_cvMutex); + m_stop = true; + } + m_cv.notify_all(); + if (m_reconciler.joinable()) m_reconciler.join(); + } + +private: + static constexpr auto kTimeout = std::chrono::microseconds(2'000'000); + + static std::string EncodeUint64(std::uint64_t v) { + std::string s(sizeof(v), '\0'); + memcpy(&s[0], &v, sizeof(v)); + return s; + } + static std::uint64_t DecodeUint64(const std::string& s) { + std::uint64_t v = 0; + if (s.size() >= sizeof(v)) memcpy(&v, s.data(), sizeof(v)); + return v; + } + static std::string MakeVersionKey(int shard) { + return "hs/v/" + std::to_string(shard); + } + static std::string MakeEntryKey(int shard, std::uint64_t version) { + // Big-endian version so byte-range scans (if added later) are + // monotonically sorted. + std::string s = "hs/e/" + std::to_string(shard) + "/"; + char be[8]; + for (int i = 0; i < 8; ++i) be[i] = static_cast((version >> ((7 - i) * 8)) & 0xff); + s.append(be, 8); + return s; + } + static std::string MakeCursorKey(int node, int shard) { + return "hs/c/" + std::to_string(node) + "/" + std::to_string(shard); + } + + static std::string EncodeEntry(const HeadSyncEntry& e) { + std::string s(e.EstimateBufferSize(), '\0'); + std::uint8_t* end = e.Write(reinterpret_cast(&s[0])); + s.resize(static_cast(end - reinterpret_cast(&s[0]))); + return s; + } + static bool DecodeEntry(const std::string& s, HeadSyncEntry& e) { + if (s.empty()) return false; + e.Read(reinterpret_cast(s.data())); + return true; + } + + std::uint64_t LoadLatestVersion(int shard) const { + std::string out; + auto ec = m_db->Get(MakeVersionKey(shard), &out, kTimeout, nullptr); + if (ec != ErrorCode::Success) return 0; + return DecodeUint64(out); + } + + std::mutex& GetShardAppendMutex(int shard) { + std::lock_guard lk(m_appendMutexMapLock); + auto& slot = m_appendMutexes[shard]; + if (!slot) slot = std::make_unique(); + return *slot; + } + + void ReconcileLoop() { + std::unique_lock lk(m_cvMutex); + while (!m_stop) { + lk.unlock(); + for (int shard : m_shards) { + std::uint64_t cursor = LoadCursor(shard); + std::uint64_t latest = LoadLatestVersion(shard); + if (latest <= cursor) continue; + auto entries = ReadSince(shard, cursor, latest); + if (entries.empty()) continue; + std::uint64_t advanced = cursor; + for (const auto& ve : entries) { + if (!m_apply(ve)) break; + advanced = ve.version; + } + if (advanced > cursor) { + StoreCursor(shard, advanced); + } + } + lk.lock(); + m_cv.wait_for(lk, std::chrono::milliseconds(m_reconcileIntervalMs), + [this]() { return m_stop; }); + } + } + + std::shared_ptr m_db; + int m_nodeIndex; + int m_reconcileIntervalMs; + + std::mutex m_appendMutexMapLock; + std::unordered_map> m_appendMutexes; + + std::vector m_shards; + ApplyFn m_apply; + + mutable std::mutex m_cvMutex; + std::condition_variable m_cv; + bool m_stop; + std::thread m_reconciler; +}; + +} // namespace Distributed +} // namespace SPANN +} // namespace SPTAG + +#endif // _SPTAG_SPANN_DISTRIBUTED_HEADSYNCLOG_H_ diff --git a/AnnService/inc/Core/SPANN/Distributed/NetworkNode.h b/AnnService/inc/Core/SPANN/Distributed/NetworkNode.h new file mode 100644 index 000000000..4e11a4b08 --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/NetworkNode.h @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef _SPTAG_SPANN_NETWORKNODE_H_ +#define _SPTAG_SPANN_NETWORKNODE_H_ + +#include "inc/Core/SPANN/Distributed/DistributedProtocol.h" +#include "inc/Core/SPANN/Distributed/ConsistentHashRing.h" +#include "inc/Core/SPANN/Distributed/DispatchCoordinator.h" +#include "inc/Core/SPANN/Distributed/RemotePostingOps.h" +#include "inc/Socket/Client.h" +#include "inc/Socket/Server.h" +#include "inc/Socket/Packet.h" +#include +#include +#include +#include +#include +#include +#include + +namespace SPTAG::SPANN { + + /// Base class providing shared networking infrastructure for all + /// distributed node roles. Manages server/client sockets, peer + /// connections, consistent hash ring storage, and a background + /// connection maintenance thread. + /// + /// Subclasses override RegisterHandlers() to wire up their specific + /// packet handlers, and BgProtocolStep() / IsRingSettled() for + /// role-specific background work. + class NetworkNode : public DispatchCoordinator::PeerNetwork, + public RemotePostingOps::NetworkAccess { + public: + NetworkNode() + : m_enabled(false), m_localNodeIndex(-1) {} + + virtual ~NetworkNode() { + m_bgConnectStop.store(true); + if (m_bgConnectThread.joinable()) m_bgConnectThread.join(); + } + + /// Initialize shared networking state. + bool InitializeNetwork( + int localNodeIdx, + const std::vector>& nodeAddrs, + int vnodeCount = 150) + { + if (nodeAddrs.empty() || localNodeIdx < 0 || + localNodeIdx >= static_cast(nodeAddrs.size())) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "NetworkNode::Initialize invalid config: %d nodes, localIdx=%d\n", + (int)nodeAddrs.size(), localNodeIdx); + return false; + } + + m_localNodeIndex = localNodeIdx; + m_nodeAddrs = nodeAddrs; + m_vnodeCount = vnodeCount; + + // Start with empty hash ring + std::atomic_store(&m_hashRing, + std::shared_ptr( + std::make_shared(vnodeCount))); + + m_enabled = true; + return true; + } + + /// Start server + client + background connection thread. + /// Subclasses must have called InitializeNetwork() first. + /// Each node listens on its own address from the combined address list. + bool StartNetwork() { + if (!m_enabled) return false; + + // Pre-size m_peerConnections BEFORE the server is started — the + // server's handler threads can dispatch packets immediately on + // bind, and inbound handlers (e.g. HandleRingUpdate -> + // SendRingUpdateACK) call GetPeerConnection which indexes into + // m_peerConnections. Resizing here closes a startup race that + // could segfault when an early peer (typically the dispatcher + // sending the initial RingUpdate) won the race. + m_peerConnections.resize(m_nodeAddrs.size(), Socket::c_invalidConnectionID); + + // --- Client side --- + // Construct the Socket::Client BEFORE starting the + // server. Server handlers (notably HeadSync receiver / ring + // update) can fire as soon as the listening socket accepts a + // peer, and they may call ConnectToPeer → m_client-> + // ConnectToServer. If m_client is still null at that point, + // the call dereferences a null unique_ptr and segfaults + // (Pre-build "All N connection attempts to node X failed" + // crash). Construct the client first so the handler path is + // safe before any socket can be accepted. + Socket::PacketHandlerMapPtr clientHandlers(new Socket::PacketHandlerMap); + RegisterClientHandlers(clientHandlers); + + m_client.reset(new Socket::Client(clientHandlers, 8, 30)); + + // --- Server side --- + { + Socket::PacketHandlerMapPtr serverHandlers(new Socket::PacketHandlerMap); + RegisterServerHandlers(serverHandlers); + + const auto& localAddr = m_nodeAddrs[m_localNodeIndex]; + m_server.reset(new Socket::Server( + localAddr.first, localAddr.second, serverHandlers, 8)); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "NetworkNode server listening on %s:%s\n", + localAddr.first.c_str(), localAddr.second.c_str()); + } + + // --- Background thread --- + m_bgConnectStop.store(false); + m_bgConnectThread = std::thread([this]() { + int numNodes = static_cast(m_nodeAddrs.size()); + int delayMs = 500; + while (!m_bgConnectStop.load()) { + bool allConnected = true; + for (int i = 0; i < numNodes; i++) { + if (i == m_localNodeIndex) continue; + { + std::lock_guard lock(m_connMutex); + if (m_peerConnections[i] != Socket::c_invalidConnectionID) + continue; + } + allConnected = false; + ConnectToPeer(i, 1, 0); + } + + BgProtocolStep(); + + if (allConnected && IsRingSettled()) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "NetworkNode: All peers connected and ring synchronized\n"); + break; + } + std::this_thread::sleep_for(std::chrono::milliseconds(delayMs)); + delayMs = std::min(delayMs + 500, 5000); + } + }); + + return true; + } + + // ---- PeerNetwork + NetworkAccess interface ---- + // + // GetLocalNodeIndex() / GetNumNodes() use NETWORK-SLOT semantics: + // m_nodeAddrs is the flat address table indexed by internal slot + // (slot 0 = dispatcher, slots 1..N = workers). These are the + // values used for raw socket connections and dispatch routing. + // + // For COMPUTE-WORKER semantics (VID interleaving, version-map + // sizing, hash-ring partitioning), use GetNumWorkerNodes() / + // GetWorkerNodeIndex() instead — those exclude the dispatcher + // and use 0-indexed worker shard numbering. Mixing the two + // produces off-by-one shard math + // (AllocateGlobalVID maps to the wrong globalVID range). + + int GetLocalNodeIndex() const override { return m_localNodeIndex; } + + int GetNumNodes() const override { + return static_cast(m_nodeAddrs.size()); + } + + // ---- Compute-role accessors ---- + // + // These describe the LOGICAL cluster composition independent of + // the network slot layout. Subclasses populate the m_num*Nodes / + // m_workerNodeIndex fields during Initialize(). + // + // Use these (NOT GetNumNodes / GetLocalNodeIndex) for: + // * AllocateGlobalVID interleaving math + // * Version-map cross-node bound sizing + // * AddIDCapacity growth multiplier + // * Any "how many shards are storing user data?" question + + int GetNumWorkerNodes() const { return m_numWorkerNodes; } + int GetNumDispatchNodes() const { return m_numDispatchNodes; } + + /// 0-indexed compute-shard position for this node, or -1 if this + /// node is dispatcher-only (has no local data shard). + int GetWorkerNodeIndex() const { return m_workerNodeIndex; } + + Socket::ConnectionID GetPeerConnection(int nodeIndex) override { + { + std::lock_guard lock(m_connMutex); + if (m_peerConnections[nodeIndex] != Socket::c_invalidConnectionID) + return m_peerConnections[nodeIndex]; + } + if (ConnectToPeer(nodeIndex, 5, 1000)) { + std::lock_guard lock(m_connMutex); + return m_peerConnections[nodeIndex]; + } + return Socket::c_invalidConnectionID; + } + + void SendPacket(Socket::ConnectionID connID, Socket::Packet&& pkt, + std::function callback) override { + m_client->SendPacket(connID, std::move(pkt), std::move(callback)); + } + + void InvalidatePeerConnection(int nodeIndex) override { + std::lock_guard lock(m_connMutex); + m_peerConnections[nodeIndex] = Socket::c_invalidConnectionID; + } + + Socket::Client* GetClient() override { return m_client.get(); } + Socket::Server* GetServer() override { return m_server.get(); } + + // ---- Shared accessors ---- + + bool IsEnabled() const { return m_enabled; } + + std::shared_ptr GetHashRing() const { + return std::atomic_load(&m_hashRing); + } + + void SetHashRing(std::shared_ptr ring) { + std::atomic_store(&m_hashRing, std::move(ring)); + } + + bool WaitForAllPeersConnected(int timeoutSec = 120) { + if (!m_enabled) return true; + int numNodes = static_cast(m_nodeAddrs.size()); + auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(timeoutSec); + while (std::chrono::steady_clock::now() < deadline) { + bool allConnected = true; + for (int i = 0; i < numNodes; i++) { + if (i == m_localNodeIndex) continue; + std::lock_guard lock(m_connMutex); + if (m_peerConnections[i] == Socket::c_invalidConnectionID) { + allConnected = false; + break; + } + } + if (allConnected) return true; + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "NetworkNode: Timed out waiting for peer connections (%ds)\n", timeoutSec); + return false; + } + + bool ConnectToPeer(int nodeIndex, int maxRetries = 10, int initialDelayMs = 500) { + if (nodeIndex == m_localNodeIndex) return true; + std::pair addr; + { + std::lock_guard lock(m_connMutex); + if (nodeIndex >= static_cast(m_nodeAddrs.size())) return false; + addr = m_nodeAddrs[nodeIndex]; + } + int delayMs = initialDelayMs; + for (int attempt = 1; attempt <= maxRetries; attempt++) { + ErrorCode ec; + auto connID = m_client->ConnectToServer(addr.first, addr.second, ec); + if (ec == ErrorCode::Success) { + std::lock_guard lock(m_connMutex); + m_peerConnections[nodeIndex] = connID; + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "NetworkNode[local=%d]: Connected to node %d (%s:%s), connID=%u (attempt %d)\n", + m_localNodeIndex, nodeIndex, addr.first.c_str(), addr.second.c_str(), connID, attempt); + return true; + } + if (attempt < maxRetries) { + std::this_thread::sleep_for(std::chrono::milliseconds(delayMs)); + delayMs = std::min(delayMs * 2, 5000); + } + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "NetworkNode: All %d connection attempts to node %d failed\n", + maxRetries, nodeIndex); + return false; + } + + protected: + /// Subclasses register their packet handlers here. + virtual void RegisterServerHandlers(Socket::PacketHandlerMapPtr& handlers) = 0; + virtual void RegisterClientHandlers(Socket::PacketHandlerMapPtr& handlers) = 0; + + /// Called each iteration of the bg thread for role-specific protocol work. + virtual void BgProtocolStep() {} + + /// Return true when ring is fully synchronized for this node's role. + virtual bool IsRingSettled() const { return true; } + + bool m_enabled; + int m_localNodeIndex; + int m_vnodeCount = 150; + + // Compute-role accounting. Set by subclass Initialize(). + // m_workerNodeIndex == -1 means this node has no local data shard + // (dispatcher-only role). See GetNumWorkerNodes() / GetWorkerNodeIndex() + // for the rationale on why these are separate from m_nodeAddrs.size(). + int m_numWorkerNodes = 0; + int m_numDispatchNodes = 0; + int m_workerNodeIndex = -1; + + // Consistent hash ring (lock-free RCU: atomic_load to read, copy-on-write to modify) + std::shared_ptr m_hashRing; + std::mutex m_ringWriteMutex; + + // Node addresses + std::vector> m_nodeAddrs; + + // Networking + std::unique_ptr m_server; + std::unique_ptr m_client; + std::mutex m_connMutex; + std::vector m_peerConnections; + + // Background thread + std::thread m_bgConnectThread; + std::atomic m_bgConnectStop{false}; + }; + +} // namespace SPTAG::SPANN + +#endif // _SPTAG_SPANN_NETWORKNODE_H_ diff --git a/AnnService/inc/Core/SPANN/Distributed/RemoteLeaseTable.h b/AnnService/inc/Core/SPANN/Distributed/RemoteLeaseTable.h new file mode 100644 index 000000000..ed95903fd --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/RemoteLeaseTable.h @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// +// RemoteLeaseTable +// ---------------- +// Owner-side bookkeeping for cross-node merge / structural-op locks. +// Each bucket has a TTL-bounded lease AND a monotonically increasing +// fencing token so a zombie holder that resumes after lease expiry has +// its late operations rejected (see Async Job Fault Tolerance in the +// design doc). +// +// API: +// TryAcquire(bucket) -> uint64_t token (0 = denied) +// Validate(bucket, token) -> bool, the held token still matches +// Release(bucket, token) -> bool, only releases if token matches +// IsLocked(bucket) -> bool, auto-clears expired entries +// +// The TTL knob is `RemoteLockTtlMs` in SPANN options (default 30s). +#ifndef _SPTAG_SPANN_DISTRIBUTED_REMOTELEASETABLE_H_ +#define _SPTAG_SPANN_DISTRIBUTED_REMOTELEASETABLE_H_ + +#include +#include +#include +#include + +namespace SPTAG::SPANN { + + class RemoteLeaseTable { + public: + using Clock = std::chrono::steady_clock; + + explicit RemoteLeaseTable(std::size_t bucketCount, int ttlMs = 30000) + : m_count(bucketCount + 1), m_ttlMs(ttlMs) + { + m_expiry = std::make_unique[]>(m_count); + m_tokens = std::make_unique[]>(m_count); + for (std::size_t i = 0; i < m_count; ++i) { + m_expiry[i].store(0, std::memory_order_relaxed); + m_tokens[i].store(0, std::memory_order_relaxed); + } + } + + void SetTtlMs(int ttlMs) { if (ttlMs > 0) m_ttlMs.store(ttlMs, std::memory_order_relaxed); } + int GetTtlMs() const { return m_ttlMs.load(std::memory_order_relaxed); } + + // Try to grant a lease for bucket. Succeeds iff bucket is unlocked + // OR the previous holder's lease has expired (auto-reclamation). + // Returns the fencing token (>= 1) on success, 0 on denial. + std::uint64_t TryAcquire(unsigned bucket) { + if (bucket >= m_count) return 0; + const std::int64_t nowNs = NowNs(); + const std::int64_t ttlNs = (std::int64_t)m_ttlMs.load(std::memory_order_relaxed) * 1'000'000LL; + std::int64_t current = m_expiry[bucket].load(std::memory_order_acquire); + for (;;) { + if (current != 0 && current > nowNs) return 0; // still held by live lease + const std::int64_t newExpiry = nowNs + ttlNs; + if (m_expiry[bucket].compare_exchange_weak(current, newExpiry, + std::memory_order_acq_rel)) { + std::uint64_t tok = m_nextToken.fetch_add(1, std::memory_order_acq_rel) + 1; + m_tokens[bucket].store(tok, std::memory_order_release); + return tok; + } + } + } + + // True iff bucket currently holds `token` AND lease not expired. + bool Validate(unsigned bucket, std::uint64_t token) const { + if (bucket >= m_count || token == 0) return false; + std::int64_t exp = m_expiry[bucket].load(std::memory_order_acquire); + if (exp == 0 || exp <= NowNs()) return false; + return m_tokens[bucket].load(std::memory_order_acquire) == token; + } + + // Release the lease only if the caller's token still matches. + // Late unlocks from a zombie holder whose lease expired (and was + // reacquired by another holder) silently no-op. + bool Release(unsigned bucket, std::uint64_t token) { + if (bucket >= m_count) return false; + std::uint64_t held = m_tokens[bucket].load(std::memory_order_acquire); + if (token == 0 || held != token) return false; + // Clear token first so a concurrent Validate sees the release + // before the expiry window closes. + m_tokens[bucket].store(0, std::memory_order_release); + m_expiry[bucket].store(0, std::memory_order_release); + return true; + } + + // True iff the lease is currently held AND not expired. + bool IsLocked(unsigned bucket) { + if (bucket >= m_count) return false; + std::int64_t current = m_expiry[bucket].load(std::memory_order_acquire); + if (current == 0) return false; + if (current > NowNs()) return true; + std::int64_t expected = current; + if (m_expiry[bucket].compare_exchange_strong(expected, 0, + std::memory_order_acq_rel)) { + m_tokens[bucket].store(0, std::memory_order_release); + } + return false; + } + + private: + static std::int64_t NowNs() { + return std::chrono::duration_cast( + Clock::now().time_since_epoch()).count(); + } + + std::size_t m_count; + std::atomic m_ttlMs; + std::unique_ptr[]> m_expiry; + std::unique_ptr[]> m_tokens; + std::atomic m_nextToken{0}; + }; + +} // namespace SPTAG::SPANN + +#endif // _SPTAG_SPANN_DISTRIBUTED_REMOTELEASETABLE_H_ diff --git a/AnnService/inc/Core/SPANN/Distributed/RemotePostingOps.h b/AnnService/inc/Core/SPANN/Distributed/RemotePostingOps.h new file mode 100644 index 000000000..2c6479571 --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/RemotePostingOps.h @@ -0,0 +1,1894 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include "inc/Core/SPANN/Distributed/DistributedProtocol.h" +#include "inc/Core/SPANN/Distributed/BatchAppendWAL.h" +#include "inc/Helper/ThreadPool.h" +#include "inc/Socket/Client.h" +#include "inc/Socket/Server.h" +#include "inc/Socket/Packet.h" +#include "inc/Socket/SimpleSerialization.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SPTAG::SPANN { + + // Per-thread hook so the SPDKThreadPool's pre-allocated ExtraWorkSpace + // (initialised once per worker thread, see SPDKThreadPool::initSPDK) can + // be reached from inside the AppendCallback lambda without changing the + // callback signature. BatchAppendItemJob::exec(workspace*, abort*) sets + // this before invoking the callback so the callback skips the per-item + // InitWorkSpace allocation / m_freeWorkSpaceIds churn that otherwise + // serialises 10k-item batches into ~130s on the receiver. + inline thread_local void* tls_preallocAppendWorkSpace = nullptr; + + /// Handles all node-to-node RPC mechanics for internal posting operations: + /// - Append / BatchAppend (forward writes to the correct owner node) + /// - HeadSync (broadcast head index changes to peers) + /// - RemoteLock (cross-node locking for merge/split) + /// + /// This class owns the request/response matching state and serialization + /// logic. It is independent of routing decisions — WorkerNode decides + /// *where* to send, RemotePostingOps handles *how*. + class RemotePostingOps { + public: + // fencingToken is forwarded from the request: a nonzero token means + // the caller (Split) holds an authoritative bucket lease and is + // publishing a brand-new head — the callback may resurrect/create + // a missing head in that case. A zero token (ordinary Append) + // must refuse resurrection to avoid racing a concurrent + // Merge/Split that just deleted the head. + using AppendCallback = std::function headVec, + int appendNum, + std::string& appendPosting, + std::uint64_t fencingToken)>; + + // Receiver-side batched callback: deliver a whole BatchRemoteAppend + // request to the searcher so it can group items by head and call + // its native BatchAppend / db->MultiMerge path with ONE TiKV op + // covering N items, instead of unpacking into N pool jobs that + // each issue an individual Merge. Mirrors the local AddIndex + // path which already batches. outSuccess and outFail accumulate + // per-item results so the caller can ACK with the same shape as + // the legacy per-item path. + using BatchAppendCallback = std::function& items, + std::uint32_t& outSuccess, + std::uint32_t& outFail)>; + + using HeadSyncCallback = std::function; + // RemoteLockCallback: + // For Lock op: token argument is 0; returns issued fencing token + // (>=1 on success, 0 on denial). + // For Unlock op: token argument is the previously-issued token; + // returns 1 on accepted release, 0 if the token is + // stale (lease already expired / re-issued). + using RemoteLockCallback = std::function; + // Validator for fenced RemoteAppend: receiver checks the request's + // m_fencingToken against the lease table for headID's bucket. + // Return true to allow the append, false to reject (the response + // will carry Failed status). Unfenced appends (token=0) bypass. + using FenceValidator = std::function; + + /// Callback for cross-node merge: search on a peer node observed + /// that posting `headID` (which we own) looks underfull. The peer + /// sent a fire-and-forget MergeRequest to us; we just schedule the + /// local MergeAsync. Returns nothing; receiver-side m_mergeList + /// already dedupes repeated triggers, so dropped notifications + /// are recoverable on the next observation. + using MergeCallback = std::function; + + /// Abstract interface for network access (implemented by NetworkNode). + class NetworkAccess { + public: + virtual ~NetworkAccess() = default; + virtual Socket::ConnectionID GetPeerConnection(int nodeIndex) = 0; + virtual void InvalidatePeerConnection(int nodeIndex) = 0; + virtual int GetLocalNodeIndex() const = 0; + virtual int GetNumNodes() const = 0; + virtual Socket::Client* GetClient() = 0; + virtual Socket::Server* GetServer() = 0; + }; + + RemotePostingOps() { + StartHeadSyncRetryThread(); + } + + ~RemotePostingOps() { + StopHeadSyncRetryThread(); + } + + RemotePostingOps(const RemotePostingOps&) = delete; + RemotePostingOps& operator=(const RemotePostingOps&) = delete; + + void SetNetwork(NetworkAccess* net) { m_net = net; } + + // RPC tuning. All knobs are configurable via SPANN INI options + // (RemoteAppend{ChunkSize,Retry,TimeoutSec,MaxInflight}). Defaults + // are baked here to keep single-node / unconfigured paths working; + // SPANN::ExtraDynamicSearcher::SetWorker() pushes the option-driven + // values once the index is bound to a worker. + void SetRpcChunkSize(int v) { if (v > 0) m_rpcChunkSize.store(v, std::memory_order_relaxed); } + void SetRpcRetry(int v) { if (v > 0) m_rpcRetry.store(v, std::memory_order_relaxed); } + void SetRpcTimeoutSec(int v) { if (v > 0) m_rpcTimeoutSec.store(v, std::memory_order_relaxed); } + int GetRpcChunkSize() const { return m_rpcChunkSize.load(std::memory_order_relaxed); } + int GetRpcRetry() const { return m_rpcRetry.load(std::memory_order_relaxed); } + int GetRpcTimeoutSec() const { return m_rpcTimeoutSec.load(std::memory_order_relaxed); } + + // Inject the searcher's shared compute pool. Receiver-side BatchAppend + // work runs as Jobs on this pool so it shares a single bounded- + // concurrency budget with local Append/Split/Merge/Reassign (instead + // of a separate bg executor + transient std::threads which over- + // subscribed TiKV). Per-layer: each layer's ExtraDynamicSearcher owns + // its own m_splitThreadPool, so BatchAppend items dispatch by the + // request's m_layer to the matching pool. A single submitter would + // pile both layers' remote appends into whichever pool wired last. + using JobSubmitter = std::function; + void SetJobSubmitter(int layer, JobSubmitter submitter) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + if (m_jobSubmitters.size() <= static_cast(layer)) { + m_jobSubmitters.resize(static_cast(layer) + 1); + } + m_jobSubmitters[layer] = std::move(submitter); + } + + // Receiver-side durable Batch WAL (Option A): when set, every + // incoming BatchRemoteAppendRequest is persisted to the WAL and + // ACKed immediately ("Accepted"); the items are then processed + // asynchronously by the per-layer job submitters and the WAL key + // is deleted on completion. Crash recovery: RecoverPendingBatches + // re-submits any WAL entries that survived a crash. The Append + // callback is idempotent (versionMap dedup), so duplicate replays + // after a crash are safe. + void SetBatchAppendWAL(std::shared_ptr wal) { + std::unique_lock lk(m_callbackLifetimeMutex); + m_batchAppendWAL = std::move(wal); + } + std::shared_ptr GetBatchAppendWAL() const { + std::shared_lock lk(m_callbackLifetimeMutex); + return m_batchAppendWAL; + } + + // Replay any BatchRemoteAppend batches that were durably accepted + // before a previous crash. Call once after the per-layer append + // callbacks + job submitters have been wired. + void RecoverPendingBatches() { + std::shared_ptr wal; + { + std::shared_lock lk(m_callbackLifetimeMutex); + wal = m_batchAppendWAL; + } + if (!wal || !wal->Enabled()) return; + std::vector> entries; + auto ec = wal->Scan(entries); + if (ec != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: BatchAppendWAL scan failed (%d); skipping recovery\n", + (int)ec); + return; + } + if (entries.empty()) return; + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "RemotePostingOps: recovering %zu pending BatchAppend batches from WAL\n", + entries.size()); + for (auto& e : entries) { + auto batchReq = std::make_shared(); + const auto* p = reinterpret_cast(e.second.data()); + if (batchReq->Read(p, static_cast(e.second.size())) == nullptr) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: WAL batchID=%llu parse failed; dropping\n", + (unsigned long long)e.first); + wal->Delete(e.first); + continue; + } + SubmitBatchItems(batchReq, e.first, /*sendResponse=*/false, /*ackPacket=*/nullptr); + } + } + + // Helper: ensure the per-layer registries are wide enough for `layer`. + // Caller must hold m_callbackLifetimeMutex in exclusive mode. + void EnsureLayerSlot_NoLock(int layer) { + if (layer < 0) return; + const size_t needed = static_cast(layer) + 1; + if (m_appendCallbacks.size() < needed) m_appendCallbacks.resize(needed); + if (m_headSyncCallbacks.size() < needed) m_headSyncCallbacks.resize(needed); + if (m_remoteLockCallbacks.size() < needed) m_remoteLockCallbacks.resize(needed); + if (m_mergeCallbacks.size() < needed) m_mergeCallbacks.resize(needed); + if (m_callbackOwners.size() < needed) { + std::vector> grown(needed); + for (size_t i = 0; i < m_callbackOwners.size(); ++i) { + grown[i].store( + m_callbackOwners[i].load(std::memory_order_acquire), + std::memory_order_release); + } + m_callbackOwners = std::move(grown); + } + } + + void SetAppendCallback(int layer, AppendCallback cb) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + m_appendCallbacks[layer] = std::move(cb); + } + void SetBatchAppendCallback(int layer, BatchAppendCallback cb) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + if (m_batchAppendCallbacks.size() < static_cast(layer) + 1) { + m_batchAppendCallbacks.resize(layer + 1); + } + m_batchAppendCallbacks[layer] = std::move(cb); + } + void SetHeadSyncCallback(int layer, HeadSyncCallback cb) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + m_headSyncCallbacks[layer] = std::move(cb); + } + void SetRemoteLockCallback(int layer, RemoteLockCallback cb) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + m_remoteLockCallbacks[layer] = std::move(cb); + } + void SetFenceValidator(int layer, FenceValidator cb) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + if (static_cast(layer) >= m_fenceValidators.size()) { + m_fenceValidators.resize(layer + 1); + } + m_fenceValidators[layer] = std::move(cb); + } + void SetMergeCallback(int layer, MergeCallback cb) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + m_mergeCallbacks[layer] = std::move(cb); + } + + /// Atomically clear ALL callbacks (every layer) and wait for any in-flight + /// callback invocation to finish. Required before the owner of the captured + /// `this` pointer (e.g. ExtraDynamicSearcher) is destroyed, otherwise + /// the lambdas registered via SetXxxCallback would dereference a dangling + /// pointer. + void ClearCallbacks() { + std::unique_lock lk(m_callbackLifetimeMutex); + m_appendCallbacks.clear(); + m_batchAppendCallbacks.clear(); + m_headSyncCallbacks.clear(); + m_remoteLockCallbacks.clear(); + m_mergeCallbacks.clear(); + m_fenceValidators.clear(); + m_callbackOwners = std::vector>(); + } + + /// Claim ownership of the registered callbacks for a SPECIFIC layer. + /// Each ExtraDynamicSearcher owns its own layer slot; per-layer + /// ownership prevents one layer's destructor from wiping another + /// layer's still-valid callbacks (the original 1-layer design used a + /// single ownership token; with Layers>=2 each layer needs its own). + void ClaimCallbackOwnership(int layer, const void* owner) { + std::unique_lock lk(m_callbackLifetimeMutex); + EnsureLayerSlot_NoLock(layer); + m_callbackOwners[layer].store(owner, std::memory_order_release); + } + + /// Clear callbacks for `layer` ONLY if `owner` is the current registered + /// owner of that layer. Used by ExtraDynamicSearcher destructor: each + /// layer's destructor only clears its own slot. Returns true if cleared. + bool ClearCallbacksIfOwner(int layer, const void* owner) { + std::unique_lock lk(m_callbackLifetimeMutex); + if (layer < 0 || static_cast(layer) >= m_callbackOwners.size()) { + return false; + } + if (m_callbackOwners[layer].load(std::memory_order_acquire) != owner) { + return false; + } + m_appendCallbacks[layer] = nullptr; + if (layer >= 0 && static_cast(layer) < m_batchAppendCallbacks.size()) { + m_batchAppendCallbacks[layer] = nullptr; + } + m_headSyncCallbacks[layer] = nullptr; + m_remoteLockCallbacks[layer] = nullptr; + if (layer >= 0 && static_cast(layer) < m_mergeCallbacks.size()) { + m_mergeCallbacks[layer] = nullptr; + } + if (layer >= 0 && static_cast(layer) < m_fenceValidators.size()) { + m_fenceValidators[layer] = nullptr; + } + m_callbackOwners[layer].store(nullptr, std::memory_order_release); + return true; + } + + // ----- internal callback lookup helpers (caller holds shared lock) ----- + const AppendCallback* LookupAppendCallback_Locked(int layer) const { + if (layer < 0 || static_cast(layer) >= m_appendCallbacks.size()) return nullptr; + const auto& cb = m_appendCallbacks[layer]; + return cb ? &cb : nullptr; + } + const BatchAppendCallback* LookupBatchAppendCallback_Locked(int layer) const { + if (layer < 0 || static_cast(layer) >= m_batchAppendCallbacks.size()) return nullptr; + const auto& cb = m_batchAppendCallbacks[layer]; + return cb ? &cb : nullptr; + } + const HeadSyncCallback* LookupHeadSyncCallback_Locked(int layer) const { + if (layer < 0 || static_cast(layer) >= m_headSyncCallbacks.size()) return nullptr; + const auto& cb = m_headSyncCallbacks[layer]; + return cb ? &cb : nullptr; + } + const RemoteLockCallback* LookupRemoteLockCallback_Locked(int layer) const { + if (layer < 0 || static_cast(layer) >= m_remoteLockCallbacks.size()) return nullptr; + const auto& cb = m_remoteLockCallbacks[layer]; + return cb ? &cb : nullptr; + } + const FenceValidator* LookupFenceValidator_Locked(int layer) const { + if (layer < 0 || static_cast(layer) >= m_fenceValidators.size()) return nullptr; + const auto& cb = m_fenceValidators[layer]; + return cb ? &cb : nullptr; + } + // PutPosting/FetchPosting/DeletePosting RPCs lived here historically. + // With shared TiKV every node reads and writes the posting store + // directly (PD routes the key), so the cross-node scatter-gather + // and owner-callback round-trips are unnecessary. + const MergeCallback* LookupMergeCallback_Locked(int layer) const { + if (layer < 0 || static_cast(layer) >= m_mergeCallbacks.size()) return nullptr; + const auto& cb = m_mergeCallbacks[layer]; + return cb ? &cb : nullptr; + } + + // ================================================================== + // Append — single item, synchronous (waits for response) + // ================================================================== + + ErrorCode SendRemoteAppend( + int targetNodeIndex, + int layer, + SizeType headID, + const std::shared_ptr& headVec, + int appendNum, + std::string& appendPosting, + std::uint64_t fencingToken = 0) + { + Socket::ConnectionID connID = m_net->GetPeerConnection(targetNodeIndex); + if (connID == Socket::c_invalidConnectionID) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Cannot connect to node %d for headID %lld\n", + targetNodeIndex, (std::int64_t)headID); + return ErrorCode::Fail; + } + + RemoteAppendRequest req; + req.m_layer = layer; + req.m_headID = headID; + req.m_headVec = *headVec; + req.m_appendNum = appendNum; + req.m_appendPosting = appendPosting; + req.m_fencingToken = fencingToken; + + Socket::ResourceID resID = m_nextResourceId.fetch_add(1); + auto [future, _] = CreatePendingResponse(resID); + (void)_; + + Socket::Packet packet; + packet.Header().m_packetType = Socket::PacketType::AppendRequest; + packet.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + packet.Header().m_connectionID = Socket::c_invalidConnectionID; + packet.Header().m_resourceID = resID; + + auto bodySize = static_cast(req.EstimateBufferSize()); + packet.Header().m_bodyLength = bodySize; + packet.AllocateBuffer(bodySize); + req.Write(packet.Body()); + packet.Header().WriteBuffer(packet.HeaderBuffer()); + + m_net->GetClient()->SendPacket(connID, std::move(packet), + MakeSendFailHandler(resID)); + + // Wait long enough that a successful response is not racing + // the lease TTL. Append timeout == lease TTL deadlocks the + // fence-retry path: when TiKV is backed up and the receiver + // takes ~30 s on a single append, the sender's 30 s timeout + // fires at the same moment the receiver-side lease auto- + // expires. The retry then calls SendRemoteLock again, but + // by the time the request lands another Split has acquired + // the bucket, and the entire 20-attempt budget is spent + // failing to re-acquire. Pick 4 x TTL so that a real + // timeout unambiguously means the lease has been + // recoverable for long enough that any concurrent + // acquisition has had a chance to release; the only + // remaining cause is a hung / crashed peer. + constexpr int kAppendRpcTimeoutSec = 120; + auto status = future.wait_for(std::chrono::seconds(kAppendRpcTimeoutSec)); + if (status == std::future_status::timeout) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Timeout waiting for append response for headID %lld from node %d\n", + (std::int64_t)headID, targetNodeIndex); + ErasePending(resID); + return ErrorCode::Fail; + } + return future.get(); + } + + // ================================================================== + // Append — batch, synchronous with retry + // ================================================================== + + ErrorCode SendBatchRemoteAppend( + int targetNodeIndex, + std::vector& items) + { + if (items.empty()) return ErrorCode::Success; + + // Chunk the batch so a single RPC never exceeds the configured + // chunk size. Large batches (millions of items) cannot be + // processed by the receiver within a single timeout window, + // causing data loss when the request is dropped. Chunking keeps + // each RPC bounded. Tunable via SPANN option + // RemoteAppendChunkSize (default 3000). + const size_t kChunkSize = + std::max(1, (size_t)m_rpcChunkSize.load(std::memory_order_relaxed)); + size_t kept = 0; + std::vector chunk; + chunk.reserve(std::min(kChunkSize, items.size())); + + while (kept < items.size()) { + size_t end = std::min(kept + kChunkSize, items.size()); + chunk.clear(); + chunk.reserve(end - kept); + for (size_t i = kept; i < end; ++i) { + chunk.push_back(std::move(items[i])); + } + + ErrorCode chunkRet = SendBatchRemoteAppendChunk(targetNodeIndex, chunk); + if (chunkRet != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Chunk send failed to node %d (offset=%zu/%zu, chunk=%zu items)\n", + targetNodeIndex, kept, items.size(), end - kept); + // Restore the moved-out items in [kept..end) from the + // still-populated chunk, then drop the already-sent + // prefix [0..kept) so retrying the caller sees only + // the unsent payload. Without this compaction, the + // auto-flush watchdog would resend already-successful + // items whose m_appendPosting/m_headVec strings are + // now empty (moved-out), and the receiver would log + // "empty append posting!" for each such phantom item. + for (size_t i = 0; i < chunk.size() && (kept + i) < items.size(); ++i) { + items[kept + i] = std::move(chunk[i]); + } + if (kept > 0) { + items.erase(items.begin(), items.begin() + kept); + } + return chunkRet; + } + kept = end; + } + // All chunks sent successfully — fully drain the input so any + // caller-side retry sees an empty vector. + items.clear(); + return ErrorCode::Success; + } + + private: + ErrorCode SendBatchRemoteAppendChunk( + int targetNodeIndex, + std::vector& items) + { + if (items.empty()) return ErrorCode::Success; + + const int kMaxAttempts = std::max(1, m_rpcRetry.load(std::memory_order_relaxed)); + const int kTimeoutSec = std::max(1, m_rpcTimeoutSec.load(std::memory_order_relaxed)); + for (int attempt = 0; attempt < kMaxAttempts; attempt++) { + Socket::ConnectionID connID = m_net->GetPeerConnection(targetNodeIndex); + if (connID == Socket::c_invalidConnectionID) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Cannot connect to node %d for batch (%d items, attempt %d)\n", + targetNodeIndex, (int)items.size(), attempt + 1); + if (attempt < kMaxAttempts - 1) continue; + return ErrorCode::Fail; + } + + BatchRemoteAppendRequest batchReq; + batchReq.m_count = static_cast(items.size()); + batchReq.m_items = std::move(items); + + Socket::ResourceID resID = m_nextResourceId.fetch_add(1); + auto [future, _] = CreatePendingResponse(resID); + (void)_; + + Socket::Packet packet; + packet.Header().m_packetType = Socket::PacketType::BatchAppendRequest; + packet.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + packet.Header().m_connectionID = Socket::c_invalidConnectionID; + packet.Header().m_resourceID = resID; + + auto bodySize = static_cast(batchReq.EstimateBufferSize()); + packet.Header().m_bodyLength = bodySize; + packet.AllocateBuffer(bodySize); + batchReq.Write(packet.Body()); + items = std::move(batchReq.m_items); // restore for retry + + packet.Header().WriteBuffer(packet.HeaderBuffer()); + + SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, + "RemotePostingOps: Sending batch of %u appends to node %d (resID=%u, attempt=%d)\n", + batchReq.m_count, targetNodeIndex, resID, attempt + 1); + + auto waitStart = std::chrono::steady_clock::now(); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "RemotePostingOps: BatchAppendChunk -> node %d (resID=%u, attempt=%d, items=%u) wait_start\n", + targetNodeIndex, resID, attempt + 1, batchReq.m_count); + + m_net->GetClient()->SendPacket(connID, std::move(packet), + MakeSendFailHandler(resID)); + + // Wait window comes from SPANN option RemoteAppendTimeoutSec + // (default 180s). Sized so a normal-load chunk (chunk_size + // items at ~10ms TiKV roundtrip / 16 worker threads ≈ tens of + // seconds) completes well under the cap, leaving headroom for + // lock contention with merges/splits. + auto status = future.wait_for(std::chrono::seconds(kTimeoutSec)); + auto waitMs = std::chrono::duration_cast( + std::chrono::steady_clock::now() - waitStart).count(); + if (status == std::future_status::timeout) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Timeout waiting for batch response from node %d (chunk=%u items, attempt=%d, waited=%lldms)\n", + targetNodeIndex, batchReq.m_count, attempt + 1, (long long)waitMs); + ErasePending(resID); + // Do NOT invalidate the connection on timeout — a slow + // response is not a broken connection, and reconnecting + // floods the worker's accept loop. Real connection errors + // are signalled via MakeSendFailHandler (which sets the + // promise to Fail, taking the "result != Success" path + // below). + if (attempt < kMaxAttempts - 1) continue; + return ErrorCode::Fail; + } + + ErrorCode result = future.get(); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "RemotePostingOps: BatchAppendChunk <- node %d (resID=%u, attempt=%d, items=%u, waited=%lldms, result=%d)\n", + targetNodeIndex, resID, attempt + 1, batchReq.m_count, (long long)waitMs, (int)result); + if (result == ErrorCode::Success) return ErrorCode::Success; + + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: Batch to node %d failed (attempt %d), reconnecting...\n", + targetNodeIndex, attempt + 1); + m_net->InvalidatePeerConnection(targetNodeIndex); + } + return ErrorCode::Fail; + } + + public: + + // ================================================================== + // HeadSync — fire-and-forget broadcast + // ================================================================== + + void BroadcastHeadSync(const std::vector& entries) { + if (entries.empty()) return; + + int numNodes = m_net->GetNumNodes(); + int localIdx = m_net->GetLocalNodeIndex(); + + // Count once per peer for sent-entry totals. + std::uint64_t targetCount = 0; + for (int i = 0; i < numNodes; i++) { + if (i != localIdx) targetCount++; + } + m_headSyncBroadcastEntries.fetch_add(entries.size() * targetCount, + std::memory_order_relaxed); + + for (int i = 0; i < numNodes; i++) { + if (i == localIdx) continue; + // Pass a copy of `entries` per peer so each can be re-enqueued + // into its own retry backlog independently on send failure. + SendOneHeadSync(i, std::vector(entries), + /*isRetry=*/false); + } + } + + // Send a HeadSync packet to a single peer. On TCP-level send failure + // (success=false reported by the network stack), the entries are + // appended to the per-peer retry backlog so the background retry + // thread can re-attempt delivery. Counter increments are done + // best-effort once the SendPacket completion lambda fires. + void SendOneHeadSync(int nodeIdx, + std::vector entries, + bool isRetry) + { + if (entries.empty()) return; + + Socket::ConnectionID connID = m_net->GetPeerConnection(nodeIdx); + if (connID == Socket::c_invalidConnectionID) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: HeadSync no connection to node %d (count=%zu, isRetry=%d)\n", + nodeIdx, entries.size(), isRetry ? 1 : 0); + EnqueueHeadSyncRetry(nodeIdx, std::move(entries)); + return; + } + + size_t bodySize = sizeof(std::uint32_t); + for (const auto& e : entries) bodySize += e.EstimateBufferSize(); + + Socket::Packet pkt; + pkt.Header().m_packetType = Socket::PacketType::HeadSyncRequest; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + pkt.Header().m_bodyLength = static_cast(bodySize); + pkt.AllocateBuffer(static_cast(bodySize)); + + std::uint8_t* buf = pkt.Body(); + buf = Socket::SimpleSerialization::SimpleWriteBuffer( + static_cast(entries.size()), buf); + for (const auto& e : entries) buf = e.Write(buf); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + const std::uint64_t sentCount = entries.size(); + std::shared_ptr> entriesShared = + std::make_shared>(std::move(entries)); + const bool wasRetry = isRetry; + + m_net->GetClient()->SendPacket(connID, std::move(pkt), + [this, nodeIdx, entriesShared, sentCount, wasRetry](bool success) { + if (success) { + m_headSyncBroadcastSendOK.fetch_add(sentCount, + std::memory_order_relaxed); + if (wasRetry) { + m_headSyncRetrySucceeded.fetch_add(sentCount, + std::memory_order_relaxed); + } + } else { + m_headSyncBroadcastSendFail.fetch_add(sentCount, + std::memory_order_relaxed); + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: HeadSync send to node %d FAILED " + "(count=%llu, isRetry=%d) — enqueueing for retry\n", + nodeIdx, + (unsigned long long)sentCount, + wasRetry ? 1 : 0); + m_net->InvalidatePeerConnection(nodeIdx); + EnqueueHeadSyncRetry(nodeIdx, std::move(*entriesShared)); + } + }); + } + + void EnqueueHeadSyncRetry(int nodeIdx, std::vector entries) { + if (entries.empty()) return; + auto backlog = GetOrCreateBacklog(nodeIdx); + std::lock_guard g(backlog->mu); + if (backlog->queue.size() + entries.size() > HeadSyncBacklog::kMaxEntries) { + std::uint64_t dropped = entries.size(); + m_headSyncRetryDropped.fetch_add(dropped, std::memory_order_relaxed); + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: HeadSync retry queue full for node %d " + "(queue=%zu, dropping=%llu) — index will diverge!\n", + nodeIdx, backlog->queue.size(), + (unsigned long long)dropped); + return; + } + for (auto& e : entries) backlog->queue.push_back(std::move(e)); + m_headSyncRetryEnqueued.fetch_add(entries.size(), + std::memory_order_relaxed); + } + + // Pull up to maxBatch entries from the per-peer backlog and re-send + // them. Called from the retry thread and on demand. Returns the + // total number of entries dispatched (including for retry-of-retry). + size_t DrainHeadSyncBacklog(size_t maxBatch = 1024) { + if (!m_net) return 0; + std::vector nodeIdxs; + { + std::shared_lock lk(m_headSyncBacklogsMu); + nodeIdxs.reserve(m_headSyncBacklogs.size()); + for (auto& kv : m_headSyncBacklogs) nodeIdxs.push_back(kv.first); + } + size_t dispatched = 0; + for (int nodeIdx : nodeIdxs) { + auto backlog = GetOrCreateBacklog(nodeIdx); + std::vector batch; + { + std::lock_guard g(backlog->mu); + if (backlog->queue.empty()) continue; + size_t bs = std::min(backlog->queue.size(), maxBatch); + batch.reserve(bs); + for (size_t i = 0; i < bs; i++) { + batch.push_back(std::move(backlog->queue.front())); + backlog->queue.pop_front(); + } + } + size_t bs = batch.size(); + SendOneHeadSync(nodeIdx, std::move(batch), /*isRetry=*/true); + dispatched += bs; + } + return dispatched; + } + + size_t GetHeadSyncBacklogSize() const { + size_t total = 0; + std::vector> snapshot; + { + std::shared_lock lk(m_headSyncBacklogsMu); + snapshot.reserve(m_headSyncBacklogs.size()); + for (auto& kv : m_headSyncBacklogs) snapshot.push_back(kv.second); + } + for (auto& b : snapshot) { + std::lock_guard g(b->mu); + total += b->queue.size(); + } + return total; + } + + // Best-effort log dump of HeadSync delivery counters. Use whenever a + // checkpoint is needed (start/end of insert phase, before query, on + // SaveIndex, etc.). + void DumpHeadSyncStats(const char* label) const { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "[HeadSync stats %s] broadcast_entries=%llu send_ok=%llu send_fail=%llu " + "recv_entries=%llu apply_add=%llu apply_del=%llu " + "retry_enqueued=%llu retry_succeeded=%llu retry_dropped=%llu " + "backlog_now=%zu\n", + label ? label : "", + (unsigned long long)m_headSyncBroadcastEntries.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncBroadcastSendOK.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncBroadcastSendFail.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncRecvEntries.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncApplyAdd.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncApplyDelete.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncRetryEnqueued.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncRetrySucceeded.load(std::memory_order_relaxed), + (unsigned long long)m_headSyncRetryDropped.load(std::memory_order_relaxed), + GetHeadSyncBacklogSize()); + } + + // Counters incremented by the receiver-side HandleHeadSyncRequest / + // AddHeadIndex callback. Public so the ExtraDynamicSearcher + // HeadSyncCallback lambda can bump them after applying each entry. + void NoteHeadSyncApplyAdd() { + m_headSyncApplyAdd.fetch_add(1, std::memory_order_relaxed); + } + void NoteHeadSyncApplyDelete() { + m_headSyncApplyDelete.fetch_add(1, std::memory_order_relaxed); + } + + // Best-effort log dump of cross-node merge-hint channel counters. + // Mirrors DumpHeadSyncStats: sender side tracks how many hints we + // broadcast (send_ok / send_fail); receiver side tracks how many + // hints we got and how many were dropped (callback missing). + void DumpMergeRequestStats(const char* label) const { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "[MergeHint stats %s] send_ok=%llu send_fail=%llu " + "recv_hints=%llu recv_dropped=%llu\n", + label ? label : "", + (unsigned long long)m_mergeBroadcastSendOK.load(std::memory_order_relaxed), + (unsigned long long)m_mergeBroadcastSendFail.load(std::memory_order_relaxed), + (unsigned long long)m_mergeRecvHints.load(std::memory_order_relaxed), + (unsigned long long)m_mergeRecvDropped.load(std::memory_order_relaxed)); + } + + // ================================================================== + // RemoteLock — synchronous request/response + // ================================================================== + + // SendRemoteLock: synchronous lock/unlock RPC. + // For Lock (lock=true, token=0): returns issued fencing token, + // 0 on denial/timeout. + // For Unlock (lock=false, token=t): returns 1 on accepted release, + // 0 on rejection/timeout. + std::uint64_t SendRemoteLock(int nodeIndex, int layer, SizeType headID, + bool lock, std::uint64_t token = 0) { + Socket::ConnectionID connID = m_net->GetPeerConnection(nodeIndex); + if (connID == Socket::c_invalidConnectionID) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: Cannot send remote lock to node %d\n", nodeIndex); + return 0; + } + + RemoteLockRequest req; + req.m_op = lock ? RemoteLockRequest::Op::Lock : RemoteLockRequest::Op::Unlock; + req.m_headID = headID; + req.m_layer = layer; + req.m_token = token; + + Socket::ResourceID rid = m_nextResourceId.fetch_add(1); + auto [future, _] = CreatePendingResponse(rid); + (void)_; + + Socket::Packet pkt; + auto bodySize = req.EstimateBufferSize(); + pkt.Header().m_packetType = Socket::PacketType::RemoteLockRequest; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = rid; + pkt.Header().m_bodyLength = static_cast(bodySize); + pkt.AllocateBuffer(static_cast(bodySize)); + req.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + m_net->GetClient()->SendPacket(connID, std::move(pkt), + MakeSendFailHandler(rid)); + + // Wait up to the receiver-side lease TTL (RemoteLeaseTable + // default 30000 ms; see RemoteLeaseTable.h:33). Any lease + // the owner issues for this request auto-expires by the time + // we return, so a late-arriving Grant response on a + // timed-out RPC cannot leave the owner holding an orphaned + // lease that blocks subsequent retries (a problem we + // observed with shorter timeouts during 2-node benchmark + // runs). The receiver sends a response synchronously after + // processing, so the only paths to this timeout are a dead + // peer or a network partition lasting >= TTL -- in both + // cases waiting longer would not have helped anyway. + constexpr int kLockWaitMs = 30000; + auto status = future.wait_for(std::chrono::milliseconds(kLockWaitMs)); + if (status != std::future_status::ready) { + ErasePending(rid); + TakePendingLockToken(rid); + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: Lock timeout for headID %lld on node %d\n", + (std::int64_t)headID, nodeIndex); + return 0; + } + ErrorCode ec = future.get(); + std::uint64_t returnedToken = TakePendingLockToken(rid); + if (ec != ErrorCode::Success) return 0; + // On Unlock the owner returns token=0 but Success status; map + // to a sentinel 1 so callers can distinguish from failure. + return lock ? returnedToken : (returnedToken == 0 ? 1 : returnedToken); + } + + // ================================================================== + // Inbound packet handlers (called by WorkerNode's server/client) + // ================================================================== + + void HandleAppendRequest(Socket::ConnectionID connID, Socket::Packet packet) { + if (packet.Header().m_bodyLength == 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Empty AppendRequest\n"); + return; + } + + if (Socket::c_invalidConnectionID == packet.Header().m_connectionID) + packet.Header().m_connectionID = connID; + + RemoteAppendRequest req; + const std::uint8_t* body = packet.Body(); + const std::uint8_t* bodyEnd = body + packet.Header().m_bodyLength; + if (req.Read(body, bodyEnd) == nullptr) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: AppendRequest version mismatch\n"); + SendAppendResponse(packet, RemoteAppendResponse::Status::Failed); + return; + } + + ErrorCode result = ErrorCode::Fail; + { + std::shared_lock cbLock(m_callbackLifetimeMutex); + // Fence validation: if the request carries a nonzero + // fencing token, the writer claimed they held the remote + // lock for this head when they sent the RPC. Validate + // against our lease table before applying so a zombie + // holder's late write (after its lease expired) is + // rejected. + if (req.m_fencingToken != 0) { + const auto* fv = LookupFenceValidator_Locked(req.m_layer); + if (fv && !(*fv)(req.m_headID, req.m_fencingToken)) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: AppendRequest fencing token " + "%llu rejected for headID %lld (stale lease)\n", + (unsigned long long)req.m_fencingToken, + (std::int64_t)req.m_headID); + SendAppendResponse(packet, RemoteAppendResponse::Status::Failed); + return; + } + } + const auto* cb = LookupAppendCallback_Locked(req.m_layer); + if (cb) { + auto headVec = std::make_shared(std::move(req.m_headVec)); + result = (*cb)( + req.m_headID, headVec, req.m_appendNum, req.m_appendPosting, + req.m_fencingToken); + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: AppendRequest layer=%d has no callback registered\n", + req.m_layer); + } + } + + auto status = (result == ErrorCode::Success) + ? RemoteAppendResponse::Status::Success + : RemoteAppendResponse::Status::Failed; + SendAppendResponse(packet, status); + } + + void HandleAppendResponse(Socket::ConnectionID connID, Socket::Packet packet) { + Socket::ResourceID resID = packet.Header().m_resourceID; + auto promise = TakePendingResponse(resID); + if (!promise) return; + + if (packet.Header().m_processStatus != Socket::PacketProcessStatus::Ok) { + promise->set_value(ErrorCode::Fail); + return; + } + + RemoteAppendResponse resp; + if (resp.Read(packet.Body()) == nullptr) { + promise->set_value(ErrorCode::Fail); + return; + } + + promise->set_value( + resp.m_status == RemoteAppendResponse::Status::Success + ? ErrorCode::Success : ErrorCode::Fail); + } + + void HandleBatchAppendRequest(Socket::ConnectionID connID, Socket::Packet packet) { + if (packet.Header().m_bodyLength == 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Empty BatchAppendRequest\n"); + return; + } + + if (Socket::c_invalidConnectionID == packet.Header().m_connectionID) + packet.Header().m_connectionID = connID; + + auto batchReq = std::make_shared(); + if (batchReq->Read(packet.Body(), packet.Header().m_bodyLength) == nullptr) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: BatchAppendRequest parse failed\n"); + SendBatchAppendResponse(packet, 0, 1); + return; + } + + SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, + "RemotePostingOps: Received batch of %u appends\n", batchReq->m_count); + + const size_t total = batchReq->m_items.size(); + if (total == 0) { + SendBatchAppendResponse(packet, 0, 0); + return; + } + + // Option A path: durable Batch WAL is wired. Persist the batch + // first, then ACK the sender as "Accepted" and process items + // asynchronously. If WAL writes fail we fall through to the + // legacy synchronous-ACK path so the sender still sees an + // honest success/fail count. + // + // Admission control: when the receiver already has more than + // `m_walPendingItemsCap` items queued for asynchronous apply, + // we DELIBERATELY take the legacy synchronous-ACK path even + // though the WAL is wired. That re-engages the natural + // backpressure (sender's MaxInflight blocks until current + // chunks ACK), preventing unbounded pool queue growth on the + // receiver under sustained load. Without this, a fast sender + // could ACK 1M items in seconds while the apply pool is still + // working through the first 10k. + std::shared_ptr wal; + { + std::shared_lock lk(m_callbackLifetimeMutex); + wal = m_batchAppendWAL; + } + const std::size_t pendingNow = m_walPendingItems.load(std::memory_order_relaxed); + const std::size_t cap = m_walPendingItemsCap.load(std::memory_order_relaxed); + const bool overCap = (cap > 0 && pendingNow + total > cap); + if (wal && wal->Enabled() && !m_jobSubmitters.empty() && !overCap) { + std::uint64_t batchID = m_nextBatchID.fetch_add(1, std::memory_order_relaxed); + std::string blob; + blob.resize(batchReq->EstimateBufferSize()); + auto* end = batchReq->Write(reinterpret_cast(&blob[0])); + blob.resize(static_cast( + end - reinterpret_cast(blob.data()))); + if (wal->Put(batchID, blob)) { + m_walPendingItems.fetch_add(total, std::memory_order_relaxed); + SendBatchAppendResponse(packet, + static_cast(total), 0); + SubmitBatchItems(batchReq, batchID, + /*sendResponse=*/false, /*ackPacket=*/nullptr); + return; + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: BatchAppendWAL Put failed batchID=%llu — " + "falling back to synchronous ACK\n", + (unsigned long long)batchID); + } else if (overCap) { + static std::atomic sLogCounter{0}; + if ((sLogCounter.fetch_add(1) % 256) == 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "RemotePostingOps: BatchAppendWAL admission-control engaged " + "(pending=%zu+%zu > cap=%zu) — using synchronous ACK\n", + pendingNow, total, cap); + } + } + + // Legacy / fallback path: process items inline-or-async, ACK on + // the last item completion. Identical to pre-WAL behaviour. + auto packetPtr = std::make_shared(std::move(packet)); + SubmitBatchItems(batchReq, /*batchID=*/0, + /*sendResponse=*/true, packetPtr); + } + + // Submit a BatchAppend request to the local pool for processing. + // Two paths: + // * Batched (preferred): if the searcher registered a + // BatchAppendCallback for the request's layer, dispatch ONE + // Job per layer covering all items for that layer. The + // callback groups by headID and issues db->MultiMerge once, + // matching the local AddIndex throughput profile. + // * Per-item (fallback): legacy path used when no batch + // callback is registered. Creates one Job per item and the + // last one ACKs. + // If sendResponse is true, the LAST completing Job ACKs the + // sender via ackPacket; if false (WAL-backed path), the last Job + // deletes the WAL entry identified by `batchID` instead. + void SubmitBatchItems(std::shared_ptr batchReq, + std::uint64_t batchID, + bool sendResponse, + std::shared_ptr ackPacket) { + const size_t total = batchReq->m_items.size(); + if (total == 0) { + if (sendResponse && ackPacket) SendBatchAppendResponse(*ackPacket, 0, 0); + return; + } + auto successCount = std::make_shared>(0); + auto failCount = std::make_shared>(0); + + if (m_jobSubmitters.empty()) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: no job submitter wired; running BatchAppend synchronously\n"); + std::shared_lock cbLock(m_callbackLifetimeMutex); + for (auto& req : batchReq->m_items) { + ErrorCode r = ErrorCode::Fail; + const auto* cb = LookupAppendCallback_Locked(req.m_layer); + if (cb) { + auto hv = std::make_shared(std::move(req.m_headVec)); + r = (*cb)(req.m_headID, hv, req.m_appendNum, req.m_appendPosting, + req.m_fencingToken); + } + (r == ErrorCode::Success ? *successCount : *failCount).fetch_add(1); + } + if (sendResponse && ackPacket) { + SendBatchAppendResponse(*ackPacket, successCount->load(), failCount->load()); + } + if (!sendResponse && batchID != 0) { + auto w = GetBatchAppendWAL(); + if (w) w->Delete(batchID); + } + return; + } + + // Group item indices by layer. We need the layer split because + // each layer has its own job submitter and its own searcher's + // batch callback. Within a layer all items go to one Job. + std::unordered_map> byLayer; + byLayer.reserve(4); + for (size_t i = 0; i < total; ++i) { + byLayer[batchReq->m_items[i].m_layer].push_back(i); + } + + // Check whether every layer in this request has a batch + // callback registered. If even one is missing we fall back to + // the per-item path for the whole request to keep the + // success/fail accounting consistent with the legacy ACK + // shape (one fetch_add per item). + bool allBatchable = true; + { + std::shared_lock cbLock(m_callbackLifetimeMutex); + for (const auto& kv : byLayer) { + if (!LookupBatchAppendCallback_Locked(kv.first)) { + allBatchable = false; + break; + } + } + } + + if (allBatchable) { + auto remainingLayers = std::make_shared>(byLayer.size()); + for (auto& kv : byLayer) { + int layer = kv.first; + const JobSubmitter* sub = nullptr; + if (layer >= 0 && static_cast(layer) < m_jobSubmitters.size() + && m_jobSubmitters[layer]) { + sub = &m_jobSubmitters[layer]; + } else { + for (auto& s : m_jobSubmitters) { if (s) { sub = &s; break; } } + } + if (sub) { + // Per-layer gauge: this Job represents + // kv.second.size() peer-origin items even though + // it's a single Job. Match item count, not Job + // count, so the gauge stays comparable to the + // per-item-path value. + RemoteOriginPendingSlot(layer).fetch_add(kv.second.size(), + std::memory_order_relaxed); + auto* job = new BatchAppendLayerJob( + this, batchReq, std::move(kv.second), layer, + remainingLayers, successCount, failCount, + ackPacket, sendResponse, batchID); + (*sub)(job); + } else { + failCount->fetch_add(kv.second.size()); + if (remainingLayers->fetch_sub(1) == 1) { + if (sendResponse && ackPacket) { + SendBatchAppendResponse(*ackPacket, + successCount->load(), failCount->load()); + } else if (batchID != 0) { + auto wal = GetBatchAppendWAL(); + if (wal) wal->Delete(batchID); + NoteWalPendingItemsDrained(batchReq->m_items.size()); + } + } + } + } + return; + } + + // Fallback: per-item path (legacy). Used until a searcher + // installs the batch callback (e.g. during early bring-up). + auto remaining = std::make_shared>(total); + for (size_t i = 0; i < total; i++) { + auto* job = new BatchAppendItemJob( + this, batchReq, i, remaining, successCount, failCount, + ackPacket, sendResponse, batchID); + int layer = batchReq->m_items[i].m_layer; + const JobSubmitter* sub = nullptr; + if (layer >= 0 && static_cast(layer) < m_jobSubmitters.size() + && m_jobSubmitters[layer]) { + sub = &m_jobSubmitters[layer]; + } else { + for (auto& s : m_jobSubmitters) { if (s) { sub = &s; break; } } + } + if (sub) { + RemoteOriginPendingSlot(layer).fetch_add(1, std::memory_order_relaxed); + (*sub)(job); + } + else { delete job; failCount->fetch_add(1); remaining->fetch_sub(1); } + } + } + + void HandleBatchAppendResponse(Socket::ConnectionID connID, Socket::Packet packet) { + Socket::ResourceID resID = packet.Header().m_resourceID; + auto promise = TakePendingResponse(resID); + if (!promise) return; + + if (packet.Header().m_processStatus != Socket::PacketProcessStatus::Ok) { + promise->set_value(ErrorCode::Fail); + return; + } + + BatchRemoteAppendResponse resp; + if (resp.Read(packet.Body()) == nullptr) { + promise->set_value(ErrorCode::Fail); + return; + } + + promise->set_value(resp.m_failCount == 0 ? ErrorCode::Success : ErrorCode::Fail); + } + + void HandleHeadSyncRequest(Socket::ConnectionID connID, Socket::Packet packet) { + std::shared_lock cbLock(m_callbackLifetimeMutex); + if (m_headSyncCallbacks.empty()) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: HeadSyncRequest but no callbacks registered\n"); + return; + } + + const std::uint8_t* buf = packet.Body(); + const std::uint8_t* bufEnd = buf + packet.Header().m_bodyLength; + std::uint32_t entryCount = 0; + buf = Socket::SimpleSerialization::SimpleReadBuffer(buf, entryCount); + + std::uint32_t bodyLength = packet.Header().m_bodyLength; + if (bodyLength < sizeof(std::uint32_t) || + entryCount > (bodyLength - sizeof(std::uint32_t)) / 8) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: HeadSyncRequest entryCount=%u exceeds bodyLength=%u\n", + entryCount, bodyLength); + return; + } + + for (std::uint32_t i = 0; i < entryCount; i++) { + if (buf >= bufEnd) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: HeadSync buffer overrun at entry %u/%u\n", i, entryCount); + break; + } + HeadSyncEntry entry; + buf = entry.Read(buf); + if (!buf || buf > bufEnd) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: HeadSync parse error at entry %u/%u\n", i, entryCount); + break; + } + m_headSyncRecvEntries.fetch_add(1, std::memory_order_relaxed); + const auto* cb = LookupHeadSyncCallback_Locked(entry.m_layer); + if (cb) { + (*cb)(entry); + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: HeadSyncEntry layer=%d has no callback registered (op=%d, vid=%d)\n", + entry.m_layer, static_cast(entry.op), (int)entry.headVID); + } + } + } + + // ================================================================== + // Merge — fire-and-forget cross-node hint + // ================================================================== + + /// Send a batch of merge hints to one peer. Fire-and-forget: no + /// response is expected and no retry queue is maintained. Receiver- + /// side m_mergeList dedups, and the owner discovers underfull + /// postings through its own paths (own search, own Append) if any + /// notification is dropped. + void SendBatchRemoteMerge(int targetNodeIndex, + const std::vector& items) + { + if (items.empty()) return; + + Socket::ConnectionID connID = m_net->GetPeerConnection(targetNodeIndex); + if (connID == Socket::c_invalidConnectionID) { + m_mergeBroadcastSendFail.fetch_add(items.size(), std::memory_order_relaxed); + return; + } + + BatchRemoteMergeRequest batch; + batch.m_count = static_cast(items.size()); + batch.m_items = items; + + Socket::Packet pkt; + pkt.Header().m_packetType = Socket::PacketType::MergeRequest; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + + auto bodySize = static_cast(batch.EstimateBufferSize()); + pkt.Header().m_bodyLength = bodySize; + pkt.AllocateBuffer(bodySize); + batch.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + const std::uint64_t sentCount = items.size(); + m_net->GetClient()->SendPacket(connID, std::move(pkt), + [this, targetNodeIndex, sentCount](bool success) { + if (success) { + m_mergeBroadcastSendOK.fetch_add(sentCount, std::memory_order_relaxed); + } else { + m_mergeBroadcastSendFail.fetch_add(sentCount, std::memory_order_relaxed); + m_net->InvalidatePeerConnection(targetNodeIndex); + } + }); + } + + void HandleMergeRequest(Socket::ConnectionID connID, Socket::Packet packet) { + (void)connID; + BatchRemoteMergeRequest batch; + if (batch.Read(packet.Body(), packet.Header().m_bodyLength) == nullptr) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: MergeRequest parse failed (bodyLength=%u)\n", + packet.Header().m_bodyLength); + return; + } + + std::shared_lock cbLock(m_callbackLifetimeMutex); + for (const auto& item : batch.m_items) { + const auto* cb = LookupMergeCallback_Locked(item.m_layer); + if (cb) { + (*cb)(item.m_headID); + m_mergeRecvHints.fetch_add(1, std::memory_order_relaxed); + } else { + m_mergeRecvDropped.fetch_add(1, std::memory_order_relaxed); + } + } + } + + void HandleRemoteLockRequest(Socket::ConnectionID connID, Socket::Packet packet) { + RemoteLockRequest req; + if (req.Read(packet.Body()) == nullptr) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "RemotePostingOps: Failed to parse RemoteLockRequest\n"); + return; + } + + RemoteLockResponse resp; + resp.m_status = RemoteLockResponse::Status::Denied; + resp.m_token = 0; + + { + std::shared_lock cbLock(m_callbackLifetimeMutex); + const auto* cb = LookupRemoteLockCallback_Locked(req.m_layer); + if (cb) { + bool isLock = (req.m_op == RemoteLockRequest::Op::Lock); + std::uint64_t out = (*cb)(req.m_headID, isLock, req.m_token); + if (out != 0) { + resp.m_status = RemoteLockResponse::Status::Granted; + resp.m_token = isLock ? out : 0; + } + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: RemoteLockRequest layer=%d has no callback registered\n", + req.m_layer); + } + } + + Socket::Packet ret; + auto bodySize = resp.EstimateBufferSize(); + ret.Header().m_packetType = Socket::PacketType::RemoteLockResponse; + ret.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + ret.Header().m_connectionID = connID; + ret.Header().m_resourceID = packet.Header().m_resourceID; + ret.Header().m_bodyLength = static_cast(bodySize); + ret.AllocateBuffer(static_cast(bodySize)); + resp.Write(ret.Body()); + ret.Header().WriteBuffer(ret.HeaderBuffer()); + + m_net->GetServer()->SendPacket(connID, std::move(ret), nullptr); + } + + void HandleRemoteLockResponse(Socket::ConnectionID connID, Socket::Packet packet) { + Socket::ResourceID rid = packet.Header().m_resourceID; + auto promise = TakePendingResponse(rid); + if (!promise) return; + + RemoteLockResponse resp; + if (resp.Read(packet.Body()) == nullptr) { + promise->set_value(ErrorCode::Fail); + return; + } + + // Stash the issued fencing token so SendRemoteLock can pick + // it up after the future signals. + if (resp.m_status == RemoteLockResponse::Status::Granted && resp.m_token != 0) { + std::lock_guard lk(m_pendingLockTokensMutex); + m_pendingLockTokens[rid] = resp.m_token; + } + + promise->set_value(resp.m_status == RemoteLockResponse::Status::Granted + ? ErrorCode::Success : ErrorCode::Fail); + } + + // ---- Response matching helpers ---- + + std::pair, bool> CreatePendingResponse(Socket::ResourceID resID) { + std::promise promise; + auto future = promise.get_future(); + std::lock_guard lock(m_pendingMutex); + m_pendingResponses.emplace(resID, std::move(promise)); + return {std::move(future), true}; + } + + void ErasePending(Socket::ResourceID resID) { + std::lock_guard lock(m_pendingMutex); + m_pendingResponses.erase(resID); + } + + std::uint64_t TakePendingLockToken(Socket::ResourceID rid) { + std::lock_guard lk(m_pendingLockTokensMutex); + auto it = m_pendingLockTokens.find(rid); + if (it == m_pendingLockTokens.end()) return 0; + std::uint64_t tok = it->second; + m_pendingLockTokens.erase(it); + return tok; + } + + /// Take a pending promise out of the map (returns nullptr if not found). + std::unique_ptr> TakePendingResponse(Socket::ResourceID resID) { + std::lock_guard lock(m_pendingMutex); + auto it = m_pendingResponses.find(resID); + if (it == m_pendingResponses.end()) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "RemotePostingOps: Response for unknown resourceID %u\n", resID); + return nullptr; + } + auto p = std::make_unique>(std::move(it->second)); + m_pendingResponses.erase(it); + return p; + } + + /// Create a send-failure callback that resolves the pending promise. + std::function MakeSendFailHandler(Socket::ResourceID resID) { + return [resID, this](bool success) { + if (!success) { + std::lock_guard lock(m_pendingMutex); + auto it = m_pendingResponses.find(resID); + if (it != m_pendingResponses.end()) { + it->second.set_value(ErrorCode::Fail); + m_pendingResponses.erase(it); + } + } + }; + } + + void SendAppendResponse(Socket::Packet& srcPacket, RemoteAppendResponse::Status status) { + RemoteAppendResponse resp; + resp.m_status = status; + + Socket::Packet ret; + ret.Header().m_packetType = Socket::PacketType::AppendResponse; + ret.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + ret.Header().m_connectionID = srcPacket.Header().m_connectionID; + ret.Header().m_resourceID = srcPacket.Header().m_resourceID; + + auto bodySize = static_cast(resp.EstimateBufferSize()); + ret.Header().m_bodyLength = bodySize; + ret.AllocateBuffer(bodySize); + resp.Write(ret.Body()); + ret.Header().WriteBuffer(ret.HeaderBuffer()); + + m_net->GetServer()->SendPacket(srcPacket.Header().m_connectionID, std::move(ret), nullptr); + } + + void SendBatchAppendResponse(Socket::Packet& srcPacket, + std::uint32_t successCount, std::uint32_t failCount) { + BatchRemoteAppendResponse resp; + resp.m_successCount = successCount; + resp.m_failCount = failCount; + + Socket::Packet ret; + ret.Header().m_packetType = Socket::PacketType::BatchAppendResponse; + ret.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + ret.Header().m_connectionID = srcPacket.Header().m_connectionID; + ret.Header().m_resourceID = srcPacket.Header().m_resourceID; + + auto bodySize = static_cast(resp.EstimateBufferSize()); + ret.Header().m_bodyLength = bodySize; + ret.AllocateBuffer(bodySize); + resp.Write(ret.Body()); + ret.Header().WriteBuffer(ret.HeaderBuffer()); + + m_net->GetServer()->SendPacket(srcPacket.Header().m_connectionID, std::move(ret), nullptr); + } + + // ================================================================== + // [Bug 26] Background executor — slow-lane for batch RPC handlers + // ================================================================== + // + // Why: the network server thread pool has only 8 threads + // (NetworkNode.h). HandleBatchAppendRequest does heavy TiKV work + // (fan out to 4 sub-workers and join), each call tying up its + // network thread for tens of seconds during inserts. + // Once 4–8 such handlers run concurrently, every network thread is + // blocked and latency-sensitive RPCs (HeadSync, RemoteLock) cannot be + // serviced. + // + // Fix: parse on the network thread (fast), then enqueue the heavy + // work onto a dedicated background thread pool and return. The + // network thread immediately becomes available for other RPCs. + // The background worker eventually sends the response itself. + // + // Sizing rationale: + // - Threads default to 8: matches the network pool so we never + // under-utilize CPU even if every network thread is parsing a + // batch. Tunable via env SPTAG_BG_EXEC_THREADS. + // - Queue cap default 256: plenty of headroom for typical bursts; + // when full, falls back to synchronous execution to preserve + // correctness rather than dropping requests. + + // Background executor removed: BatchAppend now runs as sub-Jobs on + // the searcher's shared compute pool via SetJobSubmitter() so it + // shares a single concurrency budget with local Split/Merge/Reassign + // (with high-priority jumping the queue). See HandleBatchAppendRequest. + + // ================================================================== + // HeadSync retry thread — periodic best-effort drain of per-peer + // backlogs that were populated by failed BroadcastHeadSync sends. + // + // Why: BroadcastHeadSync is fire-and-forget by design (we don't + // want to block the layer-1 split path on a slow peer). When the + // TCP send completion reports failure, we previously dropped the + // entries forever and the peer's headIndex / m_pSamples diverged, + // causing the receiver's BKTree to miss heads at search time and + // recall to collapse on later batches. The retry queue + this + // thread make HeadSync delivery reliable best-effort. + // ================================================================== + + struct HeadSyncBacklog { + std::mutex mu; + std::deque queue; + // Matches m_addCountForRebuild scale per peer. If we ever hit + // this we log + drop (fall back to manual reconcile). + static constexpr size_t kMaxEntries = 1u << 18; // 262144 + }; + + void StartHeadSyncRetryThread() { + const char* envIntervalMs = std::getenv("SPTAG_HEADSYNC_RETRY_INTERVAL_MS"); + int intervalMs = 500; + if (envIntervalMs) { + try { intervalMs = std::max(50, std::stoi(envIntervalMs)); } catch (...) {} + } + m_headSyncRetryIntervalMs = intervalMs; + m_headSyncRetryStop.store(false, std::memory_order_release); + m_headSyncRetryThread = std::thread([this]() { HeadSyncRetryLoop(); }); + } + + void StopHeadSyncRetryThread() { + m_headSyncRetryStop.store(true, std::memory_order_release); + if (m_headSyncRetryThread.joinable()) m_headSyncRetryThread.join(); + } + + void HeadSyncRetryLoop() { + using namespace std::chrono; + while (!m_headSyncRetryStop.load(std::memory_order_acquire)) { + std::this_thread::sleep_for(milliseconds(m_headSyncRetryIntervalMs)); + if (m_net) DrainHeadSyncBacklog(); + } + // Final drain pass to give the network a chance to flush. + for (int i = 0; i < 5 && m_net; i++) { + size_t dispatched = DrainHeadSyncBacklog(); + if (dispatched == 0) break; + std::this_thread::sleep_for(milliseconds(200)); + } + if (m_headSyncBroadcastEntries.load(std::memory_order_relaxed) > 0 + || m_headSyncRecvEntries.load(std::memory_order_relaxed) > 0) { + DumpHeadSyncStats("shutdown"); + } + if (m_mergeBroadcastSendOK.load(std::memory_order_relaxed) > 0 + || m_mergeRecvHints.load(std::memory_order_relaxed) > 0) { + DumpMergeRequestStats("shutdown"); + } + } + + std::shared_ptr GetOrCreateBacklog(int nodeIdx) { + { + std::shared_lock lk(m_headSyncBacklogsMu); + auto it = m_headSyncBacklogs.find(nodeIdx); + if (it != m_headSyncBacklogs.end()) return it->second; + } + std::unique_lock lk(m_headSyncBacklogsMu); + auto& slot = m_headSyncBacklogs[nodeIdx]; + if (!slot) slot = std::make_shared(); + return slot; + } + + // ---- State ---- + + NetworkAccess* m_net = nullptr; + + // RPC tuning knobs. See SetRpcChunkSize/Retry/TimeoutSec. Defaults + // match historical hardcoded values; overridden via SPANN options + // by ExtraDynamicSearcher::SetWorker(). Stored as atomics so the + // batch sender can read them lock-free. + std::atomic m_rpcChunkSize{3000}; + std::atomic m_rpcRetry{3}; + std::atomic m_rpcTimeoutSec{180}; + + // Per-layer callback registries. Indexed by ExtraDynamicSearcher layer + // (m_layer at the call site). Resized lazily by SetXxxCallback. The + // empty/null entry at layer 0 is preserved so a single-layer caller + // (legacy or test) without explicit Set keeps the no-op default. + // + // The shared-callback design existed because the original SPANN had + // a single ExtraDynamicSearcher (Layers=1). With Layers>=2, each + // layer's lambda captures its own `this` (hence m_layer) and dispatch + // by request.m_layer is required to avoid routing layer-0 events to + // layer-1's storage and vice versa. + std::vector m_appendCallbacks; + std::vector m_batchAppendCallbacks; + std::vector m_headSyncCallbacks; + std::vector m_remoteLockCallbacks; + std::vector m_mergeCallbacks; + std::vector m_fenceValidators; + + // Per-layer ownership tokens. Each ExtraDynamicSearcher claims its + // layer slot at SetWorker time and releases it on destruction; this + // prevents earlier-layer destructors from wiping a later-layer's + // callbacks (the original ClaimCallbackOwnership purpose, now + // applied per-layer instead of globally). + std::vector> m_callbackOwners; + + // Guards the lifetime of the captured `this` inside the callbacks. + // Held in shared mode by every callback invocation site, and in + // exclusive mode by ClearCallbacks() / SetXxxCallback() so that + // (re)assigning a callback can never race with an in-flight invocation. + mutable std::shared_timed_mutex m_callbackLifetimeMutex; + + std::atomic m_nextResourceId{1}; + std::mutex m_pendingMutex; + std::unordered_map> m_pendingResponses; + + // Side table populated by HandleRemoteLockResponse: maps the + // outstanding RPC resource id to the fencing token returned by + // the owner. SendRemoteLock reads this immediately after the + // future signals to retrieve the token without needing to widen + // the m_pendingResponses promise type (which is shared with the + // Append/HeadSync RPCs). + std::mutex m_pendingLockTokensMutex; + std::unordered_map m_pendingLockTokens; + + // Per-LAYER Job: a single Job processes ALL items for one layer + // from a BatchRemoteAppend RPC. Calls the searcher's batched + // callback (BatchAppendCallback) which groups items by headID and + // issues ONE db->MultiMerge instead of N individual Merges -- + // mirrors the local AddIndex BatchAppend path so receiver-side + // throughput matches sender-side. Replaces the legacy + // BatchAppendItemJob fan-out (one Job per item) when the searcher + // has registered a batch callback; otherwise the per-item path is + // still used as a fallback. + class BatchAppendLayerJob : public Helper::ThreadPool::Job { + public: + BatchAppendLayerJob(RemotePostingOps* ops, + std::shared_ptr batchReq, + std::vector indices, + int layer, + std::shared_ptr> remainingLayers, + std::shared_ptr> successCount, + std::shared_ptr> failCount, + std::shared_ptr replyPacket, + bool sendResponse, + std::uint64_t batchID) + : m_ops(ops), m_batchReq(std::move(batchReq)), + m_indices(std::move(indices)), m_layer(layer), + m_remaining(std::move(remainingLayers)), + m_success(std::move(successCount)), + m_fail(std::move(failCount)), + m_replyPacket(std::move(replyPacket)), + m_sendResponse(sendResponse), + m_batchID(batchID) {} + + void exec(IAbortOperation*) override { run(); } + void exec(void* workspace, IAbortOperation*) override { + void* prev = tls_preallocAppendWorkSpace; + tls_preallocAppendWorkSpace = workspace; + run(); + tls_preallocAppendWorkSpace = prev; + } + + private: + void run() { + std::vector items; + items.reserve(m_indices.size()); + for (size_t idx : m_indices) { + items.push_back(&m_batchReq->m_items[idx]); + } + + std::uint32_t succ = 0, fail = 0; + { + std::shared_lock cbLock(m_ops->m_callbackLifetimeMutex); + const auto* cb = m_ops->LookupBatchAppendCallback_Locked(m_layer); + if (cb) { + (*cb)(items, succ, fail); + } else { + // Searcher detached between dispatch and run; mark + // everything as failed so the sender can retry. + fail = static_cast(items.size()); + } + } + m_success->fetch_add(succ); + m_fail->fetch_add(fail); + // Decrement per-layer remote-origin gauge by the count of + // items this job represents (paired with the matching + // increment in SubmitBatchItems). + { + auto& slot = m_ops->RemoteOriginPendingSlot(m_layer); + std::size_t toSub = m_indices.size(); + std::size_t prev = slot.fetch_sub(toSub, std::memory_order_relaxed); + if (prev < toSub) slot.store(0, std::memory_order_relaxed); + } + if (m_remaining->fetch_sub(1) == 1) { + if (m_sendResponse && m_replyPacket) { + m_ops->SendBatchAppendResponse( + *m_replyPacket, m_success->load(), m_fail->load()); + } else if (m_batchID != 0) { + auto wal = m_ops->GetBatchAppendWAL(); + if (wal) wal->Delete(m_batchID); + m_ops->NoteWalPendingItemsDrained(m_batchReq->m_items.size()); + } + } + } + + RemotePostingOps* m_ops; + std::shared_ptr m_batchReq; + std::vector m_indices; + int m_layer; + std::shared_ptr> m_remaining; + std::shared_ptr> m_success; + std::shared_ptr> m_fail; + std::shared_ptr m_replyPacket; + bool m_sendResponse; + std::uint64_t m_batchID; + }; + + // Per-item Job: each remote append request becomes one Job submitted + // to the searcher's shared SPDKThreadPool. The last completing Job + // ACKs the sender. Identical to how a local insert thread would call + // Append; the only difference is the request originated on a peer. + class BatchAppendItemJob : public Helper::ThreadPool::Job { + public: + BatchAppendItemJob(RemotePostingOps* ops, + std::shared_ptr batchReq, + size_t index, + std::shared_ptr> remaining, + std::shared_ptr> successCount, + std::shared_ptr> failCount, + std::shared_ptr replyPacket, + bool sendResponse = true, + std::uint64_t batchID = 0) + : m_ops(ops), m_batchReq(std::move(batchReq)), m_index(index), + m_remaining(std::move(remaining)), + m_success(std::move(successCount)), + m_fail(std::move(failCount)), + m_replyPacket(std::move(replyPacket)), + m_sendResponse(sendResponse), + m_batchID(batchID) {} + + void exec(IAbortOperation*) override { run(); } + void exec(void* workspace, IAbortOperation*) override { + void* prev = tls_preallocAppendWorkSpace; + tls_preallocAppendWorkSpace = workspace; + run(); + tls_preallocAppendWorkSpace = prev; + } + + private: + void run() { + { + std::shared_lock cbLock(m_ops->m_callbackLifetimeMutex); + auto& req = m_batchReq->m_items[m_index]; + ErrorCode r = ErrorCode::Fail; + const auto* cb = m_ops->LookupAppendCallback_Locked(req.m_layer); + if (cb) { + auto hv = std::make_shared(std::move(req.m_headVec)); + r = (*cb)(req.m_headID, hv, req.m_appendNum, req.m_appendPosting, + req.m_fencingToken); + } + if (r == ErrorCode::Success) m_success->fetch_add(1); + else m_fail->fetch_add(1); + } + // Decrement per-layer remote-origin pool gauge for every + // completed item (paired with increment in SubmitBatchItems). + { + int layer = m_batchReq->m_items[m_index].m_layer; + auto& slot = m_ops->RemoteOriginPendingSlot(layer); + std::size_t prev = slot.fetch_sub(1, std::memory_order_relaxed); + if (prev == 0) slot.store(0, std::memory_order_relaxed); // saturating + } + if (m_remaining->fetch_sub(1) == 1) { + if (m_sendResponse && m_replyPacket) { + m_ops->SendBatchAppendResponse( + *m_replyPacket, m_success->load(), m_fail->load()); + } else if (m_batchID != 0) { + // WAL path: sender already ACKed at WAL Put time. + // Best-effort delete; recovery scan would harmlessly + // re-apply (Append callback is idempotent). + auto wal = m_ops->GetBatchAppendWAL(); + if (wal) wal->Delete(m_batchID); + m_ops->NoteWalPendingItemsDrained(m_batchReq->m_items.size()); + } + } + } + + RemotePostingOps* m_ops; + std::shared_ptr m_batchReq; + size_t m_index; + std::shared_ptr> m_remaining; + std::shared_ptr> m_success; + std::shared_ptr> m_fail; + std::shared_ptr m_replyPacket; + bool m_sendResponse; + std::uint64_t m_batchID; + }; + + // [Bug 26 retired] bg executor removed — see HandleBatchAppendRequest. + // m_bgWorkers etc were replaced by per-layer job submission into the + // searcher's shared SPDKThreadPool via m_jobSubmitters[layer]. + std::vector m_jobSubmitters; + + // Receiver-side durable Batch WAL: when set, BatchAppendRequest is + // persisted before sender ACK so the receiver can process items + // asynchronously without losing them across a crash. + std::shared_ptr m_batchAppendWAL; + // Monotonic batchID counter (receiver-allocated). Persisted only + // implicitly via the WAL keys themselves; on startup recovery we + // bump past the maximum recovered batchID so live batches don't + // collide with replayed ones. + std::atomic m_nextBatchID{1}; + // Admission control for the WAL-backed path. When the sum of items + // already queued for asynchronous apply plus the incoming batch + // would exceed `m_walPendingItemsCap`, HandleBatchAppendRequest + // falls back to the synchronous-ACK path so the sender's + // MaxInflight gate naturally backpressures further chunks. Cap of + // 0 disables admission control (always WAL when wired). Default is + // ~ChunkSize * MaxInflightPerNode * NumPeers, chosen to absorb one + // round-trip's worth of items without unbounded queue growth. + std::atomic m_walPendingItems{0}; + std::atomic m_walPendingItemsCap{50000}; + + // Per-layer count of items submitted to the local job pool that + // originated from a peer's BatchAppend RPC (covers BOTH the + // WAL-backed and legacy synchronous-ACK paths). Lets the periodic + // progress log split "pending queue" into local-origin RMWs vs + // remote-origin items so operators can tell whether the receiver + // is bottlenecked on its own inserts or on serving peers. Indexed + // by req.m_layer; sized lazily to max observed layer + 1. + mutable std::mutex m_remoteOriginPendingMutex; + std::vector> m_remoteOriginPending; + + std::atomic& RemoteOriginPendingSlot(int layer) { + if (layer < 0) layer = 0; + { + std::lock_guard g(m_remoteOriginPendingMutex); + if (static_cast(layer) >= m_remoteOriginPending.size()) { + std::vector> grown(layer + 1); + for (std::size_t i = 0; i < m_remoteOriginPending.size(); ++i) { + grown[i].store(m_remoteOriginPending[i].load(std::memory_order_relaxed), + std::memory_order_relaxed); + } + m_remoteOriginPending = std::move(grown); + } + } + return m_remoteOriginPending[layer]; + } + + public: + std::size_t GetRemoteOriginPendingItems(int layer) const { + std::lock_guard g(m_remoteOriginPendingMutex); + if (layer < 0 || static_cast(layer) >= m_remoteOriginPending.size()) return 0; + return m_remoteOriginPending[layer].load(std::memory_order_relaxed); + } + // Aggregate across all layers (whole-node view). + std::size_t GetRemoteOriginPendingItems() const { + std::lock_guard g(m_remoteOriginPendingMutex); + std::size_t sum = 0; + for (auto& a : m_remoteOriginPending) sum += a.load(std::memory_order_relaxed); + return sum; + } + void NoteWalPendingItemsDrained(std::size_t n) { + if (n == 0) return; + std::size_t prev = m_walPendingItems.fetch_sub(n, std::memory_order_relaxed); + if (prev < n) { + // Saturating clamp (defensive: should never happen because + // every increment in HandleBatchAppendRequest is paired + // with exactly one decrement in BatchAppendItemJob). + m_walPendingItems.store(0, std::memory_order_relaxed); + } + } + void SetBatchAppendWalPendingItemsCap(std::size_t cap) { + m_walPendingItemsCap.store(cap, std::memory_order_relaxed); + } + std::size_t GetBatchAppendWalPendingItems() const { + return m_walPendingItems.load(std::memory_order_relaxed); + } + private: + + // HeadSync delivery diagnostics + retry queue (v33). Counters give + // observability for sender/receiver gaps; per-peer backlogs + + // retry thread make broadcast reliable best-effort. + std::atomic m_headSyncBroadcastEntries{0}; + std::atomic m_headSyncBroadcastSendOK{0}; + std::atomic m_headSyncBroadcastSendFail{0}; + std::atomic m_headSyncRecvEntries{0}; + std::atomic m_headSyncApplyAdd{0}; + std::atomic m_headSyncApplyDelete{0}; + std::atomic m_headSyncRetryEnqueued{0}; + std::atomic m_headSyncRetrySucceeded{0}; + std::atomic m_headSyncRetryDropped{0}; + + // Cross-node merge hint counters. No retry queue: dropped + // notifications are recoverable since the owner discovers underfull + // postings via its own paths too. + std::atomic m_mergeBroadcastSendOK{0}; + std::atomic m_mergeBroadcastSendFail{0}; + std::atomic m_mergeRecvHints{0}; + std::atomic m_mergeRecvDropped{0}; + + mutable std::shared_timed_mutex m_headSyncBacklogsMu; + std::unordered_map> m_headSyncBacklogs; + std::thread m_headSyncRetryThread; + std::atomic m_headSyncRetryStop{false}; + int m_headSyncRetryIntervalMs{500}; + }; + +} // namespace SPTAG::SPANN diff --git a/AnnService/inc/Core/SPANN/Distributed/SplitWAL.h b/AnnService/inc/Core/SPANN/Distributed/SplitWAL.h new file mode 100644 index 000000000..d083b1790 --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/SplitWAL.h @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef _SPTAG_SPANN_DISTRIBUTED_SPLITWAL_H_ +#define _SPTAG_SPANN_DISTRIBUTED_SPLITWAL_H_ + +#include "inc/Core/Common.h" +#include "inc/Helper/KeyValueIO.h" +#include "inc/Helper/Logging.h" + +#include +#include +#include +#include +#include +#include + +namespace SPTAG { +namespace SPANN { +namespace Distributed { + +// SplitWAL: durable write-ahead log entry for a cross-owner split. +// +// Per the distributed design's Split Happy Path, when a split produces +// two child heads owned by different nodes, the split writes the local +// child via PutPostingToDB and the remote child via the remote queue. +// If either write fails after the other succeeded, a WAL-driven GC job +// must clean up the orphan posting under the partner head. +// +// Key schema: +// wal/split// → encoded SplitWALRecord +// Garbage-collection (background): scan `wal/split/` prefix; if a +// record is older than `kStaleSec` and not marked committed, it +// represents either an in-flight split or a crashed one — issue +// best-effort deletes against both children using the recorded headIDs. +// +// Today this is scaffolding: Begin/Commit hooks should wrap the split's +// cross-owner write path in ExtraDynamicSearcher. GC sweep can run on +// the existing RefineIndex cadence. +class SplitWAL { +public: + enum class Stage : std::uint8_t { + Begin = 0, // both children allocated, neither written + LocalDone = 1, // local write succeeded; remote pending + RemoteDone = 2, // remote write succeeded; local pending + BothDone = 3, // both written; safe to remove WAL + delete src + }; + + struct Record { + std::uint64_t jobID; + SizeType srcHeadID; + SizeType localChildHeadID; + SizeType remoteChildHeadID; + int remoteOwnerNodeIndex; + std::int64_t startTimestampSec; + Stage stage; + + // Wire layout: each field appended sequentially with no padding, + // stage written as a fixed std::uint8_t. Field-by-field memcpy + // avoids leaking uninitialized struct padding into the WAL and + // keeps the encoding stable if fields are reordered in source. + // Field widths still follow the build-config-bound SizeType + // (int32 by default, int64 with -DLARGEVID); a deployment must + // not toggle LARGEVID between WAL writer and reader. + static constexpr std::size_t kEncodedSize = + sizeof(std::uint64_t) /* jobID */ + + sizeof(SizeType) /* srcHeadID */ + + sizeof(SizeType) /* localChildHeadID */ + + sizeof(SizeType) /* remoteChildHeadID */ + + sizeof(int) /* remoteOwnerNodeIndex */ + + sizeof(std::int64_t) /* startTimestampSec */ + + sizeof(std::uint8_t); /* stage */ + + std::string Encode() const { + std::string s(kEncodedSize, '\0'); + std::size_t off = 0; + auto put = [&](const void* src, std::size_t n) { + std::memcpy(&s[off], src, n); + off += n; + }; + put(&jobID, sizeof(jobID)); + put(&srcHeadID, sizeof(srcHeadID)); + put(&localChildHeadID, sizeof(localChildHeadID)); + put(&remoteChildHeadID, sizeof(remoteChildHeadID)); + put(&remoteOwnerNodeIndex, sizeof(remoteOwnerNodeIndex)); + put(&startTimestampSec, sizeof(startTimestampSec)); + std::uint8_t st = static_cast(stage); + put(&st, sizeof(st)); + return s; + } + + bool Decode(const std::string& s) { + if (s.size() < kEncodedSize) return false; + std::size_t off = 0; + auto get = [&](void* dst, std::size_t n) { + std::memcpy(dst, s.data() + off, n); + off += n; + }; + get(&jobID, sizeof(jobID)); + get(&srcHeadID, sizeof(srcHeadID)); + get(&localChildHeadID, sizeof(localChildHeadID)); + get(&remoteChildHeadID, sizeof(remoteChildHeadID)); + get(&remoteOwnerNodeIndex, sizeof(remoteOwnerNodeIndex)); + get(&startTimestampSec, sizeof(startTimestampSec)); + std::uint8_t st = 0; + get(&st, sizeof(st)); + stage = static_cast(st); + return true; + } + }; + + explicit SplitWAL(std::shared_ptr db, int layer = 0) + : m_db(std::move(db)), m_layer(layer) {} + + // Write or update a WAL record. Stage transitions are monotonic. + bool Write(const Record& r) { + if (!m_db) return false; + auto ec = m_db->Put(MakeKey(m_layer, r.srcHeadID, r.jobID), r.Encode(), kTimeout, nullptr); + if (ec != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "SplitWAL::Write head=%lld job=%llu stage=%u failed (%d)\n", + (long long)r.srcHeadID, (unsigned long long)r.jobID, + (unsigned)r.stage, (int)ec); + return false; + } + return true; + } + + // Remove a completed WAL record after both writes succeeded. + bool Clear(SizeType srcHeadID, std::uint64_t jobID) { + if (!m_db) return false; + std::vector k{ MakeKey(m_layer, srcHeadID, jobID) }; + return m_db->MultiDelete(k, kTimeout) == ErrorCode::Success; + } + + static std::string MakeKey(int layer, SizeType srcHeadID, std::uint64_t jobID) { + return "wal/split/" + std::to_string(layer) + "/" + + std::to_string(srcHeadID) + "/" + std::to_string(jobID); + } + +private: + static constexpr auto kTimeout = std::chrono::microseconds(2'000'000); + std::shared_ptr m_db; + int m_layer = 0; +}; + +} // namespace Distributed +} // namespace SPANN +} // namespace SPTAG + +#endif // _SPTAG_SPANN_DISTRIBUTED_SPLITWAL_H_ diff --git a/AnnService/inc/Core/SPANN/Distributed/WorkerNode.h b/AnnService/inc/Core/SPANN/Distributed/WorkerNode.h new file mode 100644 index 000000000..77a251262 --- /dev/null +++ b/AnnService/inc/Core/SPANN/Distributed/WorkerNode.h @@ -0,0 +1,780 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef _SPTAG_SPANN_WORKERNODE_H_ +#define _SPTAG_SPANN_WORKERNODE_H_ + +#include "inc/Core/SPANN/Distributed/NetworkNode.h" +#include "inc/Core/SPANN/Distributed/AsyncJobWatchdog.h" +#include "inc/Helper/KeyValueIO.h" +#include "inc/Helper/CommonHelper.h" +#include "inc/Socket/SimpleSerialization.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace SPTAG::SPANN { + + /// Distributed compute worker node. + /// + /// Responsibilities: + /// - Route headIDs to owner nodes via consistent hash ring + /// - Queue and flush remote appends (batched RPC) + /// - HeadSync broadcast and remote locking + /// - Register with dispatcher and receive ring updates + /// - Handle incoming dispatch commands from the driver + class WorkerNode : public NetworkNode { + public: + using AppendCallback = RemotePostingOps::AppendCallback; + using BatchAppendCallback = RemotePostingOps::BatchAppendCallback; + using DispatchCallback = DispatchCoordinator::DispatchCallback; + using HeadSyncCallback = RemotePostingOps::HeadSyncCallback; + using RemoteLockCallback = RemotePostingOps::RemoteLockCallback; + using FenceValidator = RemotePostingOps::FenceValidator; + + /// Initialize with separate dispatcher/worker/store addresses. + /// workerIndex is 0-based (0 = driver/local, 1+ = remote). + /// Internal node index = workerIndex + 1 (0 is reserved for dispatcher). + bool Initialize( + std::shared_ptr p_db, + int workerIndex, + const std::pair& dispatcherAddr, + const std::vector>& workerAddrs, + const std::vector& storeAddrs, + int vnodeCount = 150) + { + if (storeAddrs.empty()) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "WorkerNode::Initialize: storeAddrs is empty\n"); + return false; + } + + // Build combined addr list: [dispatcher, worker0, worker1, ...] + std::vector> allAddrs; + allAddrs.push_back(dispatcherAddr); + allAddrs.insert(allAddrs.end(), workerAddrs.begin(), workerAddrs.end()); + + int internalIdx = workerIndex + 1; // 0 = dispatcher, 1..N = workers + if (!InitializeNetwork(internalIdx, allAddrs, vnodeCount)) return false; + + // [Bug 30] Populate compute-role fields so callers can ask + // "how many data shards?" / "which shard am I?" without + // accidentally including the dispatcher slot. + m_numDispatchNodes = 1; + m_numWorkerNodes = static_cast(workerAddrs.size()); + m_workerNodeIndex = workerIndex; + + m_db = p_db; + m_nodeStores = storeAddrs; + + // Build store → node list mapping (worker internal indices 1..N) + int numWorkers = static_cast(workerAddrs.size()); + int numStores = static_cast(storeAddrs.size()); + for (int wi = 0; wi < numWorkers; wi++) { + int storeIdx = wi % numStores; + m_storeToNodes[storeAddrs[storeIdx]].push_back(wi + 1); + } + for (auto& [store, nodes] : m_storeToNodes) { + std::string nodeList; + for (int n : nodes) { nodeList += std::to_string(n) + " "; } + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "WorkerNode: store %s → nodes [%s]\n", store.c_str(), nodeList.c_str()); + } + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "WorkerNode: initialized (workerIndex=%d, internalIdx=%d, %d stores, %d vnodes/node)\n", + workerIndex, internalIdx, numStores, vnodeCount); + + m_dispatch.SetNetwork(this); + m_remoteOps.SetNetwork(this); + + return true; + } + + public: + bool Start() { return StartNetwork(); } + + // Gate + drain shutdown: + // 1. Reject new QueueRemoteAppend producers via m_acceptingNewRequests. + // 2. Wait for any in-flight auto-flush detached threads to exit. + // With the gate set, each thread is bounded by its current + // SendBatchRemoteAppend call (~kTimeoutSec, default 180s) plus + // one more loop iteration that will see an empty queue (no + // new producers) and break. So worst-case wall time is one + // gRPC timeout, regardless of concurrency. + // 3. Member destruction runs after this body: m_asyncWatchdog's own + // destructor (AsyncJobWatchdog.h:48) joins its loop thread, then + // mutex/queue members tear down cleanly. + // Callers are expected to have invoked FlushRemoteAppends() before + // destruction; any residue in m_appendQueue is dropped with a warning. + // + // The wait is unbounded by design: a hard timeout here would let + // threads outlive the members they captured (m_appendQueueMutex / + // m_appendQueue / m_asyncWatchdog) and immediately UAF — strictly + // worse than a slow shutdown. If shutdown ever stays stuck past a + // gRPC timeout in production, the diagnostic to chase is "gRPC + // client is wedged", not "tune the destructor timeout". + ~WorkerNode() { + m_acceptingNewRequests.store(false, std::memory_order_release); + + // Log every 2x RPC timeout: that gives one full RPC cycle as + // the healthy-drain upper bound (gate -> each in-flight thread + // bounded by exactly one SendBatchRemoteAppend cycle), plus a + // second cycle of buffer so a slightly slow-but-healthy drain + // doesn't false-alarm. Past 2x is firmly into "gRPC client is + // wedged" territory and worth a LL_Warning. + const auto logInterval = std::chrono::seconds( + 2 * std::max(1, m_remoteOps.GetRpcTimeoutSec())); + + auto lastLogged = std::chrono::steady_clock::now(); + while (m_inflightAppendFlushes.load(std::memory_order_acquire) > 0) { + auto now = std::chrono::steady_clock::now(); + if (now - lastLogged >= logInterval) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "~WorkerNode: still waiting on %d in-flight auto-flush thread(s) " + "(exceeded 2x RPC timeout, gRPC may be wedged)\n", + m_inflightAppendFlushes.load(std::memory_order_relaxed)); + lastLogged = now; + } + std::this_thread::sleep_for(kShutdownPollInterval); + } + + const size_t residue = m_remoteQueueSize.load(std::memory_order_relaxed); + if (residue > 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "~WorkerNode: dropping %zu queued RemoteAppend item(s) at destruction; " + "caller should have invoked FlushRemoteAppends() first\n", residue); + } + } + + // ---- Callbacks ---- + // + // ExtraDynamicSearcher passes its m_layer when binding callbacks so + // that with multi-layer SPANN (Layers >= 2) each layer has its own + // captured `this` and request dispatch on the receiver side routes by + // request.m_layer. + + void SetAppendCallback(int layer, AppendCallback cb) { m_remoteOps.SetAppendCallback(layer, std::move(cb)); } + void SetBatchAppendCallback(int layer, BatchAppendCallback cb) { m_remoteOps.SetBatchAppendCallback(layer, std::move(cb)); } + void SetHeadSyncCallback(int layer, HeadSyncCallback cb) { m_remoteOps.SetHeadSyncCallback(layer, std::move(cb)); } + void SetRemoteLockCallback(int layer, RemoteLockCallback cb) { m_remoteOps.SetRemoteLockCallback(layer, std::move(cb)); } + void SetFenceValidator(int layer, FenceValidator cb) { m_remoteOps.SetFenceValidator(layer, std::move(cb)); } + // Inject the searcher's shared compute pool so receiver-side + // BatchAppend work runs there (high-priority Jobs) instead of in a + // separate executor. Idempotent: safe to call multiple times. + void SetJobSubmitter(int layer, RemotePostingOps::JobSubmitter s) { + m_remoteOps.SetJobSubmitter(layer, std::move(s)); + } + // Wire the receiver-side durable Batch WAL. See RemotePostingOps + // for semantics. Pass a null pointer to disable. + void SetBatchAppendWAL(std::shared_ptr wal) { + m_remoteOps.SetBatchAppendWAL(std::move(wal)); + } + void RecoverPendingBatchAppendWAL() { + m_remoteOps.RecoverPendingBatches(); + } + void SetBatchAppendWalPendingItemsCap(std::size_t cap) { + m_remoteOps.SetBatchAppendWalPendingItemsCap(cap); + } + std::size_t GetBatchAppendWalPendingItems() const { + return m_remoteOps.GetBatchAppendWalPendingItems(); + } + std::size_t GetRemoteOriginPendingItems() const { + return m_remoteOps.GetRemoteOriginPendingItems(); + } + std::size_t GetRemoteOriginPendingItems(int layer) const { + return m_remoteOps.GetRemoteOriginPendingItems(layer); + } + /// Atomically clear all RPC callbacks (every layer) and wait for any + /// in-flight invocation to finish. + void ClearCallbacks() { + m_remoteOps.ClearCallbacks(); + } + /// Per-layer ownership API used by ExtraDynamicSearcher to avoid having + /// one layer's destructor wipe another layer's still-active callbacks. + /// SetWorker calls ClaimCallbackOwnership(m_layer, this) before + /// registering; the destructor calls ClearCallbacksIfOwner(m_layer, this). + void ClaimCallbackOwnership(int layer, const void* owner) { + m_remoteOps.ClaimCallbackOwnership(layer, owner); + } + bool ClearCallbacksIfOwner(int layer, const void* owner) { + return m_remoteOps.ClearCallbacksIfOwner(layer, owner); + } + void SetDispatchCallback(DispatchCallback cb) { m_dispatch.SetDispatchCallback(std::move(cb)); } + void ClearDispatchCallback() { m_dispatch.ClearDispatchCallback(); } + + // RPC tuning forwarders. See RemotePostingOps for semantics. + // MaxInflightPerNode caps how many auto-flush chunks may be on + // the wire to a given peer at once; chunk size/retry/timeout + // are forwarded directly into RemotePostingOps. + void SetRpcChunkSize(int v) { m_remoteOps.SetRpcChunkSize(v); } + void SetRpcRetry(int v) { m_remoteOps.SetRpcRetry(v); } + void SetRpcTimeoutSec(int v) { m_remoteOps.SetRpcTimeoutSec(v); } + void SetRpcMaxInflightPerNode(int v) { + if (v > 0) m_maxInflightPerNode.store(v, std::memory_order_relaxed); + } + + // ---- Routing ---- + + RouteTarget GetOwner(SizeType headID) { + RouteTarget target; + target.isLocal = true; + target.nodeIndex = m_localNodeIndex; + + if (!m_enabled) { + m_routeStats.disabled++; + return target; + } + { + auto ring = std::atomic_load(&m_hashRing); + if (!ring || ring->NodeCount() <= 1) { + m_routeStats.local++; + return target; + } + target.nodeIndex = ring->GetOwner(headID); + } + target.isLocal = (target.nodeIndex == m_localNodeIndex); + if (target.isLocal) m_routeStats.local++; + else m_routeStats.remote++; + return target; + } + + void LogRouteStats(const char* context = "") { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "WorkerNode stats%s: local=%d remote=%d disabled=%d keyMiss=%d noMapping=%d\n", + context, (int)m_routeStats.local, (int)m_routeStats.remote, + (int)m_routeStats.disabled, (int)m_routeStats.keyMiss, + (int)m_routeStats.noMapping); + } + + void ResetRouteStats() { + m_routeStats.local.store(0); + m_routeStats.remote.store(0); + m_routeStats.disabled.store(0); + m_routeStats.keyMiss.store(0); + m_routeStats.noMapping.store(0); + } + + // ---- Remote posting ops ---- + + ErrorCode SendRemoteAppend(int targetNodeIndex, int layer, SizeType headID, + const std::shared_ptr& headVec, int appendNum, + std::string& appendPosting) + { + return m_remoteOps.SendRemoteAppend(targetNodeIndex, layer, headID, headVec, appendNum, appendPosting); + } + + ErrorCode SendBatchRemoteAppend(int targetNodeIndex, std::vector& items) { + return m_remoteOps.SendBatchRemoteAppend(targetNodeIndex, items); + } + + void BroadcastHeadSync(const std::vector& entries) { + if (!m_enabled) return; + m_remoteOps.BroadcastHeadSync(entries); + } + + // v33: expose HeadSync delivery diagnostics + retry queue. + void DumpHeadSyncStats(const char* label) const { + m_remoteOps.DumpHeadSyncStats(label); + } + // Cross-node merge-hint channel diagnostics. + void DumpMergeRequestStats(const char* label) const { + m_remoteOps.DumpMergeRequestStats(label); + } + size_t GetHeadSyncBacklogSize() const { + return m_remoteOps.GetHeadSyncBacklogSize(); + } + size_t DrainHeadSyncBacklog(size_t maxBatch = 1024) { + return m_remoteOps.DrainHeadSyncBacklog(maxBatch); + } + void NoteHeadSyncApplyAdd() { + m_remoteOps.NoteHeadSyncApplyAdd(); + } + void NoteHeadSyncApplyDelete() { + m_remoteOps.NoteHeadSyncApplyDelete(); + } + + // Returns issued fencing token on Lock success (0 = denied), + // or 1 on Unlock accepted (0 = rejected / stale token). + std::uint64_t SendRemoteLock(int nodeIndex, int layer, SizeType headID, + bool lock, std::uint64_t token = 0) { + if (!m_enabled) return 0; + return m_remoteOps.SendRemoteLock(nodeIndex, layer, headID, lock, token); + } + + // Synchronous, fenced remote append: includes the fencing token + // so the owner can validate that the writer still holds the + // bucket lease before applying. Returns Success/Fail. + ErrorCode SendFencedRemoteAppend(int nodeIndex, int layer, SizeType headID, + const std::shared_ptr& headVec, + int appendNum, std::string& appendPosting, + std::uint64_t fencingToken) { + if (!m_enabled) return ErrorCode::Fail; + return m_remoteOps.SendRemoteAppend(nodeIndex, layer, headID, headVec, + appendNum, appendPosting, fencingToken); + } + + void SetMergeCallback(int layer, RemotePostingOps::MergeCallback cb) { + m_remoteOps.SetMergeCallback(layer, std::move(cb)); + } + + // ---- Append queue ---- + + void QueueRemoteAppend(int nodeIndex, RemoteAppendRequest req) { + if (!m_acceptingNewRequests.load(std::memory_order_acquire)) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "WorkerNode: rejecting QueueRemoteAppend to node %d during shutdown\n", + nodeIndex); + return; + } + std::vector toFlush; + bool didReserveSlot = false; + { + std::lock_guard lock(m_appendQueueMutex); + auto& q = m_appendQueue[nodeIndex]; + q.push_back(std::move(req)); + m_remoteQueueSize.fetch_add(1, std::memory_order_relaxed); + m_totalRemoteAppendsRouted.fetch_add(1, std::memory_order_relaxed); + // [PERF] Auto-flush per node once we have a full chunk worth + // (kAutoFlushThreshold items). Without this, every remote + // append accumulates until end-of-batch FlushRemoteAppends — + // which then sends hundreds of thousands of items serially + // (10k chunks * ~3s/chunk) AFTER all insert compute is done. + // Auto-flushing while inserts keep running overlaps the + // network with CPU and drops end-of-batch tail latency. + // + // [v38] Allow up to kMaxInflightPerNode concurrent in-flight + // chunks per node so a producer burst (split fan-out, reassign + // wave) can saturate the receiver's bg-executor pool instead of + // queueing up serially behind a single per-node mutex. + if (q.size() >= kAutoFlushThreshold + && m_perNodeInflight[nodeIndex] < m_maxInflightPerNode.load(std::memory_order_relaxed)) { + toFlush.swap(q); + m_remoteQueueSize.fetch_sub(toFlush.size(), std::memory_order_relaxed); + ++m_perNodeInflight[nodeIndex]; + didReserveSlot = true; + } + } + if (!didReserveSlot) return; + + // Fire-and-forget async send. After the initial chunk completes, + // the same thread loops to pick up any further accumulation so we + // avoid thread-spawn churn while keeping per-node concurrency at + // kMaxInflightPerNode. Order across batches is best-effort: the + // receiver runs 8 worker threads on each chunk that already + // interleave items within a chunk, so cross-chunk ordering adds + // no extra correctness risk for the per-posting RMW path. + auto items = std::make_shared>(std::move(toFlush)); + m_inflightAppendFlushes.fetch_add(1, std::memory_order_relaxed); + std::thread([this, nodeIndex, items]() { + while (true) { + ErrorCode ret = SendBatchRemoteAppend(nodeIndex, *items); + if (ret != ErrorCode::Success) { + // Hand the failed batch to the watchdog. It owns + // backoff/retry until MaxAttempts; RemoteAppend is + // idempotent on the receive side so at-least-once + // delivery is safe. + auto retryItems = + std::make_shared>(*items); + int n = nodeIndex; + auto self = this; + std::string tag = "QueueRemoteAppend node=" + + std::to_string(n) + " items=" + + std::to_string(retryItems->size()); + uint64_t id = m_asyncWatchdog.Track( + [self, n, retryItems]() { + return self->SendBatchRemoteAppend(n, *retryItems) + == ErrorCode::Success; + }, std::move(tag)); + m_asyncWatchdog.MarkFailureAndScheduleResend(id); + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "QueueRemoteAppend auto-flush: batch to node %d failed (%zu items), handed to watchdog\n", + nodeIndex, items->size()); + } + items->clear(); + { + std::lock_guard lock(m_appendQueueMutex); + auto it = m_appendQueue.find(nodeIndex); + if (it == m_appendQueue.end() + || it->second.size() < kAutoFlushThreshold) { + --m_perNodeInflight[nodeIndex]; + break; + } + items->swap(it->second); + m_remoteQueueSize.fetch_sub(items->size(), + std::memory_order_relaxed); + } + } + m_inflightAppendFlushes.fetch_sub(1, std::memory_order_relaxed); + }).detach(); + } + + size_t GetRemoteQueueSize() const { + return m_remoteQueueSize.load(std::memory_order_relaxed); + } + + // Number of remote append items submitted via QueueRemoteAppend over + // this WorkerNode's lifetime. Used by ExtraDynamicSearcher progress + // logging so users can tell whether "ALL DONE" on the local pool is + // misleading because the remote send queue still has backlog. + size_t GetTotalRemoteAppendsRouted() const { + return m_totalRemoteAppendsRouted.load(std::memory_order_relaxed); + } + // In-flight chunk count across all peers (auto-flush async sends + // currently running). + int GetInflightAppendFlushes() const { + return m_inflightAppendFlushes.load(std::memory_order_relaxed); + } + + ErrorCode FlushRemoteAppends() { + // Drain the queue under m_flushMutex so concurrent flush callers + // serialize. Loop in case items get queued mid-send. This avoids + // the thundering-herd of 100+ concurrent FlushRemoteAppends calls + // (one per split worker) overwhelming the remote node's tiny + // (8-thread, 256-connection-pool) network server. + std::lock_guard flushGuard(m_flushMutex); + + // Wait for any in-flight async auto-flushes triggered by + // QueueRemoteAppend (>= kAutoFlushThreshold) to drain so the + // residue we send below is the actual tail. Callers invoke + // FlushRemoteAppends after all producers (AddIndex / split / + // reassign) have quiesced, so no new auto-flushes will start + // here. + while (m_inflightAppendFlushes.load(std::memory_order_relaxed) > 0) { + std::this_thread::sleep_for(std::chrono::milliseconds(20)); + } + + int errors = 0; + int iterations = 0; + while (true) { + std::unordered_map> toSend; + { + std::lock_guard lock(m_appendQueueMutex); + if (m_appendQueue.empty()) break; + toSend.swap(m_appendQueue); + m_remoteQueueSize.store(0, std::memory_order_relaxed); + } + if (toSend.empty()) break; + ++iterations; + + std::atomic iterErrors{0}; + std::vector threads; + for (auto& [nodeIdx, items] : toSend) { + if (items.empty()) continue; + threads.emplace_back([this, &iterErrors, nodeIdx, &items]() { + // Per-node mutex serializes against any straggler + // auto-flush still in flight for this node. + std::mutex& nodeMtx = GetPerNodeAppendFlushMutex(nodeIdx); + std::lock_guard nlock(nodeMtx); + ErrorCode ret = SendBatchRemoteAppend(nodeIdx, items); + if (ret != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "FlushRemoteAppends: batch to node %d failed (%d items)\n", + nodeIdx, (int)items.size()); + iterErrors++; + } + }); + } + for (auto& t : threads) t.join(); + errors += iterErrors.load(); + } + return errors > 0 ? ErrorCode::Fail : ErrorCode::Success; + } + + // ---- Cross-node merge hint queue ---- + // + // Search-side fire-and-forget notifications: node X sees posting H + // underfull, where H is owned by Y. We dedup (layer, headID) within + // a flush window and batch-send to Y in one packet. The receiver's + // m_mergeList dedups on top of this, so an occasional dropped or + // duplicated notification only costs a few cycles. + void QueueRemoteMerge(int nodeIndex, int layer, SizeType headID) { + std::vector toFlush; + { + std::lock_guard lock(m_mergeQueueMutex); + std::int64_t key = (static_cast(layer) << 32) + | static_cast(headID); + auto& bucket = m_mergeQueue[nodeIndex]; + if (!bucket.insert(key).second) return; // already pending + m_mergeQueueSize.fetch_add(1, std::memory_order_relaxed); + + if (bucket.size() >= kMergeAutoFlushThreshold) { + toFlush.reserve(bucket.size()); + for (std::int64_t k : bucket) { + RemoteMergeRequest req; + req.m_layer = static_cast(k >> 32); + req.m_headID = static_cast(static_cast(k & 0xFFFFFFFF)); + toFlush.push_back(std::move(req)); + } + m_mergeQueueSize.fetch_sub(bucket.size(), std::memory_order_relaxed); + bucket.clear(); + } + } + if (!toFlush.empty()) { + m_remoteOps.SendBatchRemoteMerge(nodeIndex, toFlush); + } + } + + ErrorCode FlushRemoteMerges() { + std::unordered_map> toSend; + { + std::lock_guard lock(m_mergeQueueMutex); + if (m_mergeQueue.empty()) return ErrorCode::Success; + for (auto& [nodeIdx, bucket] : m_mergeQueue) { + auto& vec = toSend[nodeIdx]; + vec.reserve(bucket.size()); + for (std::int64_t k : bucket) { + RemoteMergeRequest req; + req.m_layer = static_cast(k >> 32); + req.m_headID = static_cast(static_cast(k & 0xFFFFFFFF)); + vec.push_back(std::move(req)); + } + } + m_mergeQueue.clear(); + m_mergeQueueSize.store(0, std::memory_order_relaxed); + } + for (auto& [nodeIdx, items] : toSend) { + if (!items.empty()) m_remoteOps.SendBatchRemoteMerge(nodeIdx, items); + } + return ErrorCode::Success; + } + + // ---- Ring protocol (worker side) ---- + + bool WaitForRing(int timeoutSec = 120) { + auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(timeoutSec); + while (std::chrono::steady_clock::now() < deadline) { + auto ring = std::atomic_load(&m_hashRing); + if (ring && ring->NodeCount() > 0) return true; + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "WorkerNode: Timed out waiting for ring (%ds)\n", timeoutSec); + return false; + } + + // ---- Data members (public for ExtraDynamicSearcher access) ---- + + std::shared_ptr m_db; + std::vector m_nodeStores; + std::unordered_map> m_storeToNodes; + + struct RouteStats { + std::atomic local{0}; + std::atomic remote{0}; + std::atomic disabled{0}; + std::atomic keyMiss{0}; + std::atomic noMapping{0}; + } m_routeStats; + + protected: + void RegisterServerHandlers(Socket::PacketHandlerMapPtr& handlers) override { + handlers->emplace(Socket::PacketType::AppendRequest, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleAppendRequest(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::BatchAppendRequest, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleBatchAppendRequest(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::HeadSyncRequest, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleHeadSyncRequest(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::RemoteLockRequest, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleRemoteLockRequest(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::MergeRequest, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleMergeRequest(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::DispatchCommand, + [this](Socket::ConnectionID c, Socket::Packet p) { m_dispatch.HandleDispatchCommand(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::DispatchResult, + [this](Socket::ConnectionID c, Socket::Packet p) { m_dispatch.HandleDispatchResult(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::RingUpdate, + [this](Socket::ConnectionID c, Socket::Packet p) { HandleRingUpdate(c, std::move(p)); }); + } + + void RegisterClientHandlers(Socket::PacketHandlerMapPtr& handlers) override { + handlers->emplace(Socket::PacketType::AppendResponse, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleAppendResponse(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::BatchAppendResponse, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleBatchAppendResponse(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::RemoteLockResponse, + [this](Socket::ConnectionID c, Socket::Packet p) { m_remoteOps.HandleRemoteLockResponse(c, std::move(p)); }); + handlers->emplace(Socket::PacketType::DispatchResult, + [this](Socket::ConnectionID c, Socket::Packet p) { m_dispatch.HandleDispatchResult(c, std::move(p)); }); + } + + void BgProtocolStep() override { + // Keep sending NodeRegister until ring is populated + auto ring = std::atomic_load(&m_hashRing); + if (!ring || ring->NodeCount() == 0) { + Socket::ConnectionID connID = Socket::c_invalidConnectionID; + { + std::lock_guard lock(m_connMutex); + if (m_dispatcherNodeIndex < (int)m_peerConnections.size()) + connID = m_peerConnections[m_dispatcherNodeIndex]; + } + if (connID != Socket::c_invalidConnectionID) { + SendNodeRegister(); + } + } + } + + bool IsRingSettled() const override { + auto ring = std::atomic_load(&m_hashRing); + return ring && ring->NodeCount() > 0; + } + + private: + void SendNodeRegister() { + NodeRegisterMsg msg; + msg.m_nodeIndex = m_localNodeIndex; + msg.m_host = m_nodeAddrs[m_localNodeIndex].first; + msg.m_port = m_nodeAddrs[m_localNodeIndex].second; + // Worker's 0-based index = m_localNodeIndex - 1 (since 0 is dispatcher) + int workerIdx = m_localNodeIndex - 1; + int numStores = static_cast(m_nodeStores.size()); + msg.m_store = (numStores > 0) ? m_nodeStores[workerIdx % numStores] : ""; + + std::size_t bodySize = msg.EstimateBufferSize(); + Socket::Packet pkt; + pkt.Header().m_packetType = Socket::PacketType::NodeRegisterRequest; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + pkt.Header().m_bodyLength = static_cast(bodySize); + pkt.AllocateBuffer(static_cast(bodySize)); + msg.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + auto connID = GetPeerConnection(m_dispatcherNodeIndex); + if (connID != Socket::c_invalidConnectionID) { + m_client->SendPacket(connID, std::move(pkt), nullptr); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "WorkerNode: Sent NodeRegister (node %d) to dispatcher\n", m_localNodeIndex); + } + } + + void HandleRingUpdate(Socket::ConnectionID connID, Socket::Packet packet) { + RingUpdateMsg msg; + if (!msg.Read(packet.Body())) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "WorkerNode: Failed to parse RingUpdate\n"); + return; + } + + auto newRing = std::make_shared(msg.m_vnodeCount); + for (auto idx : msg.m_nodeIndices) { + newRing->AddNode(idx); + } + { + std::lock_guard guard(m_ringWriteMutex); + std::atomic_store(&m_hashRing, + std::shared_ptr(std::move(newRing))); + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "WorkerNode: Ring updated — %d nodes (v%u)\n", + (int)msg.m_nodeIndices.size(), msg.m_ringVersion); + + SendRingUpdateACK(msg.m_ringVersion); + } + + void SendRingUpdateACK(std::uint32_t ringVersion) { + RingUpdateACKMsg msg; + msg.m_nodeIndex = m_localNodeIndex; + msg.m_ringVersion = ringVersion; + + std::size_t bodySize = msg.EstimateBufferSize(); + Socket::Packet pkt; + pkt.Header().m_packetType = Socket::PacketType::RingUpdateACK; + pkt.Header().m_processStatus = Socket::PacketProcessStatus::Ok; + pkt.Header().m_connectionID = Socket::c_invalidConnectionID; + pkt.Header().m_resourceID = 0; + pkt.Header().m_bodyLength = static_cast(bodySize); + pkt.AllocateBuffer(static_cast(bodySize)); + msg.Write(pkt.Body()); + pkt.Header().WriteBuffer(pkt.HeaderBuffer()); + + auto connID = GetPeerConnection(m_dispatcherNodeIndex); + if (connID != Socket::c_invalidConnectionID) { + m_client->SendPacket(connID, std::move(pkt), nullptr); + } + } + + int m_dispatcherNodeIndex = 0; + RemotePostingOps m_remoteOps; + DispatchCoordinator m_dispatch; + + mutable std::mutex m_appendQueueMutex; + std::unordered_map> m_appendQueue; + std::atomic m_remoteQueueSize{0}; + // Cumulative count of items handed to QueueRemoteAppend over this + // worker's lifetime (does not decrement on send completion). + std::atomic m_totalRemoteAppendsRouted{0}; + // Serializes concurrent FlushRemoteAppends() callers so we don't open + // hundreds of simultaneous RPC streams to the remote worker (which has + // only 8 server threads / 256 connection slots). With this mutex, only + // one thread sends at a time; concurrent callers either wait for the + // current flush to finish or contribute their items to the queue. + std::mutex m_flushMutex; + + // Per-node mutex used by end-of-batch FlushRemoteAppends so concurrent + // sends to the SAME node from the final-drain path remain ordered. + // Auto-flushes (QueueRemoteAppend) instead use m_perNodeInflight to + // cap concurrency at kMaxInflightPerNode per node. + std::mutex m_perNodeAppendFlushMutexMapLock; + std::unordered_map> m_perNodeAppendFlushMutex; + std::atomic m_inflightAppendFlushes{0}; + std::unordered_map m_perNodeInflight; // guarded by m_appendQueueMutex + static constexpr size_t kAutoFlushThreshold = 50000; + std::atomic m_maxInflightPerNode{4}; + + // Gate: producers (QueueRemoteAppend) consult this; the destructor + // sets it to false to drain in-flight auto-flush threads to zero + // without new threads being spawned. + std::atomic m_acceptingNewRequests{true}; + + // Shutdown wait tuning (used only by ~WorkerNode). + // - kShutdownPollInterval: how often the destructor wakes to + // re-check m_inflightAppendFlushes. 20ms keeps p50 shutdown + // latency tight when threads exit between polls. + // - The progress-log cadence is derived at destruction time + // from m_remoteOps.GetRpcTimeoutSec() — see ~WorkerNode(). + static constexpr auto kShutdownPollInterval = + std::chrono::milliseconds(20); + + // Resends failed async fire-and-forget batches with exponential + // backoff (see AsyncJobWatchdog.h). Constructed last so it tears + // down before the queues; declared here so destruction order + // matches the design's fault-tolerance contract. + Distributed::AsyncJobWatchdog m_asyncWatchdog{3, 200}; + + std::mutex& GetPerNodeAppendFlushMutex(int nodeIndex) { + std::lock_guard lk(m_perNodeAppendFlushMutexMapLock); + auto it = m_perNodeAppendFlushMutex.find(nodeIndex); + if (it == m_perNodeAppendFlushMutex.end()) { + auto ins = m_perNodeAppendFlushMutex.emplace( + nodeIndex, std::make_unique()); + return *ins.first->second; + } + return *it->second; + } + + // Cross-node merge hint queue. Per-target dedup set of packed + // (layer << 32 | headID) values; QueueRemoteMerge inserts and + // auto-flushes when the per-target bucket reaches threshold. + mutable std::mutex m_mergeQueueMutex; + std::unordered_map> m_mergeQueue; + std::atomic m_mergeQueueSize{0}; + // Merge hints are non-urgent (best-effort optimization). A larger + // bucket trades a small amount of latency for much better dedup and + // network batching. End-of-batch FlushRemoteMerges() guarantees no + // hint is permanently dropped. + static constexpr size_t kMergeAutoFlushThreshold = 8192; + }; + +} // namespace SPTAG::SPANN + +#endif // _SPTAG_SPANN_WORKERNODE_H_ diff --git a/AnnService/inc/Core/SPANN/ExtraDynamicSearcher.h b/AnnService/inc/Core/SPANN/ExtraDynamicSearcher.h index be30202d7..9d19265c4 100644 --- a/AnnService/inc/Core/SPANN/ExtraDynamicSearcher.h +++ b/AnnService/inc/Core/SPANN/ExtraDynamicSearcher.h @@ -19,10 +19,19 @@ #include "inc/Core/Common/LocalVersionMap.h" #include "inc/Core/Common/TiKVVersionMap.h" #include "ExtraFileController.h" +#include "Distributed/WorkerNode.h" +#include "Distributed/RemoteLeaseTable.h" +#include "Distributed/HeadSyncLog.h" +#include "Distributed/SplitWAL.h" +#include "Distributed/BatchAppendWAL.h" +#include "Distributed/DelayedJobScheduler.h" #include #include #include +#include #include +#include +#include #include #include #include @@ -53,6 +62,50 @@ extern "C" bool RocksDbIOUringEnable() { return true; } namespace SPTAG::SPANN { + // RAII lease holder for a remote per-bucket lock issued by + // WorkerNode::SendRemoteLock. Stores the fencing token so the + // release call can be validated by the owner. Used by both Split + // (via a token map for batched acquisition) and MergePostings + // (per-candidate, one lease at a time). + struct RemoteLeaseGuard { + WorkerNode* router = nullptr; + int nodeIndex = -1; + int layer = 0; + SizeType vid = -1; + std::uint64_t token = 0; + + RemoteLeaseGuard() = default; + RemoteLeaseGuard(const RemoteLeaseGuard&) = delete; + RemoteLeaseGuard& operator=(const RemoteLeaseGuard&) = delete; + RemoteLeaseGuard(RemoteLeaseGuard&& o) noexcept { *this = std::move(o); } + RemoteLeaseGuard& operator=(RemoteLeaseGuard&& o) noexcept { + release(); + router = o.router; nodeIndex = o.nodeIndex; layer = o.layer; + vid = o.vid; token = o.token; + o.router = nullptr; o.token = 0; + return *this; + } + ~RemoteLeaseGuard() { release(); } + + // Returns true on success (token != 0). Caller decides whether + // a denial means "skip candidate" or "propagate failure". + bool acquire(WorkerNode* r, int n, int l, SizeType v) { + release(); + if (!r) return false; + std::uint64_t t = r->SendRemoteLock(n, l, v, true, 0); + if (t == 0) return false; + router = r; nodeIndex = n; layer = l; vid = v; token = t; + return true; + } + void release() { + if (router && token) { + router->SendRemoteLock(nodeIndex, layer, vid, false, token); + } + router = nullptr; token = 0; + } + bool active() const { return router != nullptr && token != 0; } + }; + template class ExtraDynamicSearcher : public IExtraSearcher { @@ -206,16 +259,38 @@ namespace SPTAG::SPANN { } }; + public: + // Expose the underlying KV handle so a standalone WorkerNode can be wired to the + // same DB this searcher already opened, instead of opening a second one. + std::shared_ptr GetDB() const { return db; } + private: std::shared_ptr db; + WorkerNode* m_worker = nullptr; // externally owned, set via SetWorker() SPANN::Index* m_headIndex; std::unique_ptr m_versionMap; Options* m_opt; int m_layer; + SizeType m_initialVectorSize = 0; // vector count at build time (before inserts) COMMON::FineGrainedRWLock m_rwLocks; + // Per-bucket lease table for remote (cross-node) locking. Each + // entry carries a TTL so a crashed/disconnected holder doesn't + // permanently block Split/Merge here. See RemoteLeaseTable.h. + static constexpr int kRemoteLockPoolSize = 32767; + std::unique_ptr m_remoteLeaseTable; + + // Durable HeadSync log + per-owner split WAL. Populated by + // SetWorker once we have the shared TiKV handle. See + // Distributed/HeadSyncLog.h and Distributed/SplitWAL.h. + std::unique_ptr m_headSyncLog; + std::unique_ptr m_splitWAL; + // Receiver-side Batch WAL for cross-owner BatchAppend + std::shared_ptr m_batchAppendWAL; + std::atomic m_splitJobIdCounter{ 0 }; + IndexStats m_stat; std::shared_ptr m_wal; @@ -239,6 +314,15 @@ namespace SPTAG::SPANN { std::atomic_size_t m_totalAppendCompleted{ 0 }; std::atomic_size_t m_totalAppendCount{ 0 }; + // Routing counters for local AddIndex calls so we can verify + // GetOwner is partitioning work evenly. Incremented in + // BatchAppend()/Append() based on whether IsRemoteOwnedHead + // routed the head to a peer or it stayed local. + std::atomic_size_t m_routedLocalHeads{ 0 }; + std::atomic_size_t m_routedRemoteHeads{ 0 }; + std::atomic_size_t m_routedLocalItems{ 0 }; + std::atomic_size_t m_routedRemoteItems{ 0 }; + std::atomic_size_t m_reassignJobsInFlight{ 0 }; std::atomic_size_t m_totalReassignSubmitted{ 0 }; std::atomic_size_t m_totalReassignCompleted{ 0 }; @@ -337,9 +421,587 @@ namespace SPTAG::SPANN { SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Posting size limit: %d, search limit: %f, merge threshold: %d\n", m_postingSizeLimit, p_opt.m_latencyLimit, m_mergeThreshold); SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "[CONFIG] layer=%d DistributedVersionMap=%s SearchCheckVersionMapOnlyLayer0=%s UseMultiChunkPosting=%s PostingPageLimit=%d\n", layer, p_opt.m_distributedVersionMap ? "true" : "false", p_opt.m_searchCheckVersionMapOnlyLayer0 ? "true" : "false", p_opt.m_useMultiChunkPosting ? "true" : "false", p_opt.m_postingPageLimit); + + // Initialize per-bucket remote lease table. TTL is picked up + // from SPANN option RemoteLockTtlMs (default 30000ms = 30s). + m_remoteLeaseTable = std::make_unique( + kRemoteLockPoolSize, + p_opt.m_remoteLockTtlMs > 0 ? p_opt.m_remoteLockTtlMs : 30000); + } + + ~ExtraDynamicSearcher() { + // Order matters: drain async jobs BEFORE nulling m_worker. + // An in-flight SplitAsyncJob may still be inside Split() → + // QueueRemoteAppend; clearing m_worker first turns that into a + // null-deref segfault. Wait for the local pool slice owned by + // *this* layer to quiesce before touching shared state. + DrainAsyncJobs(); + if (m_worker) { + m_worker->ClearCallbacksIfOwner(m_layer, this); + } + } + + // Wait for SplitAsync/MergeAsync/Append jobs targeting THIS layer + // to finish before we tear down. The pool itself may be shared + // with sibling layers / the head index, so we can't just destroy + // it; instead we poll the per-layer in-flight counters. + void DrainAsyncJobs() { + using clock = std::chrono::steady_clock; + auto deadline = clock::now() + std::chrono::seconds(30); + while (clock::now() < deadline) { + int s = m_splitJobsInFlight.load(std::memory_order_relaxed); + int m = m_mergeJobsInFlight.load(std::memory_order_relaxed); + int a = m_appendJobsInFlight.load(std::memory_order_relaxed); + if (s == 0 && m == 0 && a == 0) return; + std::this_thread::sleep_for(std::chrono::milliseconds(20)); + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "ExtraDynamicSearcher layer=%d: drain timeout, split=%d merge=%d append=%d still in-flight\n", + m_layer, + (int)m_splitJobsInFlight.load(), + (int)m_mergeJobsInFlight.load(), + (int)m_appendJobsInFlight.load()); + } + + int GetNumWorkerNodes() const { + if (m_worker && m_worker->IsEnabled()) { + return std::max(1, m_worker->GetNumWorkerNodes()); + } + return 1; + } + + int GetWorkerNodeIndex() const { + if (m_worker && m_worker->IsEnabled()) { + int idx = m_worker->GetWorkerNodeIndex(); + return idx >= 0 ? idx : 0; + } + return 0; + } + + // Stripe globalVID across worker nodes (only for vectors added after build). + SizeType AllocateGlobalVID(SizeType localVID) const override { + int numWorkers = GetNumWorkerNodes(); + if (numWorkers <= 1 || localVID < m_initialVectorSize) return localVID; + return m_initialVectorSize + (localVID - m_initialVectorSize) * numWorkers + GetWorkerNodeIndex(); + } + + // SPDKThreadPool. Called both after pool creation and from + // SetWorker(); whichever happens last actually binds the submitter. + // Idempotent: wires the receiver's BatchAppend Jobs onto our shared + void WireJobSubmitterIfReady() { + if (!m_worker || !m_splitThreadPool) return; + auto pool = m_splitThreadPool; + m_worker->SetJobSubmitter(m_layer, + [pool](Helper::ThreadPool::Job* j) { pool->add(j); }); + } + + /// Set the external WorkerNode pointer and bind all callbacks + /// (append, head-sync, remote-lock, merge-hint) at THIS instance's m_layer. + void SetWorker(WorkerNode* router) override { + m_worker = router; + if (!m_worker) return; + + // Push RPC tuning from SPANN options (RemoteAppend*) so the + // hardcoded defaults in RemotePostingOps/WorkerNode get + // overridden by whatever the ini file specified. Pushing per + // SetWorker call (rather than once at WorkerNode construction) + // means a hot reconfigure via index reload picks up new + // values automatically. + if (m_opt) { + m_worker->SetRpcChunkSize(m_opt->m_remoteAppendChunkSize); + m_worker->SetRpcRetry(m_opt->m_remoteAppendRetry); + m_worker->SetRpcTimeoutSec(m_opt->m_remoteAppendTimeoutSec); + m_worker->SetRpcMaxInflightPerNode(m_opt->m_remoteAppendMaxInflight); + // Size the receiver's WAL admission cap so a normal in-flight + // window (ChunkSize × MaxInflight) fits before backpressure + // engages. A too-low cap forces every chunk down the slow + // synchronous-ACK path; too-high removes the safety net. + const std::size_t chunk = (std::size_t)std::max(1, m_opt->m_remoteAppendChunkSize); + const std::size_t inflight = (std::size_t)std::max(1, m_opt->m_remoteAppendMaxInflight); + m_worker->SetBatchAppendWalPendingItemsCap(chunk * inflight * 2); + } + + // Initialize durable HeadSync log + SplitWAL once we know the + // worker (and therefore the node identity). Both layers + // perform cross-owner splits, so both layers need a WAL. + // HeadSync, however, only broadcasts the layer-0 head topology + // (layer-1 centroids are derived from layer-0 splits and reach + // peers via the layer-0 HeadSync, so layer 1 doesn't need its + // own broadcast log). + if (db) { + if (m_layer == 0) { + m_headSyncLog = std::make_unique( + db, m_worker->GetWorkerNodeIndex()); + // Receiver-side Batch WAL is per-receiver, not per-layer. + // Layer-0 owns the install; recovered entries route to + // their original layer via the m_layer field in each + // RemoteAppendRequest. + m_batchAppendWAL = std::make_shared( + db, m_worker->GetWorkerNodeIndex()); + m_worker->SetBatchAppendWAL(m_batchAppendWAL); + } + m_splitWAL = std::make_unique(db, m_layer); + } + + WireJobSubmitterIfReady(); + + // Claim ownership so the matching destructor's IfOwner check + // clears the right slot if/when we are deleted (multi-layer SPANN + // each layer has its own slot keyed by m_layer). + m_worker->ClaimCallbackOwnership(m_layer, this); + + // Append callback: routes incoming remote appends to local Append() + m_worker->SetAppendCallback(m_layer, + [this](SizeType headID, std::shared_ptr headVec, + int appendNum, std::string& appendPosting, + std::uint64_t fencingToken) -> ErrorCode { + + // Reuse SPDKThreadPool's per-worker pre-allocated workspace + // when called from BatchAppendItemJob on m_splitThreadPool. + ExtraWorkSpace localWorkSpace; + ExtraWorkSpace* ws = static_cast(tls_preallocAppendWorkSpace); + if (!ws) { + m_headIndex->InitWorkSpace(&localWorkSpace); + ws = &localWorkSpace; + } + bool wasMissing = !m_headIndex->ContainSample(headID, m_layer + 1); + if (wasMissing) { + // A nonzero fencingToken means the sender (Split) + // holds an authoritative bucket lease on this VID + // and is publishing a brand-new head — fence + // validation already passed above, so resurrection + // here is the legitimate "publish new head" path. + // For unfenced appends (token == 0), refuse: + // resurrecting a head a concurrent Merge/Split + // just deleted would leave a zombie head until + // the next merge round drops it again. + if (fencingToken != 0 && headVec && !headVec->empty()) { + DimensionType dim = static_cast( + headVec->size() / sizeof(ValueType)); + m_headIndex->AddHeadIndex(headVec->data(), headID, 0, + dim, m_layer + 1, ws); + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, + "AppendCallback: head=%lld deleted by local structural op; refusing resurrection\n", + (std::int64_t)headID); + return ErrorCode::Fail; + } + } + + // Mirror sender's version map for the records we're about + // to persist so MergePostings + SearchIndex don't drop + // them as "stale". + { + const uint8_t* basePtr = reinterpret_cast(appendPosting.data()); + size_t totalRec = appendPosting.size() / m_vectorInfoSize; + + // Pre-build the candidate set and batch-read current + // versions to avoid one TiKV Get per record. + std::vector candIdx; + std::vector candVids; + std::vector candRecVers; + candIdx.reserve(totalRec); + candVids.reserve(totalRec); + candRecVers.reserve(totalRec); + for (size_t i = 0; i < totalRec; ++i) { + const uint8_t* p = basePtr + i * m_vectorInfoSize; + SizeType vid = *reinterpret_cast(p); + uint8_t recVer = *(p + sizeof(SizeType)); + if (vid < 0) continue; + if (recVer == 0xfe) continue; + candIdx.push_back(i); + candVids.push_back(vid); + candRecVers.push_back(recVer); + } + std::vector curVers; + m_versionMap->BatchGetVersions(candVids, curVers); + + std::vector batchVids; + std::vector batchVers; + batchVids.reserve(candVids.size()); + batchVers.reserve(candVids.size()); + for (size_t k = 0; k < candVids.size(); ++k) { + uint8_t curVer = curVers[k]; + if (curVer == 0xfe) continue; + if (curVer == candRecVers[k]) continue; + batchVids.push_back(candVids[k]); + batchVers.push_back(candRecVers[k]); + } + if (!batchVids.empty()) { + m_versionMap->SetVersionBatch(batchVids, batchVers); + } + } + return Append(ws, headID, appendNum, appendPosting, 0, + /*p_skipRemoteBucketWait=*/fencingToken != 0); + }); + + // Batch append callback: receiver-side fast path. + m_worker->SetBatchAppendCallback(m_layer, + [this](std::vector& items, + std::uint32_t& outSuccess, std::uint32_t& outFail) { + outSuccess = 0; + outFail = 0; + if (items.empty()) return; + + ExtraWorkSpace localWorkSpace; + ExtraWorkSpace* ws = static_cast(tls_preallocAppendWorkSpace); + if (!ws) { + m_headIndex->InitWorkSpace(&localWorkSpace); + ws = &localWorkSpace; + } + + // Phase 1: per-head prep (race-condition wait, + // resurrection or refusal) and per-item versionMap + // mirroring. Items refused at this phase count as + // failures and are excluded from the MultiMerge. + std::vector alive(items.size(), true); + for (size_t i = 0; i < items.size(); ++i) { + auto* req = items[i]; + if (req->m_appendPosting.empty() || req->m_appendNum == 0) { + // Defensive drop (matches Append()'s gate). + alive[i] = false; + ++outSuccess; + continue; + } + + bool wasMissing = !m_headIndex->ContainSample(req->m_headID, m_layer + 1); + if (wasMissing) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, + "BatchAppendCallback: head=%lld deleted by local structural op; refusing\n", + (std::int64_t)req->m_headID); + alive[i] = false; + ++outFail; + continue; + } + if (wasMissing && !req->m_headVec.empty()) { + DimensionType dim = static_cast( + req->m_headVec.size() / sizeof(ValueType)); + m_headIndex->AddHeadIndex(req->m_headVec.data(), + req->m_headID, 0, dim, m_layer + 1, ws); + } + + // Mirror sender's versionMap for the records we're + // about to persist (otherwise MergePostings / + // SearchIndex would drop them as stale). + const uint8_t* basePtr = + reinterpret_cast(req->m_appendPosting.data()); + size_t totalRec = req->m_appendPosting.size() / m_vectorInfoSize; + std::vector candIdx; + std::vector candVids; + std::vector candRecVers; + candIdx.reserve(totalRec); + candVids.reserve(totalRec); + candRecVers.reserve(totalRec); + for (size_t k = 0; k < totalRec; ++k) { + const uint8_t* p = basePtr + k * m_vectorInfoSize; + SizeType vid = *reinterpret_cast(p); + uint8_t recVer = *(p + sizeof(SizeType)); + if (vid < 0) continue; + if (recVer == 0xfe) continue; + candIdx.push_back(k); + candVids.push_back(vid); + candRecVers.push_back(recVer); + } + std::vector curVers; + m_versionMap->BatchGetVersions(candVids, curVers); + + std::vector batchVids; + std::vector batchVers; + batchVids.reserve(candVids.size()); + batchVers.reserve(candVids.size()); + for (size_t k = 0; k < candVids.size(); ++k) { + uint8_t curVer = curVers[k]; + if (curVer == 0xfe) continue; + if (curVer == candRecVers[k]) continue; + batchVids.push_back(candVids[k]); + batchVers.push_back(candRecVers[k]); + } + if (!batchVids.empty()) { + m_versionMap->SetVersionBatch(batchVids, batchVers); + } + } + + // Phase 2: group surviving items by headID, then + // hand the grouped map to BatchAppend so it issues + // a single db->MultiMerge for all heads. + std::unordered_map headAppends; + headAppends.reserve(items.size()); + size_t aliveCount = 0; + bool anyFenced = false; + for (size_t i = 0; i < items.size(); ++i) { + if (!alive[i]) continue; + auto* req = items[i]; + auto& dst = headAppends[req->m_headID]; + if (dst.empty()) dst = std::move(req->m_appendPosting); + else dst.append(req->m_appendPosting); + if (req->m_fencingToken != 0) anyFenced = true; + ++aliveCount; + } + if (headAppends.empty()) return; + + ErrorCode ret = BatchAppend(ws, headAppends, "PeerBatch", + /*p_skipRemoteBucketWait=*/anyFenced); + if (ret == ErrorCode::Success) { + outSuccess += static_cast(aliveCount); + } else { + outFail += static_cast(aliveCount); + } + }); + + // Head sync callback: apply head index updates from peers + auto* headIndex = m_headIndex; + int layer = m_layer; + auto* worker = m_worker; + m_worker->SetHeadSyncCallback(m_layer, [headIndex, layer, worker](const HeadSyncEntry& entry) { + if (entry.op == HeadSyncEntry::Op::Add) { + headIndex->AddHeadIndex(entry.headVector.data(), entry.headVID, 0, + static_cast(entry.headVector.size() / sizeof(ValueType)), + layer + 1, nullptr); + if (worker) worker->NoteHeadSyncApplyAdd(); + } else { + headIndex->DeleteIndex(entry.headVID, layer + 1); + if (worker) worker->NoteHeadSyncApplyDelete(); + } + }); + + // Remote lock callback: per-bucket leases with TTL auto-release + // AND a fencing token. The owner returns a monotonically + // increasing token on Lock; subsequent fenced operations + // (RemoteAppend with m_fencingToken set) carry that token + // and the owner validates it against this lease table before + // applying. A zombie holder whose lease has expired (and + // bucket been re-acquired) will have its late operations + // rejected. + m_worker->SetRemoteLockCallback(m_layer, + [this](SizeType headID, bool lock, std::uint64_t token) -> std::uint64_t { + unsigned bucket = COMMON::FineGrainedRWLock::BucketIndex(static_cast(headID)); + if (lock) { + std::uint64_t tok = m_remoteLeaseTable->TryAcquire(bucket); + if (tok == 0) return 0; + if (!m_rwLocks[headID].try_lock()) { + m_remoteLeaseTable->Release(bucket, tok); + return 0; + } + m_rwLocks[headID].unlock(); + return tok; + } else { + return m_remoteLeaseTable->Release(bucket, token) ? 1 : 0; + } + }); + + // Fenced RemoteAppend validator: the receive-side gate for + // split's cross-owner posting writes. A nonzero fencing + // token in the request must match the current lease for + // that head's bucket. + m_worker->SetFenceValidator(m_layer, + [this](SizeType headID, std::uint64_t token) -> bool { + unsigned bucket = COMMON::FineGrainedRWLock::BucketIndex(static_cast(headID)); + return m_remoteLeaseTable->Validate(bucket, token); + }); + + // Cross-node merge hint callback + m_worker->SetMergeCallback(m_layer, [this](SizeType headID) { + MergeAsync(headID); + }); + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "WorkerNode bound to ExtraDynamicSearcher (layer %d)\n", m_layer); + + // Layer-0 owns the Batch-Append WAL recovery: the append + // callback is now installed and m_jobSubmitters[0] is wired, + // so it is safe to replay any pending batches durably accepted + // before a previous crash. Recovered items route to their + // original layer via the m_layer field; if layer-1's submitter + // is not wired yet they fall back to layer-0's pool. + if (m_layer == 0 && m_batchAppendWAL) { + m_worker->RecoverPendingBatchAppendWAL(); + } + } + + // Owner-side wait for any in-flight remote lock on this bucket. + // RemoteLeaseTable::IsLocked auto-clears expired leases, so a + // zombie holder beyond TTL doesn't stall Split/Merge here. + void WaitForRemoteBucketUnlocked(SizeType headID) const { + if (!m_worker || !m_worker->IsEnabled()) return; + unsigned bucket = COMMON::FineGrainedRWLock::BucketIndex(static_cast(headID)); + if (!m_remoteLeaseTable->IsLocked(bucket)) return; + // Bound the wait by the lease TTL. A shorter cap (we used + // 5 s previously) makes the local writer barge in while the + // remote Split is still mid-flight: if Split then broadcasts + // a HeadSync Delete on srcHead, the items we just appended + // disappear with the head and recall drops silently. After + // TTL, IsLocked auto-reclaims the lease so this loop exits + // naturally; the "stuck" log path is now truly anomalous. + const int kMaxRemoteBucketWaitMs = + m_remoteLeaseTable->GetTtlMs(); + auto deadline = std::chrono::steady_clock::now() + + std::chrono::milliseconds(kMaxRemoteBucketWaitMs); + while (m_remoteLeaseTable->IsLocked(bucket)) { + if (std::chrono::steady_clock::now() > deadline) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "WaitForRemoteBucketUnlocked: headID=%lld bucket=%u stuck for %d ms, proceeding\n", + (std::int64_t)headID, bucket, kMaxRemoteBucketWaitMs); + return; + } + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + } + + // Pack and enqueue a RemoteAppendRequest for an already-resolved + // remote owner. headVecBytes may be nullptr when the caller has no + // centroid bytes (plain Append into an existing head). + void EnqueueRemoteAppend(int nodeIndex, + SizeType headID, + int appendNum, + std::string posting, + const void* headVecBytes = nullptr) { + RemoteAppendRequest req; + req.m_headID = headID; + req.m_layer = m_layer; + if (headVecBytes != nullptr) { + req.m_headVec.assign(static_cast(headVecBytes), + m_vectorDataSize); + } + req.m_appendNum = appendNum; + req.m_appendPosting = std::move(posting); + m_worker->QueueRemoteAppend(nodeIndex, std::move(req)); } - ~ExtraDynamicSearcher() {} + // Single source of truth for "this head lives on a different node". + // Applies to every layer that has a TiKV-backed posting list, since + // DBKey(headID) = m_maxID*m_layer + headID means each layer's keys + // live in the same shared TiKV cluster and are owned by whichever + // node the owner ring assigns. Layer 0 (leaf vector postings) and + // layer 1+ (centroid postings written by recursive AddHeadIndex / + // DeleteIndex during a Split) both go through here. When true, + // outNodeIndex (if not null) is populated with the owner's node + // index. + // + // Every Split / Merge / Append code path that might touch a head + // it doesn't own MUST gate on this predicate so the invariant + // (only owners mutate their own postings) is enforced in exactly + // one place. + bool IsRemoteOwnedHead(SizeType headID, int* outNodeIndex = nullptr) { + if (!m_worker || !m_worker->IsEnabled()) return false; + auto target = m_worker->GetOwner(headID); + if (target.isLocal) return false; + if (outNodeIndex) *outNodeIndex = target.nodeIndex; + return true; + } + + // Scan a posting buffer for an entry whose VID matches headID + // (the head's own self-entry). Returns a pointer into the buffer + // at the start of the vector bytes (skipping VID + version + + // padding), or nullptr if no self-entry is present. Used by + // remote-append callers so the receiver can materialize a missing + // head index without waiting for BroadcastHeadSync. + const void* FindSelfEntryVectorBytes(SizeType headID, + const std::string& posting, + int recCount) const { + const uint8_t* basePtr = + reinterpret_cast(posting.data()); + for (int i = 0; i < recCount; ++i) { + const uint8_t* p = basePtr + i * m_vectorInfoSize; + if (*reinterpret_cast(p) == headID) { + return p + m_metaDataSize; + } + } + return nullptr; + } + + // Synchronous, fenced cross-owner write used by the Split path. + // Per the design's Split Happy Path: + // * The split holder already holds the local source-head lock. + // * For the remote child it must acquire the remote lock with a + // try-and-backoff protocol (try-lock-both). Failure here + // means another node is racing; abort so the caller can + // re-enqueue via SplitAsync. + // * The remote posting write is fenced (token attached) so a + // zombie holder past lease expiry cannot resurrect this + // write after another holder took over. + // * A WAL record is written before the cross-owner posting + // write and cleared on success. On failure the WAL drives a + // GC pass to delete the orphan partner posting (see + // SplitWAL.h); GC is best-effort and only affects recall. + // + // Returns Success on both-locked-and-written, Fail otherwise. + // On failure the caller should leave any partial state to the + // GC pass and re-enqueue the split. + ErrorCode TryWriteRemoteSplitChildFenced(SizeType srcHeadID, + SizeType remoteChildHeadID, + const void* remoteChildHeadVecBytes, + int appendNum, + std::string& posting) { + int ownerNode = -1; + if (!IsRemoteOwnedHead(remoteChildHeadID, &ownerNode)) { + return ErrorCode::Fail; + } + if (!m_worker || !m_worker->IsEnabled()) return ErrorCode::Fail; + + // Try-lock-both: acquire remote lock with bounded retry. + std::uint64_t token = 0; + constexpr int kMaxLockRetries = 5; + for (int attempt = 0; attempt < kMaxLockRetries; ++attempt) { + token = m_worker->SendRemoteLock(ownerNode, m_layer, + remoteChildHeadID, true, 0); + if (token != 0) break; + std::this_thread::sleep_for( + std::chrono::milliseconds(5 * (attempt + 1))); + } + if (token == 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split: failed to acquire remote lock for child %lld on node %d " + "after %d retries; abort and re-enqueue\n", + (std::int64_t)remoteChildHeadID, ownerNode, kMaxLockRetries); + return ErrorCode::Fail; + } + + // Write WAL Begin so a crash after the remote write but + // before completion is recoverable via GC. + std::uint64_t jobID = m_splitJobIdCounter.fetch_add(1) + 1; + if (m_splitWAL) { + Distributed::SplitWAL::Record r; + r.jobID = jobID; + r.srcHeadID = srcHeadID; + r.localChildHeadID = 0; + r.remoteChildHeadID = remoteChildHeadID; + r.remoteOwnerNodeIndex = ownerNode; + r.startTimestampSec = + std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()).count(); + r.stage = Distributed::SplitWAL::Stage::Begin; + m_splitWAL->Write(r); + } + + // Fenced sync remote append. Receiver validates the token + // against its lease table before applying. + auto headVec = std::make_shared( + static_cast(remoteChildHeadVecBytes), + m_vectorDataSize); + ErrorCode ec = m_worker->SendFencedRemoteAppend( + ownerNode, m_layer, remoteChildHeadID, headVec, + appendNum, posting, token); + + // Release the remote lock with the issued token. If our + // lease has expired in the meantime, Release will no-op on + // the owner side (the new holder's token won't match ours). + m_worker->SendRemoteLock(ownerNode, m_layer, remoteChildHeadID, + false, token); + + if (ec == ErrorCode::Success) { + // Clear WAL: both writes done. (The local-side Put + // happens in the caller's loop using the existing + // PutPostingToDB path.) + if (m_splitWAL) m_splitWAL->Clear(srcHeadID, jobID); + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split: fenced remote append failed for child %lld " + "on node %d (ec=%s); WAL kept for GC\n", + (std::int64_t)remoteChildHeadID, ownerNode, + Helper::Convert::ConvertToString(ec).c_str()); + } + return ec; + } virtual bool Available() override { @@ -503,15 +1165,25 @@ namespace SPTAG::SPANN { int vectorCount = 0; std::shared_ptr vecStr; bool hasHead = false; + // Batched version-byte read for this posting + globalID head. + std::vector rf_vids; + rf_vids.reserve(postVectorNum + 1); + for (SizeType j = 0; j < postVectorNum; j++) { + rf_vids.push_back(*((SizeType*)(postingP + j * m_vectorInfoSize))); + } + rf_vids.push_back(globalID); + std::vector rf_mapVers; + m_versionMap->BatchGetVersions(rf_vids, rf_mapVers); for (int j = 0; j < postVectorNum; j++, vectorId += m_vectorInfoSize) { uint8_t version = *(vectorId + sizeof(SizeType)); - SizeType VID = *((SizeType *)(vectorId)); + SizeType VID = rf_vids[j]; if (VID == globalID) vecStr = std::make_shared((char*)vectorId + m_metaDataSize, m_vectorDataSize); - if (m_versionMap->Deleted(VID) || m_versionMap->GetVersion(VID) != version) + uint8_t mapVer = rf_mapVers[j]; + if (mapVer == 0xfe || mapVer != version) continue; if (VID == globalID) hasHead = true; @@ -527,7 +1199,7 @@ namespace SPTAG::SPANN { } if (!hasHead && vecStr != nullptr) { - Serialize((char*)postingP + vectorCount * m_vectorInfoSize, globalID, m_versionMap->GetVersion(globalID), vecStr->data()); + Serialize((char*)postingP + vectorCount * m_vectorInfoSize, globalID, rf_mapVers.back(), vecStr->data()); vectorCount++; } if (vectorCount <= m_mergeThreshold) mergelist.insert(globalID); @@ -648,30 +1320,50 @@ namespace SPTAG::SPANN { localIndices.reserve(postVectorNum); uint8_t* vectorId = postingP; bool hasHead = false; - for (SizeType j = 0; j < postVectorNum; j++, vectorId += m_vectorInfoSize) + + // Pre-scan for invalid VIDs (treat as corruption marker + // that triggers retry of the GET, matching the original + // serial-loop behaviour) before issuing the batched + // version-byte read. { - //LOG(Helper::LogLevel::LL_Info, "vector index/total:id: %d/%d:%d\n", j, m_postingSizes[headID].load(), *(reinterpret_cast(vectorId))); - uint8_t version = *(vectorId + sizeof(SizeType)); - SizeType VID = *((SizeType*)(vectorId)); - if (VID < 0 || VID >= m_versionMap->Count()) - { - if (retry < 3) - { + bool sawInvalid = false; + SizeType maxVid = m_versionMap->Count(); + for (SizeType j = 0; j < postVectorNum; j++) { + SizeType VID = *((SizeType*)(postingP + j * m_vectorInfoSize)); + if (VID < 0 || VID >= maxVid) { sawInvalid = true; break; } + } + if (sawInvalid) { + if (retry < 3) { retry++; goto Retry; - } - else - { + } else { SPTAGLIB_LOG(Helper::LogLevel::LL_Error, - "Split fail: Get posting %lld fail after 3 times retries.\n", (std::int64_t)(headID)); + "Split fail: Get posting %lld fail after 3 times retries.\n", (std::int64_t)headID); return ErrorCode::DiskIOFail; } } - + } + + // Batched MultiGet for every entry's version byte plus headID's. + std::vector sp_vids; + sp_vids.reserve(postVectorNum + 1); + for (SizeType j = 0; j < postVectorNum; j++) { + sp_vids.push_back(*((SizeType*)(postingP + j * m_vectorInfoSize))); + } + sp_vids.push_back(headID); + std::vector sp_mapVers; + m_versionMap->BatchGetVersions(sp_vids, sp_mapVers); + + for (SizeType j = 0; j < postVectorNum; j++, vectorId += m_vectorInfoSize) + { + //LOG(Helper::LogLevel::LL_Info, "vector index/total:id: %d/%d:%d\n", j, m_postingSizes[headID].load(), *(reinterpret_cast(vectorId))); + uint8_t version = *(vectorId + sizeof(SizeType)); + SizeType VID = sp_vids[j]; + if (VID == headID) headVec = std::make_shared((char*)vectorId, m_vectorInfoSize); - //if (VID >= m_versionMap.Count()) SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "DEBUG: vector ID:%d total size:%d\n", VID, m_versionMap.Count()); - if (m_versionMap->Deleted(VID) || m_versionMap->GetVersion(VID) != version) continue; + uint8_t mapVer = sp_mapVers[j]; + if (mapVer == 0xfe || mapVer != version) continue; if (VID == headID) hasHead = true; localIndices.push_back(j); @@ -680,7 +1372,7 @@ namespace SPTAG::SPANN { SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Split fail: cannot find head in posting! headID:%lld\n", (std::int64_t)headID); return ErrorCode::Fail; } else { - *((uint8_t*)(headVec->data() + sizeof(SizeType))) = m_versionMap->GetVersion(headID); + *((uint8_t*)(headVec->data() + sizeof(SizeType))) = sp_mapVers.back(); } // double gcEndTime = sw.getElapsedMs(); // m_splitGcCost += gcEndTime; @@ -758,27 +1450,236 @@ namespace SPTAG::SPANN { } else { ks[1] = 1; } - SizeType newHeadVID = -1; - int first = 0; - for (int k : ks) { - if (args.counts[k] == 0) continue; - first = (k == 0) ? 0 : args.counts[0]; - newPostingLists[k].resize(args.counts[k] * m_vectorInfoSize); - char* ptr = (char*)(newPostingLists[k].c_str()); - for (int j = 0; j < args.counts[k]; j++, ptr += m_vectorInfoSize) + // === Phase A: precompute per-child plan (no I/O, no locks) === + // We resolve newHeadVID, isSameHead, and ownership for each of + // the two cluster children up-front so Phase B can acquire + // every lock the split will need before any DB write. This + // closes the strand window where k=0 wrote and k=1 then + // failed to lock, leaving cluster-1's vectors orphaned. + struct ChildPlan { + bool active = false; + bool isSameHead = false; + bool isRemote = false; + int ownerNode = -1; + SizeType newHeadVID = -1; + uint8_t version = 0; + }; + ChildPlan plans[2]; + { + bool tentativeSameHead = false; + for (int k : ks) { + if (args.counts[k] == 0) continue; + plans[k].active = true; + if (!tentativeSameHead && + m_headIndex->ComputeDistance(args.centers + k * args._D, headVec->c_str() + m_metaDataSize) < Epsilon) { + plans[k].isSameHead = true; + plans[k].newHeadVID = headID; + tentativeSameHead = true; + } else { + plans[k].newHeadVID = *((SizeType*)(postingP + args.clusterIdx[k] * m_vectorInfoSize)); + plans[k].version = *((uint8_t*)(postingP + args.clusterIdx[k] * m_vectorInfoSize + sizeof(SizeType))); + int owner = -1; + if (IsRemoteOwnedHead(plans[k].newHeadVID, &owner)) { + plans[k].isRemote = true; + plans[k].ownerNode = owner; + } + } + } + } + + // === Phase B: build per-child posting payloads (memory only) === + { + int first = 0; + for (int k : ks) { + if (!plans[k].active) continue; + first = (k == 0) ? 0 : args.counts[0]; + newPostingLists[k].resize(args.counts[k] * m_vectorInfoSize); + char* ptr = (char*)(newPostingLists[k].c_str()); + for (int j = 0; j < args.counts[k]; j++, ptr += m_vectorInfoSize) { + memcpy(ptr, postingList.c_str() + localIndices[first + j] * m_vectorInfoSize, m_vectorInfoSize); + } + if (plans[k].isSameHead && !hasHead) { + newPostingLists[k] += *headVec; + } + } + } + + // === Phase C: atomically acquire every lock the split needs === + // srcHead lock is already held above. We additionally need + // a per-VID local lock for each local newHead (!=headID), + // and a remote lease (with fencing token) for each remote + // newHead. Acquire in deterministic order (local: VID asc; + // remote: (ownerNode,bucket) asc) so two concurrent Splits + // touching overlapping heads can't deadlock. + // + // If ANY lock cannot be obtained, release whatever we got + // and re-enqueue via SplitAsync. No DB write has happened + // yet, so nothing strands. + std::vector> localChildLocks; + struct RemoteLeaseHeld { std::uint64_t token; int refcount; SizeType sampleVID; }; + std::map, RemoteLeaseHeld> remoteTokens; + + auto bucketKey = [](int owner, SizeType vid) { + return std::make_pair(owner, + COMMON::FineGrainedRWLock::BucketIndex(static_cast(vid))); + }; + + auto releaseRemoteTokens = [&]() { + if (!m_worker) { remoteTokens.clear(); return; } + for (auto& kv : remoteTokens) { + m_worker->SendRemoteLock(kv.first.first, m_layer, + kv.second.sampleVID, false, kv.second.token); + } + remoteTokens.clear(); + }; + + auto reenqueueAndExit = [&](const char* reason) -> ErrorCode { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split: lock acquisition failed (%s) for srcHead %lld; re-enqueueing via SplitAsync\n", + reason, (std::int64_t)headID); + releaseRemoteTokens(); + localChildLocks.clear(); // RAII unlock { - memcpy(ptr, postingList.c_str() + localIndices[first + j] * m_vectorInfoSize, m_vectorInfoSize); + std::unique_lock tmplock(m_splitListLock); + m_splitList.unsafe_erase(headID); + } + SplitAsync(headID, postingList.size() / m_vectorInfoSize); + return ErrorCode::Success; + }; + + // C. Acquire newHead locks (one pass over plans[]). + // Local children: try_lock with up to 20 retries + 3*N ms backoff. + // Remote children: SendRemoteLock (receiver-side TryAcquire) + // with the same retry schedule; coalesce same-(owner,bucket) + // via remoteTokens so two children on one bucket share a lease. + // Any acquisition failure bails to reenqueueAndExit -- that is + // itself the retry mechanism (job re-queues via SplitAsync), + // which also breaks any potential lock cycle. Acquisition + // order is therefore irrelevant. + { + SizeType prevLocalVid = -1; + for (int k = 0; k < 2; ++k) { + const auto& p = plans[k]; + if (!p.active || p.isSameHead) continue; + + if (p.isRemote) { + unsigned bucket = COMMON::FineGrainedRWLock::BucketIndex( + static_cast(p.newHeadVID)); + auto key = std::make_pair(p.ownerNode, bucket); + auto it = remoteTokens.find(key); + if (it != remoteTokens.end()) { + // Same (owner,bucket) already leased by a prior + // child; reuse the token and bump refcount. + it->second.refcount++; + continue; + } + std::uint64_t token = 0; + for (int attempt = 0; attempt < 20; ++attempt) { + token = m_worker->SendRemoteLock(p.ownerNode, m_layer, + p.newHeadVID, true, 0); + if (token != 0) break; + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split: remote newHead VID %lld owner=%d bucket=%u lease busy (attempt %d)\n", + (std::int64_t)p.newHeadVID, p.ownerNode, bucket, attempt + 1); + std::this_thread::sleep_for(std::chrono::milliseconds(3 * (attempt + 1))); + } + if (token == 0) { + return reenqueueAndExit("remote child lock"); + } + remoteTokens[key] = { token, 1, p.newHeadVID }; + } else { + if (p.newHeadVID == headID) continue; // srcHead already held + if (p.newHeadVID == prevLocalVid) continue; // dedupe k=1 vs k=0 + + std::unique_lock ul(m_rwLocks[p.newHeadVID], std::defer_lock); + int rtry = 0; + while (!ul.try_lock() && rtry < 20) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split: local newHead VID %lld lock busy (attempt %d)\n", + (std::int64_t)p.newHeadVID, rtry + 1); + rtry++; + std::this_thread::sleep_for(std::chrono::milliseconds(3 * rtry)); + } + if (!ul.owns_lock()) { + return reenqueueAndExit("local child lock"); + } + localChildLocks.push_back(std::move(ul)); + prevLocalVid = p.newHeadVID; + } + } + } + + + // === Phase D: execute per-child writes (all locks held) === + // On any unrecoverable failure we walk `committed` in + // reverse to undo the prior children of THIS Split and + // return ErrorCode::Fail so the caller (Append → AddIndex + // → BatchAppend) sees the failure and can retry from the + // top. srcHead is intentionally preserved: the trailing + // `if (!theSameHead) DeleteIndex(headID)` block is gated + // behind us returning Success. + struct CommittedChildRecord { + enum class Kind { SameHead, LocalNew, LocalExisting, Remote }; + Kind kind; + SizeType vid; + }; + std::vector committed; + auto rollbackCommitted = [&]() { + for (auto it = committed.rbegin(); it != committed.rend(); ++it) { + switch (it->kind) { + case CommittedChildRecord::Kind::SameHead: { + // Restore srcHead's pre-Split posting that we + // overwrote with cluster-k's subset. + auto rret = db->Put(DBKey(headID), postingList, + MaxTimeout, nullptr); + if (rret != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "Split rollback: failed to restore srcHead %lld posting (ec=%s); recall may drop until next Merge\n", + (std::int64_t)headID, + Helper::Convert::ConvertToString(rret).c_str()); + } + theSameHead = false; + break; + } + case CommittedChildRecord::Kind::LocalNew: + m_headIndex->DeleteIndex(it->vid, m_layer + 1); + (void)db->Delete(DBKey(it->vid)); + break; + case CommittedChildRecord::Kind::LocalExisting: + // The merged posting overwrote an existing head; + // we did not stash its prior contents so we + // cannot cheaply restore it. srcHead still + // holds the original vectors (we did not delete + // it), so a search dedupes the duplication via + // the version map. Best-effort. + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split rollback: local-existing head %lld merged-posting NOT restored; duplication with srcHead %lld accepted\n", + (std::int64_t)it->vid, (std::int64_t)headID); + break; + case CommittedChildRecord::Kind::Remote: + m_headIndex->DeleteIndex(it->vid, m_layer + 1); + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split rollback: remote head %lld removed from local BKT; stale owner-side posting will be GC'd by next Merge round\n", + (std::int64_t)it->vid); + break; + } } - if (!theSameHead && m_headIndex->ComputeDistance(args.centers + k * args._D, headVec->c_str() + m_metaDataSize) < Epsilon) { + committed.clear(); + }; + SizeType newHeadVID = -1; + for (int k : ks) { + if (!plans[k].active) continue; + + if (plans[k].isSameHead) { newHeadsID[k] = headID; newHeadsVec[k] = std::make_shared(headVec->c_str() + m_metaDataSize, m_vectorDataSize); newHeadVID = headID; theSameHead = true; - if (!hasHead) newPostingLists[k] += *headVec; - auto splitPutBegin = std::chrono::high_resolution_clock::now(); if ((ret=db->Put(DBKey(newHeadVID), newPostingLists[k], MaxTimeout, &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) { SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to override posting %lld\n", (std::int64_t)(newHeadVID)); + rollbackCommitted(); + releaseRemoteTokens(); return ret; } CheckCentroid(newHeadVID, newPostingLists[k], "Split-SameHead"); @@ -787,160 +1688,267 @@ namespace SPTAG::SPANN { m_stat.m_putCost += elapsedMSeconds; m_stat.m_theSameHeadNum++; m_stat.m_splitSameHeadCount.fetch_add(1, std::memory_order_relaxed); - } - else { - newHeadVID = *((SizeType*)(postingP + args.clusterIdx[k] * m_vectorInfoSize)); - uint8_t version = *((uint8_t*)(postingP + args.clusterIdx[k] * m_vectorInfoSize + sizeof(SizeType))); - + committed.push_back({CommittedChildRecord::Kind::SameHead, newHeadVID}); + } else { + newHeadVID = plans[k].newHeadVID; + uint8_t version = plans[k].version; newHeadsID[k] = newHeadVID; newHeadsVec[k] = std::make_shared((char *)(args.centers + k * args._D), m_vectorDataSize); - std::unique_lock anotherLock(m_rwLocks[newHeadVID], std::defer_lock); - if (m_rwLocks.hash_func(newHeadVID) != m_rwLocks.hash_func(headID)) - { - int retry = 0; - while (!anotherLock.try_lock() && retry < 20) - { - SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, - "Split: new head VID %lld is being locked. Wait for lock and do " - "merging after getting lock... (attempt %d)\n", - (std::int64_t)(newHeadVID), retry + 1); - retry++; - std::this_thread::sleep_for(std::chrono::milliseconds(3 * retry)); - } - if (!anotherLock.owns_lock()) - { - SPTAGLIB_LOG(Helper::LogLevel::LL_Error, - "Split: new head VID %lld is being locked after %d retries. Skip merging and return split failed...\n", - (std::int64_t)(newHeadVID), retry); - { - std::unique_lock tmplock(m_splitListLock); - m_splitList.unsafe_erase(headID); - } - SplitAsync(headID, postingList.size() / m_vectorInfoSize); - return ErrorCode::Success; - } - } - - if (m_headIndex->ContainSample(newHeadVID, m_layer + 1)) { - //SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Split: new head VID %lld already exists in head index. Do merging...\n", (std::int64_t)(newHeadVID)); - m_stat.m_splitExistingHeadMergeCount.fetch_add(1, std::memory_order_relaxed); + bool headExistsInIndex = m_headIndex->ContainSample(newHeadVID, m_layer + 1); + if (!plans[k].isRemote) { + // Local-owned newHead path (lock already held in localChildLocks) + if (headExistsInIndex) { + m_stat.m_splitExistingHeadMergeCount.fetch_add(1, std::memory_order_relaxed); - std::string mergedPostingList; - std::set vectorIdSet; - std::string currentPostingList; - { + std::string mergedPostingList; + std::set vectorIdSet; + std::string currentPostingList; if ((ret = db->Get(DBKey(newHeadVID), ¤tPostingList, MaxTimeout, - &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) - { + &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) { SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to get posting %lld\n", (std::int64_t)(newHeadVID)); + rollbackCommitted(); + releaseRemoteTokens(); return ret; } - } - auto *postingO = reinterpret_cast(newPostingLists[k].data()); - size_t postVectorNumO = newPostingLists[k].size() / m_vectorInfoSize; - int currentLength = 0; - bool hasHeadO = false; - for (int j = 0; j < postVectorNumO; j++, postingO += m_vectorInfoSize) - { - SizeType VID = *((SizeType *)(postingO)); - if (vectorIdSet.insert(VID).second) { - mergedPostingList += newPostingLists[k].substr(j * m_vectorInfoSize, m_vectorInfoSize); + auto *postingO = reinterpret_cast(newPostingLists[k].data()); + size_t postVectorNumO = newPostingLists[k].size() / m_vectorInfoSize; + int currentLength = 0; + bool hasHeadO = false; + for (int j = 0; j < (int)postVectorNumO; j++, postingO += m_vectorInfoSize) { + SizeType VID = *((SizeType *)(postingO)); + if (vectorIdSet.insert(VID).second) { + mergedPostingList += newPostingLists[k].substr(j * m_vectorInfoSize, m_vectorInfoSize); + currentLength++; + if (VID == newHeadVID) hasHeadO = true; + } + } + + if (!hasHeadO) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "Split: after merging head VID %lld, the head vector is missing in posting list. Add head vector back to posting list.\n", (std::int64_t)(newHeadVID)); + vectorIdSet.insert(newHeadVID); + mergedPostingList = postingList.substr(args.clusterIdx[k] * m_vectorInfoSize, m_vectorInfoSize) + mergedPostingList; currentLength++; - if (VID == newHeadVID) hasHeadO = true; } - } - if (!hasHeadO) { - SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "Split: after merging head VID %lld, the head vector is missing in posting list. Add head vector back to posting list.\n", (std::int64_t)(newHeadVID)); - vectorIdSet.insert(newHeadVID); - mergedPostingList = postingList.substr(args.clusterIdx[k] * m_vectorInfoSize, m_vectorInfoSize) + mergedPostingList; - currentLength++; - } + auto *postingK = reinterpret_cast(currentPostingList.data()); + size_t newPostVectorNum = currentPostingList.size() / m_vectorInfoSize; + // Batched version-byte read for this posting we're merging into. + std::vector sm_vids; + sm_vids.reserve(newPostVectorNum); + for (size_t j = 0; j < newPostVectorNum; j++) { + sm_vids.push_back(*((SizeType*)(postingK + j * m_vectorInfoSize))); + } + std::vector sm_mapVers; + m_versionMap->BatchGetVersions(sm_vids, sm_mapVers); + for (int j = 0; j < (int)newPostVectorNum; j++, postingK += m_vectorInfoSize) { + SizeType VID = sm_vids[j]; + uint8_t verK = *(postingK + sizeof(SizeType)); + uint8_t mapVer = sm_mapVers[j]; + if (mapVer == 0xfe || mapVer != verK) continue; + if (vectorIdSet.find(VID) != vectorIdSet.end()) continue; + vectorIdSet.insert(VID); + mergedPostingList += currentPostingList.substr(j * m_vectorInfoSize, m_vectorInfoSize); + currentLength++; + } - auto *postingK = reinterpret_cast(currentPostingList.data()); - size_t newPostVectorNum = currentPostingList.size() / m_vectorInfoSize; - for (int j = 0; j < newPostVectorNum; j++, postingK += m_vectorInfoSize) - { - SizeType VID = *((SizeType *)(postingK)); - uint8_t version = *(postingK + sizeof(SizeType)); + if (currentLength > (m_postingSizeLimit + m_bufferSizeLimit) && m_opt->m_storage == Storage::FILEIO) { + /* + SPTAGLIB_LOG( + Helper::LogLevel::LL_Warning, + "Split: merged posting list length %d exceeds hard limit %d after merging head " + "VID %lld. Cut to limit and put back to db.\n", + currentLength, m_postingSizeLimit + m_bufferSizeLimit, (std::int64_t)(newHeadVID)); + */ + mergedPostingList.resize((m_postingSizeLimit + m_bufferSizeLimit) * m_vectorInfoSize); + currentLength = m_postingSizeLimit + m_bufferSizeLimit; + } - if (m_versionMap->Deleted(VID) || m_versionMap->GetVersion(VID) != version) - continue; + auto splitPutBegin = std::chrono::high_resolution_clock::now(); + if ((ret = db->Put(DBKey(newHeadVID), mergedPostingList, MaxTimeout, + &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to put posting %lld\n", + (std::int64_t)(newHeadVID)); + rollbackCommitted(); + releaseRemoteTokens(); + return ret; + } + CheckCentroid(newHeadVID, mergedPostingList, "Split-MergePosting"); + auto splitPutEnd = std::chrono::high_resolution_clock::now(); + elapsedMSeconds = std::chrono::duration_cast(splitPutEnd - splitPutBegin).count(); + m_stat.m_putCost += elapsedMSeconds; - if (vectorIdSet.find(VID) != vectorIdSet.end()) - continue; + committed.push_back({CommittedChildRecord::Kind::LocalExisting, newHeadVID}); - vectorIdSet.insert(VID); - mergedPostingList += currentPostingList.substr(j * m_vectorInfoSize, m_vectorInfoSize); - currentLength++; - } + if (currentLength > m_postingSizeLimit) { + m_stat.m_splitExistingHeadMergeResplitCount.fetch_add(1, std::memory_order_relaxed); + SplitAsync(newHeadVID, currentLength); + } + } else { + auto splitPutBegin = std::chrono::high_resolution_clock::now(); + if ((ret = db->Put(DBKey(newHeadVID), newPostingLists[k], MaxTimeout, &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to add new posting %lld\n", (std::int64_t)(newHeadVID)); + rollbackCommitted(); + releaseRemoteTokens(); + return ret; + } + CheckCentroid(newHeadVID, newPostingLists[k], "Split-NewPosting"); + auto splitPutEnd = std::chrono::high_resolution_clock::now(); + elapsedMSeconds = std::chrono::duration_cast(splitPutEnd - splitPutBegin).count(); + m_stat.m_putCost += elapsedMSeconds; + + auto updateHeadBegin = std::chrono::high_resolution_clock::now(); + if ((ret = m_headIndex->AddHeadIndex(args.centers + k * args._D, newHeadVID, version, m_opt->m_dim, m_layer + 1, p_exWorkSpace)) != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to update head index %lld\n", (std::int64_t)(newHeadVID)); + if (db->Delete(DBKey(newHeadVID)) != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to delete gc posting %lld\n", (std::int64_t)(newHeadVID)); + } + rollbackCommitted(); + releaseRemoteTokens(); + return ret; + } + splitNewHeadCount++; + m_stat.m_splitCreatedNewHeadCount.fetch_add(1, std::memory_order_relaxed); + auto updateHeadEnd = std::chrono::high_resolution_clock::now(); + elapsedMSeconds = std::chrono::duration_cast(updateHeadEnd - updateHeadBegin).count(); + m_stat.m_updateHeadCost += elapsedMSeconds; - if (currentLength > (m_postingSizeLimit + m_bufferSizeLimit) && m_opt->m_storage == Storage::FILEIO) - { - /* - SPTAGLIB_LOG( - Helper::LogLevel::LL_Warning, - "Split: merged posting list length %d exceeds hard limit %d after merging head " - "VID %lld. Cut to limit and put back to db.\n", - currentLength, m_postingSizeLimit + m_bufferSizeLimit, (std::int64_t)(newHeadVID)); - */ - mergedPostingList.resize((m_postingSizeLimit + m_bufferSizeLimit) * m_vectorInfoSize); - currentLength = m_postingSizeLimit + m_bufferSizeLimit; + committed.push_back({CommittedChildRecord::Kind::LocalNew, newHeadVID}); + } + } else { + // Remote-owned newHead: write posting via fenced + // RemoteAppend to the owner. Local BKT head index + // is still updated here for not-yet-known heads; + // peers learn via BroadcastHeadSync below. + auto leaseIt = remoteTokens.find(bucketKey(plans[k].ownerNode, newHeadVID)); + std::uint64_t token = (leaseIt != remoteTokens.end()) ? leaseIt->second.token : 0; + + std::uint64_t jobID = m_splitJobIdCounter.fetch_add(1) + 1; + if (m_splitWAL) { + Distributed::SplitWAL::Record r; + r.jobID = jobID; + r.srcHeadID = headID; + r.localChildHeadID = 0; + r.remoteChildHeadID = newHeadVID; + r.remoteOwnerNodeIndex = plans[k].ownerNode; + r.startTimestampSec = + std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()).count(); + r.stage = Distributed::SplitWAL::Stage::Begin; + m_splitWAL->Write(r); } - auto splitPutBegin = std::chrono::high_resolution_clock::now(); - if ((ret = db->Put(DBKey(newHeadVID), mergedPostingList, MaxTimeout, - &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) - { - SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to put posting %lld\n", - (std::int64_t)(newHeadVID)); - return ret; + auto remoteHeadVec = std::make_shared( + (const char *)(args.centers + k * args._D), m_vectorDataSize); + + // Bounded retry: a fencing-token rejection means the + // owner's lease TTL expired between our acquire and + // our send (rare; lease TTL is 30 s), or the owner + // is momentarily backed up on a TiKV Deadline. + // Release the stale token, re-acquire, and resend. + // Matches the local lock-acquire retry budget (20 + // attempts, linear 3*(attempt) ms backoff, ~570 ms + // worst-case) so transient TiKV slowness doesn't + // force a Split rollback. After 20 attempts we + // surface the failure to the caller so they can + // retry the whole AddIndex op at the user level + // instead of silently dropping cluster vectors. + constexpr int kFenceRetries = 20; + ErrorCode ec = ErrorCode::Fail; + for (int attempt = 0; attempt < kFenceRetries; ++attempt) { + if (attempt > 0) { + std::this_thread::sleep_for( + std::chrono::milliseconds(3 * attempt)); + // Release the stale lease (best-effort: + // the owner may have auto-released it via + // TTL already, in which case this no-ops). + if (leaseIt != remoteTokens.end()) { + m_worker->SendRemoteLock( + plans[k].ownerNode, m_layer, + leaseIt->second.sampleVID, + false, leaseIt->second.token); + leaseIt->second.token = 0; + } + std::uint64_t newTok = m_worker->SendRemoteLock( + plans[k].ownerNode, m_layer, + plans[k].newHeadVID, true, 0); + if (newTok == 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split: fenced retry %d/%d cannot re-acquire lease for child %lld on node %d\n", + attempt + 1, kFenceRetries, + (std::int64_t)newHeadVID, plans[k].ownerNode); + continue; + } + token = newTok; + if (leaseIt != remoteTokens.end()) { + leaseIt->second.token = newTok; + } + } + ec = m_worker->SendFencedRemoteAppend( + plans[k].ownerNode, m_layer, newHeadVID, remoteHeadVec, + (int)(newPostingLists[k].size() / m_vectorInfoSize), + newPostingLists[k], token); + if (ec == ErrorCode::Success) break; + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "Split: fenced remote append attempt %d/%d failed for child %lld on node %d (ec=%s)\n", + attempt + 1, kFenceRetries, + (std::int64_t)newHeadVID, plans[k].ownerNode, + Helper::Convert::ConvertToString(ec).c_str()); } - CheckCentroid(newHeadVID, mergedPostingList, "Split-MergePosting"); - auto splitPutEnd = std::chrono::high_resolution_clock::now(); - elapsedMSeconds = - std::chrono::duration_cast(splitPutEnd - splitPutBegin) - .count(); - m_stat.m_putCost += elapsedMSeconds; - - if (currentLength > m_postingSizeLimit) - { - m_stat.m_splitExistingHeadMergeResplitCount.fetch_add(1, std::memory_order_relaxed); - SplitAsync(newHeadVID, currentLength); + + if (ec == ErrorCode::Success) { + if (m_splitWAL) m_splitWAL->Clear(headID, jobID); + if (headExistsInIndex) { + m_stat.m_splitExistingHeadMergeCount.fetch_add(1, std::memory_order_relaxed); + } + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "Split: fenced remote append exhausted %d retries for child %lld on node %d; rolling back srcHead %lld and returning Fail\n", + kFenceRetries, (std::int64_t)newHeadVID, + plans[k].ownerNode, (std::int64_t)headID); + if (m_splitWAL) m_splitWAL->Clear(headID, jobID); + rollbackCommitted(); + releaseRemoteTokens(); + return ErrorCode::Fail; } - } else { - auto splitPutBegin = std::chrono::high_resolution_clock::now(); - if ((ret=db->Put(DBKey(newHeadVID), newPostingLists[k], MaxTimeout, &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) { - SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to add new posting %lld\n", (std::int64_t)(newHeadVID)); - return ret; + + // Release this child's remote lease as soon as the + // remote write is done (refcount-aware for the rare + // case both children share a bucket). + if (leaseIt != remoteTokens.end()) { + if (--leaseIt->second.refcount <= 0) { + m_worker->SendRemoteLock(plans[k].ownerNode, m_layer, + leaseIt->second.sampleVID, + false, leaseIt->second.token); + remoteTokens.erase(leaseIt); + } } - CheckCentroid(newHeadVID, newPostingLists[k], "Split-NewPosting"); - auto splitPutEnd = std::chrono::high_resolution_clock::now(); - elapsedMSeconds = std::chrono::duration_cast(splitPutEnd - splitPutBegin).count(); - m_stat.m_putCost += elapsedMSeconds; - - auto updateHeadBegin = std::chrono::high_resolution_clock::now(); - if ((ret = m_headIndex->AddHeadIndex(args.centers + k * args._D, newHeadVID, version, m_opt->m_dim, m_layer + 1, p_exWorkSpace)) != ErrorCode::Success) { - SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to update head index %lld\n", (std::int64_t)(newHeadVID)); - if (db->Delete(DBKey(newHeadVID)) != ErrorCode::Success) { - SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to delete gc posting %lld\n", (std::int64_t)(newHeadVID)); + + // For a new head we still need to register it in the + // local BKT so head-search can route to it; HeadSync + // below broadcasts to peers. + if (!headExistsInIndex) { + auto updateHeadBegin = std::chrono::high_resolution_clock::now(); + if ((ret = m_headIndex->AddHeadIndex(args.centers + k * args._D, newHeadVID, version, m_opt->m_dim, m_layer + 1, p_exWorkSpace)) != ErrorCode::Success) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to update head index %lld\n", (std::int64_t)(newHeadVID)); + rollbackCommitted(); + releaseRemoteTokens(); + return ret; } - return ret; + splitNewHeadCount++; + m_stat.m_splitCreatedNewHeadCount.fetch_add(1, std::memory_order_relaxed); + auto updateHeadEnd = std::chrono::high_resolution_clock::now(); + elapsedMSeconds = std::chrono::duration_cast(updateHeadEnd - updateHeadBegin).count(); + m_stat.m_updateHeadCost += elapsedMSeconds; } - splitNewHeadCount++; - m_stat.m_splitCreatedNewHeadCount.fetch_add(1, std::memory_order_relaxed); - auto updateHeadEnd = std::chrono::high_resolution_clock::now(); - elapsedMSeconds = std::chrono::duration_cast(updateHeadEnd - updateHeadBegin).count(); - m_stat.m_updateHeadCost += elapsedMSeconds; + committed.push_back({CommittedChildRecord::Kind::Remote, newHeadVID}); } - if (m_rwLocks.hash_func(newHeadVID) != m_rwLocks.hash_func(headID)) anotherLock.unlock(); } - //SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Head id: %d split into : %d, length: %d\n", headID, newHeadVID, args.counts[k]); } + if (!theSameHead) { m_headIndex->DeleteIndex(headID, m_layer + 1); if ((ret=db->Delete(DBKey(headID))) != ErrorCode::Success) @@ -950,6 +1958,44 @@ namespace SPTAG::SPANN { } } + // Broadcast HeadSync to peer nodes when the head update lands + // in our local BKT (in-memory, per-compute). Lower-layer head + // adds that resolve to m_extraSearchers[m_layer+1]->AddIndex + // already write to shared TiKV so re-broadcasting them would + // only duplicate. + if (m_worker && m_worker->IsEnabled() + && m_headIndex->GetDiskIndex(m_layer + 1) == nullptr) { + std::vector headSyncEntries; + for (int k = 0; k < 2; k++) { + if (args.counts[k] == 0 || (int)newHeadsID.size() <= k) continue; + HeadSyncEntry entry; + entry.op = HeadSyncEntry::Op::Add; + entry.headVID = newHeadsID[k]; + entry.m_layer = m_layer; + entry.headVector.assign(args.centers + k * args._D, args.centers + k * args._D + m_vectorDataSize); + headSyncEntries.push_back(std::move(entry)); + } + if (!theSameHead) { + HeadSyncEntry entry; + entry.op = HeadSyncEntry::Op::Delete; + entry.headVID = headID; + entry.m_layer = m_layer; + headSyncEntries.push_back(std::move(entry)); + } + if (!headSyncEntries.empty()) { + // Durably persist to TiKV first, then broadcast. + // Per design, broadcast is a best-effort latency + // optimization; TiKV is the source of truth. + // Shard = owning node so each owner advances its + // own version counter independently. + if (m_headSyncLog) { + int shard = m_worker->GetWorkerNodeIndex(); + m_headSyncLog->Append(shard, headSyncEntries); + } + m_worker->BroadcastHeadSync(headSyncEntries); + } + } + { std::unique_lock tmplock(m_splitListLock); //SPTAGLIB_LOG(Helper::LogLevel::LL_Info,"erase: %d\n", headID); @@ -1009,6 +2055,11 @@ namespace SPTAG::SPANN { std::string mergedPostingList; std::set vectorIdSet; + // Tracks the loser VID after a successful merge so we can + // broadcast a HeadSync Delete entry to peers after releasing + // the per-head RWLock. + SizeType deletedHeadVID = -1; + std::string currentPostingList; ErrorCode ret; { @@ -1029,14 +2080,26 @@ namespace SPTAG::SPANN { int currentLength = 0; uint8_t* vectorId = postingP; std::shared_ptr headVec; - for (int j = 0; j < postVectorNum; j++, vectorId += m_vectorInfoSize) + // Batch one TiKV MultiGet for the entire posting's version + // bytes (plus the head's own version) instead of two serial + // TiKV roundtrips per entry. Last slot is headID's version. + std::vector mp_vids; + mp_vids.reserve(postVectorNum + 1); + for (size_t j = 0; j < postVectorNum; j++) { + mp_vids.push_back(*((SizeType*)(postingP + j * m_vectorInfoSize))); + } + mp_vids.push_back(headID); + std::vector mp_mapVers; + m_versionMap->BatchGetVersions(mp_vids, mp_mapVers); + for (int j = 0; j < (int)postVectorNum; j++, vectorId += m_vectorInfoSize) { - SizeType VID = *((SizeType*)(vectorId)); + SizeType VID = mp_vids[j]; uint8_t version = *(vectorId + sizeof(SizeType)); if (VID == headID) { headVec = std::make_shared((char*)vectorId, m_vectorInfoSize); } - if (m_versionMap->Deleted(VID) || m_versionMap->GetVersion(VID) != version) continue; + uint8_t mapVer = mp_mapVers[j]; + if (mapVer == 0xfe || mapVer != version) continue; vectorIdSet.insert(VID); mergedPostingList += currentPostingList.substr(j * m_vectorInfoSize, m_vectorInfoSize); currentLength++; @@ -1046,7 +2109,7 @@ namespace SPTAG::SPANN { SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "MergePostings fail: cannot find head vector in posting! headID:%lld\n", (std::int64_t)headID); return ErrorCode::Fail; } else { - *((uint8_t*)(headVec->data() + sizeof(SizeType))) = m_versionMap->GetVersion(headID); + *((uint8_t*)(headVec->data() + sizeof(SizeType))) = mp_mapVers.back(); } if (currentLength > m_mergeThreshold) @@ -1076,6 +2139,17 @@ namespace SPTAG::SPANN { m_headIndex->SearchHeadIndex(queryResults, m_layer + 1, p_exWorkSpace); std::string nextPostingList; + // If a candidate is unavailable (remote lease busy or local + // lock held by a peer op), skip it and try the next neighbor + // instead of re-enqueueing the whole Merge job. Re-enqueue + // is a livelock trap when two adjacent heads pick each other + // as the top merge candidate -- each fails to lock the other, + // both re-enqueue, and the new copies race back through the + // same path with zero backoff. Skipping degrades to "no + // merge this round", which is fine: the head will become + // merge-eligible again in the next round once its posting + // list crosses the threshold. + for (int i = 1; i < queryResults.GetResultNum(); ++i) { BasicResult* queryResult = queryResults.GetResult(i); @@ -1089,27 +2163,45 @@ namespace SPTAG::SPANN { std::set nextVectorIdSet; int deletedLength = 0; { + RemoteLeaseGuard remoteLease; std::unique_lock anotherLock(m_rwLocks[queryResult->VID], std::defer_lock); - // SPTAGLIB_LOG(Helper::LogLevel::LL_Info,"Locked: %d, to be lock: %d\n", headID, queryResult->VID); - if (m_rwLocks.hash_func(queryResult->VID) != m_rwLocks.hash_func(headID)) { - if (!anotherLock.try_lock()) { - auto* curJob = new MergeAsyncJob(this, headID, nullptr); - // Re-queue counts as a new submission; matched by the - // m_mergeJobsInFlight-- / m_totalMergeCompleted++ in - // MergeAsyncJob::exec(). Without these increments - // m_mergeJobsInFlight underflows to a huge uint64 - // and m_totalMergeCompleted exceeds m_totalMergeSubmitted. - m_mergeJobsInFlight++; - m_totalMergeSubmitted++; - m_splitThreadPool->add(curJob); - return ErrorCode::Success; + + bool isRemoteCandidate = false; + int remoteNodeIndex = -1; + if (m_worker && m_worker->IsEnabled()) { + auto target = m_worker->GetOwner(queryResult->VID); + isRemoteCandidate = !target.isLocal; + remoteNodeIndex = target.nodeIndex; + } + + if (isRemoteCandidate) { + if (!remoteLease.acquire(m_worker, remoteNodeIndex, m_layer, queryResult->VID)) { + continue; + } + } else { + if (m_rwLocks.hash_func(queryResult->VID) != m_rwLocks.hash_func(headID)) { + if (!anotherLock.try_lock()) { + continue; + } } + if (!m_headIndex->ContainSample(queryResult->VID, m_layer + 1)) continue; } - if (!m_headIndex->ContainSample(queryResult->VID, m_layer + 1)) continue; + if ((ret=db->Get(DBKey(queryResult->VID), &nextPostingList, MaxTimeout, &(p_exWorkSpace->m_diskRequests))) != ErrorCode::Success) { + if (ret == ErrorCode::Key_NotFound) { + // Candidate posting no longer exists (raced with + // another split/merge). Skip and try the next + // neighbor regardless of locality. + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "MergePostings: candidate %lld not found (stale); skipping\n", + (std::int64_t)(queryResult->VID)); + continue; + } + // Real IO failure -- propagate, do not silently skip. SPTAGLIB_LOG(Helper::LogLevel::LL_Error, - "Fail to get to be merged posting: %lld, get size:%d\n", - (std::int64_t)(queryResult->VID), (int)(nextPostingList.size())); + "Fail to get to be merged posting: %lld, get size:%d (ec=%s)\n", + (std::int64_t)(queryResult->VID), (int)(nextPostingList.size()), + Helper::Convert::ConvertToString(ret).c_str()); PrintErrorInPosting(nextPostingList, queryResult->VID); return ret; } @@ -1117,12 +2209,21 @@ namespace SPTAG::SPANN { postVectorNum = nextPostingList.size() / m_vectorInfoSize; vectorId = postingP; int nextLength = 0; - for (int j = 0; j < postVectorNum; j++, vectorId += m_vectorInfoSize) + // Batched version-byte read for this next posting. + std::vector mp_next_vids; + mp_next_vids.reserve(postVectorNum); + for (size_t j = 0; j < postVectorNum; j++) { + mp_next_vids.push_back(*((SizeType*)(postingP + j * m_vectorInfoSize))); + } + std::vector mp_next_mapVers; + m_versionMap->BatchGetVersions(mp_next_vids, mp_next_mapVers); + for (int j = 0; j < (int)postVectorNum; j++, vectorId += m_vectorInfoSize) { - SizeType VID = *((SizeType*)(vectorId)); + SizeType VID = mp_next_vids[j]; uint8_t version = *(vectorId + sizeof(SizeType)); if (VID == queryResult->VID) resultVec = std::make_shared((char*)vectorId, m_vectorInfoSize); - if (m_versionMap->Deleted(VID) || m_versionMap->GetVersion(VID) != version) continue; + uint8_t mapVer = mp_next_mapVers[j]; + if (mapVer == 0xfe || mapVer != version) continue; if (vectorIdSet.find(VID) == vectorIdSet.end()) { nextVectorIdSet.insert(VID); mergedPostingList += nextPostingList.substr(j * m_vectorInfoSize, m_vectorInfoSize); @@ -1149,9 +2250,18 @@ namespace SPTAG::SPANN { m_headIndex->DeleteIndex(queryResult->VID, m_layer + 1); if ((ret=db->Delete(DBKey(queryResult->VID))) != ErrorCode::Success) { - SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to delete old posting %lld in Merge\n", (std::int64_t)(queryResult->VID)); + std::string location = isRemoteCandidate + ? ("node" + std::to_string(remoteNodeIndex)) + : std::string("local"); + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "MergePostings: failed to delete old posting %lld in Merge (ec=%s), location=%s; survivor %lld is durable\n", + (std::int64_t)queryResult->VID, + Helper::Convert::ConvertToString(ret).c_str(), + location.c_str(), + (std::int64_t)headID); return ret; } + deletedHeadVID = queryResult->VID; nextHeadID = headID; nextHeadVec = headVec; deletedHeadVec = resultVec; @@ -1173,13 +2283,17 @@ namespace SPTAG::SPANN { SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Fail to delete old posting %lld in Merge\n", (std::int64_t)(headID)); return ret; } + deletedHeadVID = headID; nextHeadID = queryResult->VID; nextHeadVec = resultVec; deletedHeadVec = headVec; deletedPostingList = ¤tPostingList; deletedLength = currentLength; } - if (m_rwLocks.hash_func(queryResult->VID) != m_rwLocks.hash_func(headID)) anotherLock.unlock(); + if (isRemoteCandidate) { + // Release advisory remote lease before reassign below. + remoteLease.release(); + } else if (m_rwLocks.hash_func(queryResult->VID) != m_rwLocks.hash_func(headID)) anotherLock.unlock(); } // SPTAGLIB_LOG(Helper::LogLevel::LL_Info,"Release: %d, Release: %d\n", headID, queryResult->VID); @@ -1188,12 +2302,20 @@ namespace SPTAG::SPANN { if (!m_opt->m_disableReassign) { postingP = reinterpret_cast(deletedPostingList->data()); + // Batched version-byte read for the about-to-be-removed posting. + std::vector mp_del_vids; + mp_del_vids.reserve(deletedLength); + for (int j = 0; j < deletedLength; j++) { + mp_del_vids.push_back(*((SizeType*)(postingP + j * m_vectorInfoSize))); + } + std::vector mp_del_mapVers; + m_versionMap->BatchGetVersions(mp_del_vids, mp_del_mapVers); for (int j = 0; j < deletedLength; j++) { uint8_t* vectorId = postingP + j * m_vectorInfoSize; - SizeType VID = *(reinterpret_cast(vectorId)); uint8_t version = *(vectorId + sizeof(SizeType)); ValueType* vector = reinterpret_cast(vectorId + m_metaDataSize); - if (m_versionMap->Deleted(VID) || m_versionMap->GetVersion(VID) != version) continue; + uint8_t mapVer = mp_del_mapVers[j]; + if (mapVer == 0xfe || mapVer != version) continue; float origin_dist = m_headIndex->ComputeDistance(deletedHeadVec->data() + m_metaDataSize, vector); float current_dist = m_headIndex->ComputeDistance(nextHeadVec->data() + m_metaDataSize, vector); if (current_dist > origin_dist) { @@ -1213,6 +2335,30 @@ namespace SPTAG::SPANN { MergeAsync(nextHeadID); } } + + // Broadcast HeadSync Delete for the merge loser so peer + // compute nodes drop it from their in-memory head index. + // Without this, peers keep routing BatchAppend traffic to + // the deleted head; the receiver's AppendCallback then + // either resurrects it (zombie) or refuses (sender retry + // loop) until the next merge round happens to delete it + // again. Mirrors the Split broadcast at line ~1620. + // Skipped when our layer is disk-backed (TiKV is source + // of truth there) or when no worker is wired. + if (deletedHeadVID != -1 && m_worker && m_worker->IsEnabled() + && m_headIndex->GetDiskIndex(m_layer + 1) == nullptr) { + std::vector headSyncEntries; + HeadSyncEntry entry; + entry.op = HeadSyncEntry::Op::Delete; + entry.headVID = deletedHeadVID; + entry.m_layer = m_layer; + headSyncEntries.push_back(std::move(entry)); + if (m_headSyncLog) { + int shard = m_worker->GetWorkerNodeIndex(); + m_headSyncLog->Append(shard, headSyncEntries); + } + m_worker->BroadcastHeadSync(headSyncEntries); + } m_stat.m_mergeNum++; return ErrorCode::Success; } @@ -1242,6 +2388,8 @@ namespace SPTAG::SPANN { // } // tbb::concurrent_hash_map::value_type workPair(headID, headID); // m_splitList.insert(workPair); + // Single authoritative ownership gate. + if (IsRemoteOwnedHead(headID)) return; { Helper::Concurrent::ConcurrentMap::value_type workPair(headID, postingSize); std::shared_lock tmplock(m_splitListLock); @@ -1262,6 +2410,8 @@ namespace SPTAG::SPANN { inline void MergeAsync(SizeType headID, std::function p_callback = nullptr) { + // Single authoritative ownership gate. + if (IsRemoteOwnedHead(headID)) return; { std::shared_lock tmplock(m_mergeListLock); auto res = m_mergeList.insert(headID); @@ -1356,19 +2506,28 @@ namespace SPTAG::SPANN { auto& postingList = postingLists[i]; size_t postVectorNum = postingList.size() / m_vectorInfoSize; auto* postingP = reinterpret_cast(postingList.data()); - for (int j = 0; j < postVectorNum; j++) { + // Batched version-byte read for the entire posting. + std::vector cr_vids; + cr_vids.reserve(postVectorNum); + for (size_t j = 0; j < postVectorNum; j++) { + cr_vids.push_back(*((SizeType*)(postingP + j * m_vectorInfoSize))); + } + std::vector cr_mapVers; + m_versionMap->BatchGetVersions(cr_vids, cr_mapVers); + const SizeType maxVid = m_versionMap->Count(); + for (size_t j = 0; j < postVectorNum; j++) { uint8_t* vectorId = postingP + j * m_vectorInfoSize; - SizeType vid = *(reinterpret_cast(vectorId)); + SizeType vid = cr_vids[j]; uint8_t version = *(reinterpret_cast(vectorId + sizeof(SizeType))); ValueType* vector = reinterpret_cast(vectorId + m_metaDataSize); - const SizeType maxVid = m_versionMap->Count(); if (vid < 0 || vid >= maxVid) { SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "CollectReAssign: skip invalid VID %d (max %d) in posting headID=%d\n", vid, maxVid, newHeadsID[i]); continue; } - if (reAssignVectorsTopK.find(vid) == reAssignVectorsTopK.end() && !m_versionMap->Deleted(vid) && m_versionMap->GetVersion(vid) == version) { + uint8_t mapVer = cr_mapVers[j]; + if (reAssignVectorsTopK.find(vid) == reAssignVectorsTopK.end() && mapVer != 0xfe && mapVer == version) { m_stat.m_reAssignScanNum++; float dist = m_headIndex->ComputeDistance(newHeadsVec[i]->data(), vector); if (CheckIsNeedReassign(newHeadsVec, vector, headVector, newHeadsDist[i], dist, true)) { @@ -1433,19 +2592,28 @@ namespace SPTAG::SPANN { auto& postingList = nearbyPostings[i]; size_t postVectorNum = postingList.size() / m_vectorInfoSize; auto* postingP = reinterpret_cast(postingList.data()); - for (int j = 0; j < postVectorNum; j++) { + // Batched version-byte read for the nearby posting. + std::vector nb_vids; + nb_vids.reserve(postVectorNum); + for (size_t j = 0; j < postVectorNum; j++) { + nb_vids.push_back(*((SizeType*)(postingP + j * m_vectorInfoSize))); + } + std::vector nb_mapVers; + m_versionMap->BatchGetVersions(nb_vids, nb_mapVers); + const SizeType maxVid = m_versionMap->Count(); + for (size_t j = 0; j < postVectorNum; j++) { uint8_t* vectorId = postingP + j * m_vectorInfoSize; - SizeType vid = *(reinterpret_cast(vectorId)); + SizeType vid = nb_vids[j]; uint8_t version = *(reinterpret_cast(vectorId + sizeof(SizeType))); ValueType* vector = reinterpret_cast(vectorId + m_metaDataSize); - const SizeType maxVid = m_versionMap->Count(); if (vid < 0 || vid >= maxVid) { SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "CollectReAssign(nearby): skip invalid VID %d (max %d) in posting headID=%d\n", vid, maxVid, HeadPrevTopK[i]); continue; } - if (reAssignVectorsTopK.find(vid) == reAssignVectorsTopK.end() && !m_versionMap->Deleted(vid) && m_versionMap->GetVersion(vid) == version) { + uint8_t mapVer = nb_mapVers[j]; + if (reAssignVectorsTopK.find(vid) == reAssignVectorsTopK.end() && mapVer != 0xfe && mapVer == version) { m_stat.m_reAssignScanNum++; float dist = m_headIndex->ComputeDistance(HeadPrevTopKVec[i]->data(), vector); if (CheckIsNeedReassign(newHeadsVec, vector, headVector, newHeadsDist[i], dist, false)) { @@ -1530,7 +2698,8 @@ namespace SPTAG::SPANN { } - ErrorCode Append(ExtraWorkSpace* p_exWorkSpace, SizeType headID, int appendNum, std::string& appendPosting, int reassignThreshold = 0) + ErrorCode Append(ExtraWorkSpace* p_exWorkSpace, SizeType headID, int appendNum, std::string& appendPosting, int reassignThreshold = 0, + bool p_skipRemoteBucketWait = false) { auto appendBegin = std::chrono::high_resolution_clock::now(); if (appendPosting.empty()) { @@ -1541,6 +2710,40 @@ namespace SPTAG::SPANN { SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Error!, headID :%lld, appendNum:%d\n", (std::int64_t)headID, appendNum); } + // Distributed routing gate. + if (m_worker && m_worker->IsEnabled()) { + int ownerNode = -1; + if (IsRemoteOwnedHead(headID, &ownerNode)) { + // Remote-owned head: pack + enqueue for that node. + // Scan posting for self-entry so the receiver can + // materialize a missing head index without waiting + // for BroadcastHeadSync. + const void* headVecBytes = FindSelfEntryVectorBytes( + headID, appendPosting, appendNum); + EnqueueRemoteAppend(ownerNode, headID, appendNum, + std::move(appendPosting), headVecBytes); + if (!reassignThreshold) { + m_totalAppendCount++; + m_stat.m_appendTaskNum++; + } + return ErrorCode::Success; + } else if (!p_skipRemoteBucketWait) { + // Local-owned head: wait out any in-flight remote + // initiator that holds an advisory fenced-lease on our + // bucket (e.g. another node mid-Split) before we acquire + // the per-head lock and write. + // + // Skip this wait when the caller is the receiver-side + // handler for a fenced RemoteAppend: fence validation + // upstream has already proven the sender holds the + // very lease this wait would block on, so we would be + // waiting for our own caller's lease to expire (TTL, + // ~30 s). That self-block was the dominant cause of + // "lease busy" cascades on adjacent splits. + WaitForRemoteBucketUnlocked(headID); + } + } + checkDeleted: if (!m_headIndex->ContainSample(headID, m_layer + 1)) { for (int i = 0; i < appendNum; i++) @@ -1650,7 +2853,8 @@ namespace SPTAG::SPANN { return ErrorCode::Success; } - ErrorCode BatchAppend(ExtraWorkSpace* p_exWorkSpace, std::unordered_map& headAppends, const char* caller) + ErrorCode BatchAppend(ExtraWorkSpace* p_exWorkSpace, std::unordered_map& headAppends, const char* caller, + bool p_skipRemoteBucketWait = false) { if (headAppends.empty()) return ErrorCode::Success; @@ -1672,6 +2876,30 @@ namespace SPTAG::SPANN { auto appendIt = headAppends.find(headID); if (appendIt == headAppends.end()) continue; + // Distributed routing gate (mirrors Append()) + const std::string& posting = appendIt->second; + size_t totalRec = posting.size() / m_vectorInfoSize; + if (m_worker && m_worker->IsEnabled()) { + int ownerNode = -1; + if (IsRemoteOwnedHead(headID, &ownerNode)) { + const void* headVecBytes = FindSelfEntryVectorBytes( + headID, posting, (int)totalRec); + EnqueueRemoteAppend(ownerNode, headID, (int)totalRec, + posting, headVecBytes); + m_routedRemoteHeads.fetch_add(1, std::memory_order_relaxed); + m_routedRemoteItems.fetch_add(totalRec, std::memory_order_relaxed); + continue; + } else { + m_routedLocalHeads.fetch_add(1, std::memory_order_relaxed); + m_routedLocalItems.fetch_add(totalRec, std::memory_order_relaxed); + // Skip the self-wait for receiver-side fenced + // BatchAppend (see Append() for the rationale). + if (!p_skipRemoteBucketWait) { + WaitForRemoteBucketUnlocked(headID); + } + } + } + std::unique_lock headLock(m_rwLocks[headID]); if (!m_headIndex->ContainSample(headID, m_layer + 1)) { @@ -1776,16 +3004,28 @@ namespace SPTAG::SPANN { //LOG(Helper::LogLevel::LL_Info, "Reassign: oldVID:%d, replicaCount:%d, candidateNum:%d, dist0:%f\n", oldVID, replicaCount, i, selections[0].distance); for (int i = 0; i < replicaCount && m_versionMap->GetVersion(VID) == version; i++) { //LOG(Helper::LogLevel::LL_Info, "Reassign: headID :%d, oldVID:%d, newVID:%d, posting length: %d, dist: %f, string size: %d\n", headID, oldVID, VID, m_postingSizes[headID].load(), selections[i].distance, newPart.size()); - // [FIX H3] use reassignThreshold=0 so that an oversized - // target posting triggers SplitAsync (not a synchronous - // Split on this worker thread). This matches the - // CollectReAssign batch path and avoids a single merge- - // path reassign blocking a worker for the full duration - // of a Split (observed up to tens of seconds). - ErrorCode tmp = Append(p_exWorkSpace, selections[i].VID, 1, *vectorInfo, 0); - if (ErrorCode::Success != tmp) { - SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Head Miss: VID: %d, current version: %d, another re-assign\n", VID, version); - return tmp; + int ownerNode = -1; + bool isRemote = (m_worker && m_worker->IsEnabled() + && IsRemoteOwnedHead(selections[i].VID, &ownerNode)); + if (!isRemote) { + // [FIX H3] use reassignThreshold=0 so that an oversized + // target posting triggers SplitAsync (not a synchronous + // Split on this worker thread). This matches the + // CollectReAssign batch path and avoids a single merge- + // path reassign blocking a worker for the full duration + // of a Split (observed up to tens of seconds). + ErrorCode tmp = Append(p_exWorkSpace, selections[i].VID, 1, *vectorInfo, 0); + if (ErrorCode::Success != tmp) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, "Head Miss: VID: %d, current version: %d, another re-assign\n", VID, version); + return tmp; + } + } else { + // Centroid bytes are already in selections[i], + // so no self-entry scan needed. + EnqueueRemoteAppend(ownerNode, selections[i].VID, 1, + *vectorInfo, + selections[i].Vec.Data()); + } } } @@ -1801,6 +3041,7 @@ namespace SPTAG::SPANN { bool LoadIndex(Options& p_opt) override { m_opt = &p_opt; + m_initialVectorSize = p_opt.m_vectorSize; // initial count for VID stripe SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "DataBlockSize: %d, Capacity: %d\n", m_opt->m_datasetRowsInBlock, m_opt->m_datasetCapacity); std::string versionmapPath = m_opt->m_indexDirectory + FolderSep + m_opt->m_deleteIDFile + "_" + std::to_string(m_layer); if (m_opt->m_recovery) { @@ -1895,6 +3136,9 @@ namespace SPTAG::SPANN { //m_reassignThreadPool = std::make_shared(); //m_reassignThreadPool->initSPDK(m_opt->m_reassignThreadNum, this); SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "SPFresh: finish initialization\n"); + // Pool is now ready: re-attempt wiring the worker's job + // submitter (may have been set before pool was alive). + WireJobSubmitterIfReady(); } if (m_opt->m_enableWAL && !m_opt->m_persistentBufferPath.empty()) { @@ -2326,6 +3570,7 @@ namespace SPTAG::SPANN { { auto fullVectors = p_reader->GetVectorSet(); fullCount = fullVectors->Count(); + m_initialVectorSize = fullCount; // remember bulk-build count for stripe formula m_metaDataSize = sizeof(SizeType) + sizeof(uint8_t); m_vectorDataSize = fullVectors->PerVectorDataSize(); m_vectorInfoSize = m_vectorDataSize + m_metaDataSize; @@ -2521,19 +3766,25 @@ namespace SPTAG::SPANN { auto fullVectors = p_reader->GetVectorSet(); if (m_opt->m_distCalcMethod == DistCalcMethod::Cosine && !p_reader->IsNormalized() && !p_headIndex->m_pQuantizer) fullVectors->Normalize(m_opt->m_iSSDNumberOfThreads); - //SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "SPFresh: initialize versionMap\n"); - //m_versionMap->Initialize(m_opt->m_vectorSize, p_headIndex->m_iDataBlockSize, p_headIndex->m_iDataCapacity, &p_localToGlobal); - - if (p_localToGlobal.R() > 0) { - for (SizeType i = 0; i < p_localToGlobal.R(); i++) { - SizeType globalID = *(p_localToGlobal[i]); - if (m_versionMap->Deleted(globalID)) m_versionMap->SetVersion(globalID, -1); - } - } else { - for (SizeType i = 0; i < m_opt->m_vectorSize; i++) { - if (m_versionMap->Deleted(i)) m_versionMap->SetVersion(i, -1); - } - } + // Initialize the per-layer version map. For TiKVVersionMap this: + // - layer 0 (default=0x00 alive): bumps m_count only; no per-VID + // writes. Inserts later rely on the default 0x00 == alive. + // - layer >0 (default=0xfe deleted): writes 0x00 explicitly for + // each alive head in p_localToGlobal so MergePostings' + // Deleted()/GetVersion filter (L2021) doesn't silently drop + // legitimate base heads during async merges. Without this, + // layer-1 MergePostings reads stored version=0xfe, sees + // Deleted()=true (because per-VID byte is missing → reads + // default 0xfe), filters every entry, and writes back a + // corrupted near-empty posting -- destroying recall after + // even a single async merge. + // LocalVersionMap (hashmap) treats missing keys as deleted + // (returns 0xfe) and so has the same problem; its Initialize + // override also persists 0x00 for each globalID. + m_versionMap->Initialize(m_opt->m_vectorSize, + p_headIndex->m_iDataBlockSize, + p_headIndex->m_iDataCapacity, + &p_localToGlobal); SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "SPFresh: Writing values to DB\n"); @@ -2832,6 +4083,16 @@ namespace SPTAG::SPANN { return ErrorCode::VectorNotFound; } + ErrorCode FlushRemoteAppends() { + if (m_worker && m_worker->IsEnabled()) { + ErrorCode ret = m_worker->FlushRemoteAppends(); + m_worker->LogRouteStats(" (batch flush)"); + m_worker->ResetRouteStats(); + return ret; + } + return ErrorCode::Success; + } + bool AllFinished() { if (!m_splitThreadPool) return true; @@ -2863,15 +4124,64 @@ namespace SPTAG::SPANN { size_t completed = m_totalSplitCompleted.load(); double avgSplitMs = completed > 0 ? (m_totalSplitTimeUs.load() / 1000.0 / completed) : 0; double maxSplitMs = m_maxSplitTimeUs.load() / 1000.0; + // Remote queue stats are layer-agnostic (one queue per + // WorkerNode covers every layer's outbound appends); only + // emit them when m_worker is wired so single-node baselines + // stay quiet. + size_t remoteQ = 0, remoteTotal = 0; + int remoteInflight = 0; + std::size_t walPending = 0; + std::size_t remoteOriginPending = 0; + if (m_worker) { + remoteQ = m_worker->GetRemoteQueueSize(); + remoteTotal = m_worker->GetTotalRemoteAppendsRouted(); + remoteInflight = m_worker->GetInflightAppendFlushes(); + walPending = m_worker->GetBatchAppendWalPendingItems(); + remoteOriginPending = m_worker->GetRemoteOriginPendingItems(m_layer); + } + // Split the local pool's pending queue by ORIGIN of the + // work, not by processing site. Both buckets are being + // processed locally on this node's SPDKThreadPool: + // selfOrig: jobs the local AddIndex generated (own + // splits/merges/reassigns/appends). + // peerOrig: BatchAppendItemJob unpacked from BatchAppend + // RPCs that peers routed to us because we own + // the head. When peer A sends 10000 items to + // us they land here, not in A's queue. + // Items WE dispatched to peers (and are waiting on their + // response) are reported separately as "remote out + // queueDepth" + "inflightChunks" + "walPendingItems". + // + // Asymmetry note: selfOrig is usually near 0 even when + // GetOwner is perfectly balanced. Local AddIndex calls + // for LOCAL-owned heads bypass the pool entirely (one + // synchronous db->MultiMerge per BatchAppend batch + // covers them all). Peer-originated BatchAppend + // requests, by contrast, unpack into ONE pool job per + // item, so a single 10k-item RPC inflates peerOrig by + // 10k. Use "addIndex route" below to verify owner + // partitioning is healthy. + size_t selfOrigPending = totalJobs > remoteOriginPending + ? totalJobs - remoteOriginPending + : 0; + size_t routedLocalH = m_routedLocalHeads.load(); + size_t routedRemoteH = m_routedRemoteHeads.load(); + size_t routedLocalI = m_routedLocalItems.load(); + size_t routedRemoteI = m_routedRemoteItems.load(); SPTAGLIB_LOG(Helper::LogLevel::LL_Info, - "layer %d pending queue:%zu split:%zu merge:%zu append:%zu reassign:%zu running:%u | " + "layer %d pending queue:%zu (selfOrig:%zu peerOrig:%zu) split:%zu merge:%zu append:%zu reassign:%zu running:%u | " "total_submitted split:%zu merge:%zu reassign:%zu append:%zu | " "total_completed split:%zu merge:%zu reassign:%zu | " + "addIndex route heads(local:%zu remote:%zu) items(local:%zu remote:%zu) | " + "remote out queueDepth:%zu inflightChunks:%d totalRouted:%zu walPendingItems:%zu | " "split_latency avg:%.1fms max:%.1fms\n", - m_layer, totalJobs, m_splitJobsInFlight.load(), + m_layer, totalJobs, selfOrigPending, remoteOriginPending, + m_splitJobsInFlight.load(), m_mergeJobsInFlight.load(), m_appendJobsInFlight.load(), m_reassignJobsInFlight.load(), runningJobs, m_totalSplitSubmitted.load(), m_totalMergeSubmitted.load(), m_totalReassignSubmitted.load(), m_totalAppendCount.load(), m_totalSplitCompleted.load(), m_totalMergeCompleted.load(), m_totalReassignCompleted.load(), + routedLocalH, routedRemoteH, routedLocalI, routedRemoteI, + remoteQ, remoteInflight, remoteTotal, walPending, avgSplitMs, maxSplitMs); } if (runningJobs == 0 && totalJobs == 0) { @@ -2886,9 +4196,11 @@ namespace SPTAG::SPANN { SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "layer %d ALL DONE | total_submitted split:%zu merge:%zu reassign:%zu append:%zu | " "total_completed split:%zu merge:%zu reassign:%zu | " + "remote totalRouted:%zu | " "split_latency avg:%.1fms max:%.1fms\n", m_layer, totalSplit, totalMerge, m_totalReassignSubmitted.load(), totalAppend, m_totalSplitCompleted.load(), m_totalMergeCompleted.load(), m_totalReassignCompleted.load(), + (m_worker ? m_worker->GetTotalRemoteAppendsRouted() : 0), avgSplitMs, maxSplitMs); // [DIAG] dump diagnostic histograms (lock/RMW/grpc/byte) at every ALL DONE boundary { @@ -2979,17 +4291,39 @@ namespace SPTAG::SPANN { double avgSplitMs = completedSplit > 0 ? (m_totalSplitTimeUs.load() / 1000.0 / completedSplit) : 0; double maxSplitMs = m_maxSplitTimeUs.load() / 1000.0; size_t totalJobs = m_splitThreadPool ? m_splitThreadPool->jobsize() : 0; + size_t remoteQ = 0, remoteTotal = 0; + int remoteInflight = 0; + std::size_t walPending = 0; + std::size_t remoteOriginPending = 0; + if (m_worker) { + remoteQ = m_worker->GetRemoteQueueSize(); + remoteTotal = m_worker->GetTotalRemoteAppendsRouted(); + remoteInflight = m_worker->GetInflightAppendFlushes(); + walPending = m_worker->GetBatchAppendWalPendingItems(); + remoteOriginPending = m_worker->GetRemoteOriginPendingItems(m_layer); + } + size_t selfOrigPending = totalJobs > remoteOriginPending + ? totalJobs - remoteOriginPending + : 0; + size_t routedLocalH = m_routedLocalHeads.load(); + size_t routedRemoteH = m_routedRemoteHeads.load(); + size_t routedLocalI = m_routedLocalItems.load(); + size_t routedRemoteI = m_routedRemoteItems.load(); // if (!ShouldLogProgress(totalJobs)) return; SPTAGLIB_LOG(Helper::LogLevel::LL_Info, - "layer %d pending queue:%zu split:%zu merge:%zu append:%zu reassign:%zu running:%u | " + "layer %d pending queue:%zu (selfOrig:%zu peerOrig:%zu) split:%zu merge:%zu append:%zu reassign:%zu running:%u | " "total_submitted split:%zu merge:%zu reassign:%zu append:%zu | " "total_completed split:%zu merge:%zu reassign:%zu | " + "addIndex route heads(local:%zu remote:%zu) items(local:%zu remote:%zu) | " + "remote out queueDepth:%zu inflightChunks:%d totalRouted:%zu walPendingItems:%zu | " "split_latency avg:%.1fms max:%.1fms\n", - m_layer, totalJobs, + m_layer, totalJobs, selfOrigPending, remoteOriginPending, m_splitJobsInFlight.load(), m_mergeJobsInFlight.load(), m_appendJobsInFlight.load(), m_reassignJobsInFlight.load(), m_splitThreadPool ? static_cast(m_splitThreadPool->runningJobs()) : 0, m_totalSplitSubmitted.load(), m_totalMergeSubmitted.load(), m_totalReassignSubmitted.load(), m_totalAppendCount.load(), m_totalSplitCompleted.load(), m_totalMergeCompleted.load(), m_totalReassignCompleted.load(), + routedLocalH, routedRemoteH, routedLocalI, routedRemoteI, + remoteQ, remoteInflight, remoteTotal, walPending, avgSplitMs, maxSplitMs); } @@ -3110,6 +4444,22 @@ namespace SPTAG::SPANN { std::shared_ptr m_splitThreadPool; std::shared_ptr m_reassignThreadPool; + + // Single-threaded scheduler used by MergeAsyncJob / SplitAsyncJob + // to re-enqueue retries after exponential backoff (transient + // TiKV/IO failures). Lazily created on first retry to avoid the + // worker thread in single-node / build-only paths that never + // exercise async retries. + std::mutex m_delayedRetrySchedulerMutex; + std::unique_ptr m_delayedRetryScheduler; + + Distributed::DelayedJobScheduler& GetOrCreateDelayedRetryScheduler() { + std::lock_guard g(m_delayedRetrySchedulerMutex); + if (!m_delayedRetryScheduler) { + m_delayedRetryScheduler.reset(new Distributed::DelayedJobScheduler()); + } + return *m_delayedRetryScheduler; + } }; } // namespace SPTAG #endif // _SPTAG_SPANN_EXTRADYNAMICSEARCHER_H_ diff --git a/AnnService/inc/Core/SPANN/ExtraTiKVController.h b/AnnService/inc/Core/SPANN/ExtraTiKVController.h index 003d602b5..05eeacf91 100644 --- a/AnnService/inc/Core/SPANN/ExtraTiKVController.h +++ b/AnnService/inc/Core/SPANN/ExtraTiKVController.h @@ -12,6 +12,7 @@ #include "kvproto/tikvpb.grpc.pb.h" #include "kvproto/kvrpcpb.pb.h" #include "kvproto/metapb.pb.h" +#include "kvproto/pdpb.pb.h" #include "kvproto/pdpb.grpc.pb.h" #include @@ -1446,6 +1447,93 @@ namespace SPTAG::SPANN return MultiDeletePrefixed(prefixedKeys, timeout); } + // ScanPrefix: walks `prefix` using paged RawScan and returns logical + // (key, value) pairs with the TiKVIO physical prefix stripped off. + // Used by durable WALs (e.g. BatchAppendWAL) to recover entries + // persisted before a crash. + ErrorCode ScanPrefix(const std::string& prefix, + std::vector>& out, + std::size_t maxEntries) override + { + const auto timeout = std::chrono::microseconds(5'000'000); + std::string physicalPrefix = MakePrefixedKey(prefix); + // RawScan end_key: a key strictly greater than every key in the + // prefix. Increment last byte; if it overflows append 0xff. + std::string endKey = physicalPrefix; + while (!endKey.empty() && static_cast(endKey.back()) == 0xFF) { + endKey.pop_back(); + } + if (endKey.empty()) { + endKey = physicalPrefix + std::string(1, '\xFF'); + } else { + endKey.back() = static_cast(static_cast(endKey.back()) + 1); + } + + std::string cursor = physicalPrefix; + const int pageLimit = 1024; + for (;;) { + int attempt = 0; + bool advanced = false; + std::string lastKey; + int count = 0; + for (; attempt < 10; attempt++) { + auto stub = GetStubForKey(cursor); + if (!stub) { RetryBackoff(attempt); continue; } + + kvrpcpb::RawScanRequest request; + request.set_start_key(cursor); + request.set_end_key(endKey); + request.set_limit(pageLimit); + SetContext(request.mutable_context(), cursor); + + kvrpcpb::RawScanResponse response; + grpc::ClientContext ctx; + SetDeadline(ctx, timeout); + + auto status = stub->RawScan(&ctx, request, &response); + if (!status.ok()) { + if (ShouldLogRetry(attempt)) + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, + "TiKVIO::ScanPrefix gRPC error (attempt %d): %s\n", + attempt + 1, status.error_message().c_str()); + InvalidateRegionCache(cursor); + RetryBackoff(attempt); + continue; + } + if (response.has_region_error()) { + InvalidateRegionCache(cursor); + RetryBackoff(attempt); + continue; + } + count = response.kvs_size(); + for (int i = 0; i < count; i++) { + const auto& kv = response.kvs(i); + const std::string& k = kv.key(); + if (k.size() < physicalPrefix.size()) continue; + out.emplace_back(k.substr(physicalPrefix.size() - prefix.size()), kv.value()); + if (maxEntries > 0 && out.size() >= maxEntries) { + return ErrorCode::Success; + } + } + if (count > 0) { + lastKey = response.kvs(count - 1).key(); + advanced = true; + } + break; + } + if (attempt >= 10) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "TiKVIO::ScanPrefix exhausted retries\n"); + return ErrorCode::Fail; + } + if (!advanced || count < pageLimit) { + return ErrorCode::Success; + } + // Advance cursor past the last seen key. + cursor = lastKey + std::string(1, '\0'); + } + } + // Variants that accept already-prefixed keys (used by chunk/count helpers // that produce keys via MakeChunkKey / MakeCountKey). ErrorCode MultiPutPrefixed(const std::vector& prefixedKeys, diff --git a/AnnService/inc/Core/SPANN/IExtraSearcher.h b/AnnService/inc/Core/SPANN/IExtraSearcher.h index 6a73b6c80..99675f21e 100644 --- a/AnnService/inc/Core/SPANN/IExtraSearcher.h +++ b/AnnService/inc/Core/SPANN/IExtraSearcher.h @@ -22,6 +22,11 @@ namespace SPTAG { namespace SPANN { + // Forward declaration; the only IExtraSearcher API that touches WorkerNode + // is the SetWorker() hook below. Concrete searchers that care + // (ExtraDynamicSearcher) include the full header and override. + class WorkerNode; + struct SearchStats { SearchStats() @@ -589,6 +594,11 @@ namespace SPTAG { SizeType p_begin) { return ErrorCode::Undefined; } virtual ErrorCode DeleteIndex(SizeType p_id) { return ErrorCode::Undefined; } + // Allocate globalVID to this node's BKT counter. + // ExtraDynamicSearcher overrides this with + // the stripe formula when m_worker is enabled. + virtual SizeType AllocateGlobalVID(SizeType p_localVID) const { return p_localVID; } + virtual SizeType GetNumSamples() const = 0; virtual bool ContainSample(const SizeType idx) const @@ -619,6 +629,11 @@ namespace SPTAG { return ErrorCode::Undefined; } + // Bind a routing worker (no-op by default). ExtraDynamicSearcher + // overrides this to install the cross-node append + put + + // fetch-postings callbacks. ExtraStaticSearcher etc. ignore it. + virtual void SetWorker(WorkerNode* /*worker*/) {} + virtual bool AllFinished() { return false; } virtual void GetDBStats() { return; } virtual int64_t GetNumBlocks() { return 0; } @@ -635,6 +650,8 @@ namespace SPTAG { } virtual ErrorCode Checkpoint(std::string prefix) { return ErrorCode::Success; } + + virtual void InitWorkSpace(ExtraWorkSpace* p_exWorkSpace, bool clear = false) {} }; } // SPANN } // SPTAG diff --git a/AnnService/inc/Core/SPANN/Index.h b/AnnService/inc/Core/SPANN/Index.h index 5479d2d42..743588437 100644 --- a/AnnService/inc/Core/SPANN/Index.h +++ b/AnnService/inc/Core/SPANN/Index.h @@ -47,6 +47,11 @@ namespace SPTAG template class SPANNResultIterator; + // Forward-declare so Index can hold/forward a WorkerNode pointer + // without dragging in the full Distributed/WorkerNode.h header (and + // thus its boost-asio + grpc transitive deps) into Index.h. + class WorkerNode; + template class Index; template @@ -63,6 +68,12 @@ namespace SPTAG std::vector> m_extraSearchers; std::unique_ptr> m_workSpaceFactory; + // Routing worker bound BEFORE BuildIndex so that + // ExtraDynamicSearcher::WriteDownAllPostingToDB and other build + // hooks see a non-null m_worker as each layer's searcher is + // emplaced. SPFreshTest sets this in BuildOnly+Distributed mode. + WorkerNode* m_pendingWorker = nullptr; + Options m_options; std::function m_fComputeDistance; @@ -124,6 +135,18 @@ namespace SPTAG inline std::shared_ptr GetDiskIndex(int layer = 0) { if (layer < m_extraSearchers.size()) return m_extraSearchers[layer]; else return nullptr; } inline Options* GetOptions() { return &m_options; } + // Bind a routing worker. Forwards to all currently-existing + // extraSearchers and remembers the pointer so newly-emplaced + // searchers (created during BuildIndexInternalLayer) also pick + // it up. Pass nullptr to detach. + void SetWorker(WorkerNode* worker) { + m_pendingWorker = worker; + for (auto& searcher : m_extraSearchers) { + if (searcher) searcher->SetWorker(worker); + } + } + inline WorkerNode* GetPendingWorker() const { return m_pendingWorker; } + inline SizeType GetNumSamples() const { return GetNumSamples(0); } inline SizeType GetNumSamples(int layer) const { if (layer < m_extraSearchers.size()) return m_extraSearchers[layer]->GetNumSamples(); else return m_topIndex->GetNumSamples(); } inline DimensionType GetFeatureDim() const { return m_topIndex->GetFeatureDim(); } diff --git a/AnnService/inc/Core/SPANN/Options.h b/AnnService/inc/Core/SPANN/Options.h index 613877605..6da6d1429 100644 --- a/AnnService/inc/Core/SPANN/Options.h +++ b/AnnService/inc/Core/SPANN/Options.h @@ -125,6 +125,23 @@ namespace SPTAG { int m_versionChunkSize; int m_asyncRpcMaxInflight; + // Distributed RemotePostingOps RPC tuning + int m_remoteAppendChunkSize; + int m_remoteAppendRetry; + int m_remoteAppendTimeoutSec; + int m_remoteAppendMaxInflight; + + // Async Split/Merge job retry count. Distributed design + // requires async jobs to be safe-to-retry — see Async Job + // Fault Tolerance section. + int m_asyncJobMaxRetry; + + // Remote lock lease TTL in milliseconds (default 30000). + // Bounds how long a crashed or disconnected holder can block + // the owner's Split/Merge path; the owner auto-reclaims the + // lease on expiry. Match this to your structural-op p99. + int m_remoteLockTtlMs; + // GPU building int m_gpuSSDNumTrees; int m_gpuSSDLeafSize; diff --git a/AnnService/inc/Core/SPANN/ParameterDefinitionList.h b/AnnService/inc/Core/SPANN/ParameterDefinitionList.h index 00f56b9d1..606ab0dfb 100644 --- a/AnnService/inc/Core/SPANN/ParameterDefinitionList.h +++ b/AnnService/inc/Core/SPANN/ParameterDefinitionList.h @@ -123,6 +123,23 @@ DefineSSDParameter(m_searchCheckVersionMapOnlyLayer0, bool, false, "SearchCheckV DefineSSDParameter(m_versionChunkSize, int, 4096, "VersionChunkSize") DefineSSDParameter(m_asyncRpcMaxInflight, int, 0, "AsyncRpcMaxInflight") +// Distributed RemotePostingOps RPC tuning +// ChunkSize=20000: with the receiver-side BatchAppendLayerJob fast path (one +// db->MultiMerge per chunk instead of N per-item Merges), larger chunks pay +// off — they amortize the network roundtrip without exploding the receiver +// pool depth. 20K is a balance: small enough that ChunkSize × MaxInflight +// stays under the WAL admission-control cap (so chunks take the WAL-backed +// fast-ACK path), large enough that the network roundtrip overhead is small +// vs. per-chunk work. 50K was tried and immediately tripped the WAL cap. +DefineSSDParameter(m_remoteAppendChunkSize, int, 20000, "RemoteAppendChunkSize") +DefineSSDParameter(m_remoteAppendRetry, int, 3, "RemoteAppendRetry") +DefineSSDParameter(m_remoteAppendTimeoutSec, int, 180, "RemoteAppendTimeoutSec") +// MaxInflight=8 (was 4): keeps the receiver's 16-thread BatchAppendItemJob pool +// well-fed even when one chunk straggles on lock contention. +DefineSSDParameter(m_remoteAppendMaxInflight, int, 8, "RemoteAppendMaxInflight") +DefineSSDParameter(m_asyncJobMaxRetry, int, 8, "AsyncJobMaxRetry") +DefineSSDParameter(m_remoteLockTtlMs, int, 30000, "RemoteLockTtlMs") + // GPU Building DefineSSDParameter(m_gpuSSDNumTrees, int, 100, "GPUSSDNumTrees") DefineSSDParameter(m_gpuSSDLeafSize, int, 200, "GPUSSDLeafSize") diff --git a/AnnService/inc/Core/VectorIndex.h b/AnnService/inc/Core/VectorIndex.h index a25bf1e63..62e2ca843 100644 --- a/AnnService/inc/Core/VectorIndex.h +++ b/AnnService/inc/Core/VectorIndex.h @@ -5,6 +5,7 @@ #define _SPTAG_VECTORINDEX_H_ #include +#include #include "Common.h" #include "Common/WorkSpace.h" #include "inc/Helper/DiskIO.h" @@ -160,6 +161,14 @@ class VectorIndex static ErrorCode LoadIndex(const std::string& p_loaderFilePath, std::shared_ptr& p_vectorIndex); + /// LoadIndex with config overrides applied between LoadIndexConfig and LoadIndexData, + /// so settings such as TiKVPDAddresses take effect before the underlying KV connection + /// is constructed. Override keys may be section-qualified ("Section.Param"); unqualified + /// keys default to the "BuildSSDIndex" section. + static ErrorCode LoadIndex(const std::string& p_loaderFilePath, + const std::map& p_paramOverrides, + std::shared_ptr& p_vectorIndex); + static ErrorCode LoadIndexFromFile(const std::string& p_file, std::shared_ptr& p_vectorIndex); static ErrorCode LoadIndex(const std::string& p_config, const std::vector& p_indexBlobs, std::shared_ptr& p_vectorIndex); diff --git a/AnnService/inc/Helper/KeyValueIO.h b/AnnService/inc/Helper/KeyValueIO.h index 2f4c5d13d..91881f2f6 100644 --- a/AnnService/inc/Helper/KeyValueIO.h +++ b/AnnService/inc/Helper/KeyValueIO.h @@ -34,6 +34,20 @@ namespace SPTAG virtual ErrorCode Put(const SizeType key, const std::string& value, const std::chrono::microseconds& timeout, std::vector* reqs) = 0; + // Batched writes/deletes. Default implementations return Undefined so that + // backends without native batching (RocksDB, FileIO) can ignore them. + // TiKVIO overrides these to issue a single batched RPC per region group, + // which dramatically reduces the number of synchronous gRPC round-trips + // when callers (e.g. SPANN AddIndex Phase 2 / PutPostingToDB) want to + // commit several keys at once. + virtual ErrorCode MultiPut(const std::vector& keys, + const std::vector& values, + const std::chrono::microseconds& timeout, + std::vector* reqs) { return ErrorCode::Undefined; } + + virtual ErrorCode MultiDelete(const std::vector& keys, + const std::chrono::microseconds& timeout) { return ErrorCode::Undefined; } + virtual ErrorCode CompareAndSwap(const std::string& key, const std::string& value, bool previousNotExist, const std::string& previousValue, const std::chrono::microseconds& timeout, @@ -95,6 +109,19 @@ namespace SPTAG virtual ErrorCode NextToScan(SizeType& key, std::string* value) {return ErrorCode::Undefined;} + // ScanPrefix: enumerate all (logical key, value) pairs in the + // store whose logical key starts with `prefix`. Implementations + // that prepend their own physical key prefix are expected to + // strip it before returning keys. `maxEntries` caps the result + // size (0 = no cap). Default no-op so non-distributed backends + // don't need to implement it. + virtual ErrorCode ScanPrefix(const std::string& prefix, + std::vector>& out, + std::size_t maxEntries = 0) { + (void)prefix; (void)out; (void)maxEntries; + return ErrorCode::Undefined; + } + virtual void LogAsyncWaitStatsAndReset(int layer) {} }; } diff --git a/AnnService/inc/Socket/ConnectionManager.h b/AnnService/inc/Socket/ConnectionManager.h index e487c6105..0c199ecb1 100644 --- a/AnnService/inc/Socket/ConnectionManager.h +++ b/AnnService/inc/Socket/ConnectionManager.h @@ -41,7 +41,11 @@ class ConnectionManager : public std::enable_shared_from_this inline static std::uint32_t GetPosition(ConnectionID p_connectionID); private: - static constexpr std::uint32_t c_connectionPoolSize = 1 << 8; + // Bumped from 1<<8 (256) to 1<<12 (4096) to avoid silently dropping new + // connections when reconnect storms (e.g., from concurrent FlushRemoteAppends + // timeouts) saturate the pool. Each ConnectionItem is small; 4096 slots is + // ~64KB per ConnectionManager, which is negligible. + static constexpr std::uint32_t c_connectionPoolSize = 1 << 12; static constexpr std::uint32_t c_connectionPoolMask = c_connectionPoolSize - 1; diff --git a/AnnService/inc/Socket/Packet.h b/AnnService/inc/Socket/Packet.h index 8c99b09fe..6d8c1d146 100644 --- a/AnnService/inc/Socket/Packet.h +++ b/AnnService/inc/Socket/Packet.h @@ -27,13 +27,47 @@ enum class PacketType : std::uint8_t SearchRequest = 0x03, + AppendRequest = 0x04, + + BatchAppendRequest = 0x05, + + HeadSyncRequest = 0x07, + + RemoteLockRequest = 0x08, + + DispatchCommand = 0x09, + + NodeRegisterRequest = 0x0A, + + RingUpdate = 0x0B, + + RingUpdateACK = 0x0C, + + // Cross-node merge hint. Search on node X observes posting H is + // underfull, but H is owned by node Y. X sends MergeRequest to Y so + // Y can schedule its own MergeAsync(H). Fire-and-forget (no response + // packet): the receiver's MergeAsync already dedups via m_mergeList, + // a lost notification just means Y discovers H underfull via some + // other path (own search, own Append, explicit RefineIndex). + MergeRequest = 0x11, + ResponseMask = 0x80, + NodeRegisterResponse = ResponseMask | NodeRegisterRequest, + HeartbeatResponse = ResponseMask | HeartbeatRequest, RegisterResponse = ResponseMask | RegisterRequest, - SearchResponse = ResponseMask | SearchRequest + SearchResponse = ResponseMask | SearchRequest, + + AppendResponse = ResponseMask | AppendRequest, + + BatchAppendResponse = ResponseMask | BatchAppendRequest, + + RemoteLockResponse = ResponseMask | RemoteLockRequest, + + DispatchResult = ResponseMask | DispatchCommand, }; diff --git a/AnnService/inc/Socket/SimpleSerialization.h b/AnnService/inc/Socket/SimpleSerialization.h index 6da925625..6c0ddddf0 100644 --- a/AnnService/inc/Socket/SimpleSerialization.h +++ b/AnnService/inc/Socket/SimpleSerialization.h @@ -23,7 +23,7 @@ namespace SimpleSerialization SimpleWriteBuffer(const T& p_val, std::uint8_t* p_buffer) { static_assert(std::is_fundamental::value || std::is_enum::value, - "Only applied for fundanmental type."); + "Only applied for fundamental type."); *(reinterpret_cast(p_buffer)) = p_val; return p_buffer + sizeof(T); @@ -35,7 +35,7 @@ namespace SimpleSerialization SimpleReadBuffer(const std::uint8_t* p_buffer, T& p_val) { static_assert(std::is_fundamental::value || std::is_enum::value, - "Only applied for fundanmental type."); + "Only applied for fundamental type."); p_val = *(reinterpret_cast(p_buffer)); return p_buffer + sizeof(T); @@ -47,7 +47,7 @@ namespace SimpleSerialization EstimateBufferSize(const T& p_val) { static_assert(std::is_fundamental::value || std::is_enum::value, - "Only applied for fundanmental type."); + "Only applied for fundamental type."); return sizeof(T); } @@ -82,6 +82,58 @@ namespace SimpleSerialization } + /// Bounds-checked variants of SimpleReadBuffer. + /// All return nullptr if a read would overrun [p_buffer, p_bufEnd). + /// p_buffer is also returned as nullptr (and p_val left unchanged) if it is already nullptr. + template + inline const std::uint8_t* + SafeSimpleReadBuffer(const std::uint8_t* p_buffer, const std::uint8_t* p_bufEnd, T& p_val) + { + static_assert(std::is_fundamental::value || std::is_enum::value, + "Only applied for fundamental type."); + + if (p_buffer == nullptr) return nullptr; + if (p_bufEnd != nullptr && static_cast(p_bufEnd - p_buffer) < sizeof(T)) return nullptr; + p_val = *(reinterpret_cast(p_buffer)); + return p_buffer + sizeof(T); + } + + + inline const std::uint8_t* + SafeSimpleReadBuffer(const std::uint8_t* p_buffer, const std::uint8_t* p_bufEnd, std::string& p_val) + { + p_val.clear(); + if (p_buffer == nullptr) return nullptr; + std::uint32_t len = 0; + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, len); + if (p_buffer == nullptr) return nullptr; + if (len > 0) + { + if (p_bufEnd != nullptr && static_cast(p_bufEnd - p_buffer) < len) return nullptr; + p_val.assign(reinterpret_cast(p_buffer), len); + } + return p_buffer + len; + } + + + inline const std::uint8_t* + SafeSimpleReadBuffer(const std::uint8_t* p_buffer, const std::uint8_t* p_bufEnd, ByteArray& p_val) + { + p_val.Clear(); + if (p_buffer == nullptr) return nullptr; + std::uint32_t len = 0; + p_buffer = SafeSimpleReadBuffer(p_buffer, p_bufEnd, len); + if (p_buffer == nullptr) return nullptr; + if (len > 0) + { + if (p_bufEnd != nullptr && static_cast(p_bufEnd - p_buffer) < len) return nullptr; + p_val = ByteArray::Alloc(len); + std::memcpy(p_val.Data(), p_buffer, len); + } + return p_buffer + len; + } + + template<> inline std::size_t EstimateBufferSize(const std::string& p_val) diff --git a/AnnService/src/Core/SPANN/SPANNIndex.cpp b/AnnService/src/Core/SPANN/SPANNIndex.cpp index 0c04b93d2..97c3ed768 100644 --- a/AnnService/src/Core/SPANN/SPANNIndex.cpp +++ b/AnnService/src/Core/SPANN/SPANNIndex.cpp @@ -1227,6 +1227,15 @@ template ErrorCode Index::BuildIndexInternalLayer(std::shared_pt m_extraSearchers.emplace_back(std::make_shared>(m_options, m_extraSearchers.size(), this, m_db)); } + // Hand the routing worker (if any) to the freshly-created searcher + // before BuildIndex runs. Build itself no longer routes postings + // (shared TiKV cluster — the driver writes straight to TiKV and PD + // routes each key to the owning store), but other build-time hooks + // that consult m_worker still benefit from seeing a non-null value. + if (m_pendingWorker) { + m_extraSearchers.back()->SetWorker(m_pendingWorker); + } + { std::shared_ptr ptr = SPTAG::f_createIO(); if (ptr == nullptr || @@ -1848,7 +1857,74 @@ ErrorCode Index::AddIndex(const void *p_data, SizeType p_vectorNum, Dimension } workSpace->m_deduper.clear(); workSpace->m_postingIDs.clear(); - return m_extraSearchers[0]->AddIndex(workSpace.get(), vectorSet, begin); + + // Use multiple threads for RNGSelection + Append when vector count is large enough. + // Each thread fetch_add's one vector and calls ExtraDynamicSearcher::AddIndex with a + // single-vector view, so AppendBatchAsync flushes per-vector and pipelines with the + // worker side rather than queuing the whole batch behind a single huge flush. + if (p_vectorNum > 1 && m_options.m_iSSDNumberOfThreads > 1) { + int numThreads = std::min((int)p_vectorNum, m_options.m_iSSDNumberOfThreads); + std::atomic_int nextVec{0}; + std::atomic globalError{ErrorCode::Success}; + int printStep = std::max(1, p_vectorNum / 50); + + auto worker = [&](bool isFirst) { + std::unique_ptr ws; + ExtraWorkSpace* wsPtr; + if (isFirst) { + wsPtr = workSpace.get(); + } else { + ws = m_workSpaceFactory->GetWorkSpace(); + if (!ws) { + ws.reset(new ExtraWorkSpace()); + InitWorkSpace(ws.get(), false); + } else { + InitWorkSpace(ws.get(), true); + } + ws->m_deduper.clear(); + ws->m_postingIDs.clear(); + wsPtr = ws.get(); + } + + while (globalError.load(std::memory_order_relaxed) == ErrorCode::Success) { + int v = nextVec.fetch_add(1); + if (v >= p_vectorNum) break; + + if (v % printStep == 0) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "AddIndex bulk: %d/%d (%.1f%%)\n", + v, p_vectorNum, v * 100.0 / p_vectorNum); + GetDBStat(); + } + + std::shared_ptr singleVec = std::make_shared( + ByteArray((std::uint8_t*)vectorSet->GetVector(v), + sizeof(T) * p_dimension, false), + GetEnumValueType(), p_dimension, 1); + ErrorCode ret = m_extraSearchers[0]->AddIndex(wsPtr, singleVec, + m_extraSearchers[0]->AllocateGlobalVID(begin + v)); + if (ret != ErrorCode::Success) { + globalError.store(ret, std::memory_order_relaxed); + } + } + + if (!isFirst && ws) { + m_workSpaceFactory->ReturnWorkSpace(std::move(ws)); + } + }; + + std::vector threads; + threads.reserve(numThreads - 1); + for (int t = 1; t < numThreads; t++) { + threads.emplace_back(worker, false); + } + worker(true); + for (auto& t : threads) t.join(); + + return globalError.load(); + } + + return m_extraSearchers[0]->AddIndex(workSpace.get(), vectorSet, + m_extraSearchers[0]->AllocateGlobalVID(begin)); } template diff --git a/AnnService/src/Core/VectorIndex.cpp b/AnnService/src/Core/VectorIndex.cpp index 2f8ebfd13..35bcaf585 100644 --- a/AnnService/src/Core/VectorIndex.cpp +++ b/AnnService/src/Core/VectorIndex.cpp @@ -793,6 +793,14 @@ std::shared_ptr VectorIndex::CreateInstance(IndexAlgoType p_algo, V } ErrorCode VectorIndex::LoadIndex(const std::string &p_loaderFilePath, std::shared_ptr &p_vectorIndex) +{ + static const std::map emptyOverrides; + return LoadIndex(p_loaderFilePath, emptyOverrides, p_vectorIndex); +} + +ErrorCode VectorIndex::LoadIndex(const std::string &p_loaderFilePath, + const std::map &p_paramOverrides, + std::shared_ptr &p_vectorIndex) { std::string folderPath(p_loaderFilePath); if (!folderPath.empty() && *(folderPath.rbegin()) != FolderSep) @@ -816,6 +824,23 @@ ErrorCode VectorIndex::LoadIndex(const std::string &p_loaderFilePath, std::share if ((ret = p_vectorIndex->LoadIndexConfig(iniReader)) != ErrorCode::Success) return ret; + // Apply param overrides AFTER LoadIndexConfig but BEFORE LoadIndexData, so that + // settings like TiKVPDAddresses are reflected in m_options before the KV connection + // is constructed inside LoadIndexData -> PrepareDB. + for (const auto &kv : p_paramOverrides) + { + const std::string &key = kv.first; + const std::string &val = kv.second; + auto dotPos = key.find('.'); + if (dotPos != std::string::npos) { + std::string section = key.substr(0, dotPos); + std::string param = key.substr(dotPos + 1); + p_vectorIndex->SetParameter(param.c_str(), val.c_str(), section.c_str()); + } else { + p_vectorIndex->SetParameter(key.c_str(), val.c_str(), "BuildSSDIndex"); + } + } + std::shared_ptr> indexfiles = p_vectorIndex->GetIndexFiles(); if (iniReader.DoesSectionExist("MetaData")) { diff --git a/AnnService/src/Socket/Connection.cpp b/AnnService/src/Socket/Connection.cpp index 150889d2f..d99ba8882 100644 --- a/AnnService/src/Socket/Connection.cpp +++ b/AnnService/src/Socket/Connection.cpp @@ -26,10 +26,21 @@ Connection::Connection(ConnectionID p_connectionID, boost::asio::ip::tcp::socket void Connection::Start() { - SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, "Connection Start, local: %u, remote: %s:%u\n", - static_cast(m_socket.local_endpoint().port()), - m_socket.remote_endpoint().address().to_string().c_str(), - static_cast(m_socket.remote_endpoint().port())); + boost::system::error_code localEc; + boost::system::error_code remoteEc; + auto localEp = m_socket.local_endpoint(localEc); + auto remoteEp = m_socket.remote_endpoint(remoteEc); + if (!localEc && !remoteEc) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, "Connection Start, local: %u, remote: %s:%u\n", + static_cast(localEp.port()), + remoteEp.address().to_string().c_str(), + static_cast(remoteEp.port())); + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "Connection Start, socket not connected: local=%s remote=%s\n", + localEc ? localEc.message().c_str() : "ok", + remoteEc ? remoteEc.message().c_str() : "ok"); + return; + } if (!m_stopped.exchange(false)) { @@ -42,10 +53,16 @@ void Connection::Start() void Connection::Stop() { - SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, "Connection Stop, local: %u, remote: %s:%u\n", - static_cast(m_socket.local_endpoint().port()), - m_socket.remote_endpoint().address().to_string().c_str(), - static_cast(m_socket.remote_endpoint().port())); + boost::system::error_code localEc; + boost::system::error_code remoteEc; + auto localEp = m_socket.local_endpoint(localEc); + auto remoteEp = m_socket.remote_endpoint(remoteEc); + if (!localEc && !remoteEc) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Debug, "Connection Stop, local: %u, remote: %s:%u\n", + static_cast(localEp.port()), + remoteEp.address().to_string().c_str(), + static_cast(remoteEp.port())); + } if (m_stopped.exchange(true)) { diff --git a/AnnService/src/Socket/Server.cpp b/AnnService/src/Socket/Server.cpp index 9781bf1d4..8be0682c6 100644 --- a/AnnService/src/Socket/Server.cpp +++ b/AnnService/src/Socket/Server.cpp @@ -26,7 +26,7 @@ Server::Server(const std::string &p_address, const std::string &p_port, const Pa boost::asio::ip::tcp::endpoint endpoint = *(endPoints.begin()); m_acceptor.open(endpoint.protocol()); - m_acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(false)); + m_acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); m_acceptor.bind(endpoint, errCode); if (errCode) diff --git a/Test/CMakeLists.txt b/Test/CMakeLists.txt index 52f4168a9..b1b708d6b 100644 --- a/Test/CMakeLists.txt +++ b/Test/CMakeLists.txt @@ -24,7 +24,12 @@ if (NOT LIBRARYONLY) file(GLOB TEST_HDR_FILES ${PROJECT_SOURCE_DIR}/Test/inc/Test.h) file(GLOB TEST_SRC_FILES ${PROJECT_SOURCE_DIR}/Test/src/*.cpp) add_executable(SPTAGTest ${TEST_SRC_FILES} ${TEST_HDR_FILES}) - target_link_libraries(SPTAGTest SPTAGLibStatic ssdservingLib ${Boost_LIBRARIES}) + target_link_libraries(SPTAGTest SPTAGLibStatic ssdservingLib ${Boost_LIBRARIES} ${TiKV_LIBRARIES}) + if (TIKV) + # gRPC's static libs require these absl symbols; only link when the + # TiKV backend (and thus gRPC) is in the dependency closure. + target_link_libraries(SPTAGTest absl_synchronization absl_cord absl_cordz_info absl_cord_internal absl_cordz_functions absl_cordz_handle) + endif() install(TARGETS SPTAGTest RUNTIME DESTINATION bin diff --git a/Test/inc/TestDataGenerator.h b/Test/inc/TestDataGenerator.h index 5820c8422..9f958f43d 100644 --- a/Test/inc/TestDataGenerator.h +++ b/Test/inc/TestDataGenerator.h @@ -29,7 +29,20 @@ namespace TestUtils { static std::shared_ptr LoadMetadataSet(const std::string pmetaset, const std::string pmetaidx, SPTAG::SizeType start = 0, SPTAG::SizeType count = -1); - static float EvaluateRecall(const std::vector &res, std::shared_ptr &truth, int recallK, int k, int batch, int totalbatches); + // Compute recall against truth file. + // + // Distributed (per-node) recall: when each node only owns a SUBSET of + // the global query set, pass the global query count and this node's + // query offset so the truth row indexing is computed in global terms. + // The truth file is laid out as: + // [iter=0 VIDs for queries 0..Q-1] [iter=1 VIDs ...] ... + // [iter=0 dists for queries 0..Q-1] [iter=1 dists ...] ... + // where Q is the GLOBAL query count, NOT res.size(). With the legacy + // res.size()-based formula, distributed batches > 0 read the wrong + // rows (off by Q-myCount), giving near-random recall that's noise. + // totalQueries=-1 (default) preserves the legacy single-node formula. + static float EvaluateRecall(const std::vector &res, std::shared_ptr &truth, int recallK, int k, int batch, int totalbatches, + int totalQueries = -1, int queryOffset = 0); void RunBatches(std::shared_ptr &vecset, std::shared_ptr &metaset, std::shared_ptr &addvecset, std::shared_ptr &addmetaset, diff --git a/Test/src/SPFreshTest.cpp b/Test/src/SPFreshTest.cpp index 83b67feac..4736f71ff 100644 --- a/Test/src/SPFreshTest.cpp +++ b/Test/src/SPFreshTest.cpp @@ -5,6 +5,10 @@ #include "inc/Core/Common/DistanceUtils.h" #include "inc/Core/Common/QueryResultSet.h" #include "inc/Core/SPANN/Index.h" +#include "inc/Core/SPANN/Distributed/WorkerNode.h" +#include "inc/Core/SPANN/Distributed/DispatcherNode.h" +#include "inc/Core/SPANN/ExtraDynamicSearcher.h" +#include "inc/Core/SPANN/ExtraTiKVController.h" #include "inc/Core/SPANN/SPANNResultIterator.h" #include "inc/Core/VectorIndex.h" #include "inc/Core/Common/IQuantizer.h" @@ -17,10 +21,13 @@ #include "inc/Test.h" #include "inc/TestDataGenerator.h" +#include #include #include +#include #include #include +#include #include #include #include @@ -58,6 +65,93 @@ static __attribute__((constructor)) void install_segfault_handler() { using namespace SPTAG; +// Helper: parse "host:port,host:port,..." into vector of pairs. +static std::vector> ParseNodeAddrs(const std::string& addrStr) { + std::vector> result; + auto parts = Helper::StrUtils::SplitString(addrStr, ","); + for (auto& part : parts) { + auto hp = Helper::StrUtils::SplitString(part, ":"); + if (hp.size() == 2) result.emplace_back(hp[0], hp[1]); + } + return result; +} + +// Helper: bind a WorkerNode to ALL ExtraDynamicSearcher layers inside a VectorIndex. +// Calls SetWorker() which wires up append, head-sync, and remote-lock callbacks. +// All layers must have the worker bound so that AddIDCapacity (called per-layer) sees +// the correct numNodes and grows each layer's TiKVVersionMap to cover the full global +// VID space (capa * numNodes), not just this node's slice. +template +static void BindWorkerToIndex(SPANN::WorkerNode* worker, std::shared_ptr& index) { + auto* spannIndex = dynamic_cast*>(index.get()); + if (!spannIndex) return; + for (int layer = 0; ; ++layer) { + auto diskIndex = spannIndex->GetDiskIndex(layer); + if (!diskIndex) break; + auto* searcher = dynamic_cast*>(diskIndex.get()); + if (searcher) searcher->SetWorker(worker); + } +} + +// Helper: same as BindWorkerToIndex but takes a raw SPANN::Index* directly +// (for sites that have already extracted the spannIndex pointer). +template +static void BindWorkerToAllLayers(SPANN::WorkerNode* worker, SPANN::Index* spannIndex) { + if (!spannIndex) return; + for (int layer = 0; ; ++layer) { + auto diskIndex = spannIndex->GetDiskIndex(layer); + if (!diskIndex) break; + auto* searcher = dynamic_cast*>(diskIndex.get()); + if (searcher) searcher->SetWorker(worker); + } +} + +// Configuration for distributed mode, read from [Distributed] ini section. +struct DistributedConfig { + bool enabled = false; + int workerIndex = 0; // 0-based: 0 = driver (dispatcher + worker 0), 1+ = remote worker + std::string dispatcherAddr; // "host:port" + std::string workerAddrs; // "host:port,host:port,..." + std::string storeAddrs; // "addr,addr,..." + std::string pdAddrs; // "host:port,host:port,..." (per-worker PD) + + // Number of workers (for query/insert partitioning) + int GetNumWorkers() const { + if (!enabled || workerAddrs.empty()) return 1; + return (int)std::count(workerAddrs.begin(), workerAddrs.end(), ',') + 1; + } + + // Parse dispatcher address into host:port pair + std::pair GetDispatcherAddr() const { + auto hp = Helper::StrUtils::SplitString(dispatcherAddr, ":"); + if (hp.size() == 2) return {hp[0], hp[1]}; + return {"", ""}; + } + + // Get PD address for this worker (falls back to global TiKVPDAddresses) + std::string GetLocalPDAddr() const { + if (pdAddrs.empty()) return ""; + auto addrs = Helper::StrUtils::SplitString(pdAddrs, ","); + if (workerIndex < (int)addrs.size()) return addrs[workerIndex]; + return addrs[0]; + } + + static DistributedConfig FromIni(Helper::IniReader& ini) { + DistributedConfig cfg; + cfg.enabled = ini.GetParameter("Distributed", "Enabled", false); + cfg.dispatcherAddr = ini.GetParameter("Distributed", "DispatcherAddr", std::string("")); + cfg.workerAddrs = ini.GetParameter("Distributed", "WorkerAddrs", std::string("")); + cfg.storeAddrs = ini.GetParameter("Distributed", "StoreAddrs", std::string("")); + cfg.pdAddrs = ini.GetParameter("Distributed", "PDAddrs", std::string("")); + + // Worker index from env var (0 = driver, 1+ = remote worker) + const char* wiEnv = std::getenv("WORKER_INDEX"); + cfg.workerIndex = wiEnv ? std::atoi(wiEnv) : 0; + + return cfg; + } +}; + namespace SPFreshTest { SizeType N = 10000; @@ -309,13 +403,17 @@ std::shared_ptr BuildIndex(const std::string &outDirectory, std::sh template std::shared_ptr BuildLargeIndex(const std::string &outDirectory, std::string &pvecset, - std::string& pmetaset, std::string& pmetaidx, Helper::IniReader& iniReader, const std::string &distMethod = "L2", + std::string& pmetaset, std::string& pmetaidx, const std::string &distMethod = "L2", int searchthread = 2, int insertthread = 2, int layers = 1, - std::shared_ptr quantizer = nullptr, std::string quantizerFilePath = "quantizer.bin") + std::shared_ptr quantizer = nullptr, std::string quantizerFilePath = "quantizer.bin", + const std::map& ssdOverrides = {}, + bool ssdOnly = false, + SPANN::WorkerNode* p_worker = nullptr) { auto vecIndex = VectorIndex::CreateInstance(IndexAlgoType::SPANN, GetEnumValueType()); int maxthreads = std::thread::hardware_concurrency(); int postingLimit = 4 * sizeof(T); + remove((outDirectory + FolderSep + "ssdmapping_0_postings").c_str()); std::string configuration = R"( [Base] DistCalcMethod=)" + distMethod + R"( @@ -402,15 +500,29 @@ std::shared_ptr BuildLargeIndex(const std::string &outDirectory, st } } - for (const auto &sec : sections) + // Apply overrides (e.g., Storage, TiKV settings, SelectHead/BuildHead params) + for (const auto &[key, val] : ssdOverrides) { - auto params = iniReader.GetParameters(sec.c_str()); - for (const auto &[key, val] : params) - { - vecIndex->SetParameter(key.c_str(), val.c_str(), sec.c_str()); + // Keys prefixed with "SectionName." are routed to the corresponding section + auto dotPos = key.find('.'); + if (dotPos != std::string::npos) { + std::string section = key.substr(0, dotPos); + std::string param = key.substr(dotPos + 1); + vecIndex->SetParameter(param.c_str(), val.c_str(), section.c_str()); + } else { + vecIndex->SetParameter(key.c_str(), val.c_str(), "BuildSSDIndex"); } } + // SSD-only mode: skip SelectHead and BuildHead, resume from specified layer + if (ssdOnly) + { + // Allow explicit ResumeLayer from config/overrides; otherwise default to layer 0 + // (rebuild SSD for all layers, reusing existing head indexes) + int resumeLayer = 0; + vecIndex->SetParameter("ResumeLayer", std::to_string(resumeLayer).c_str(), "BuildSSDIndex"); + } + if (quantizer) { vecIndex->SetParameter("QuantizerFilePath", quantizerFilePath.c_str(), "Base"); @@ -418,6 +530,20 @@ std::shared_ptr BuildLargeIndex(const std::string &outDirectory, st vecIndex->SetQuantizerADC(false); vecIndex->SetParameter("Dim", std::to_string(quantizer->GetNumSubvectors()).c_str(), "Base"); } + + // Bind a routing worker (if any) to the freshly-created SSD searcher + // before BuildIndex runs. Build itself does not route postings any more + // (shared TiKV cluster — driver writes directly), so in buildOnly mode + // the workerPtr will simply be nullptr and this block is a no-op. + if (p_worker) { + if (auto* spannIdx = dynamic_cast*>(vecIndex.get())) { + spannIdx->SetWorker(p_worker); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "BuildLargeIndex: bound routing worker (numNodes=%d)\n", + p_worker->GetNumNodes()); + } + } + auto buildStatus = vecIndex->BuildIndex(); if (buildStatus != ErrorCode::Success) return nullptr; @@ -455,9 +581,19 @@ float Search(std::shared_ptr &vecIndex, std::shared_ptr return TestUtils::TestDataGenerator::EvaluateRecall(results, truth, k, k, batch, totalbatches); } +template +double ExecutePartitionedSearch(VectorIndex* index, + std::shared_ptr& queryset, + int myStart, int myCount, + int searchK, int numThreads, + std::vector& results, + std::vector* latenciesOut, + std::vector* statsOut); + template void InsertVectors(SPANN::Index *p_index, int insertThreads, int step, - std::shared_ptr addset, std::shared_ptr &metaset, int searchThreads = 0, std::shared_ptr queryset = nullptr, int numQueries = 0, int k = 5, std::ostream* benchmarkData = nullptr, int start = 0) + std::shared_ptr addset, std::shared_ptr &metaset, int searchThreads = 0, std::shared_ptr queryset = nullptr, int numQueries = 0, int k = 5, std::ostream* benchmarkData = nullptr, int start = 0, + SPANN::WorkerNode* router = nullptr) { p_index->ForceCompaction(); p_index->GetDBStat(); @@ -465,8 +601,15 @@ void InsertVectors(SPANN::Index *p_index, int insertThreads, int step std::vector threads; int printstep = step / 50; + + // Bulk path: single AddIndex call amortizes remote-append RPCs into one AppendBatchAsync. + // Per-vector RNGSelection is parallelized inside ExtraDynamicSearcher::AddIndex so we + // keep insertThreads-way parallelism while saving N-1 RPCs. + bool useBulk = (router && router->GetNumNodes() > 1); + + // Per-vector insert (original path): each thread grabs one vector at a time std::atomic_size_t vectorsSent(start); - auto func = [&]() { + auto perVecFunc = [&]() { size_t index = start; while (true) { @@ -503,43 +646,58 @@ void InsertVectors(SPANN::Index *p_index, int insertThreads, int step } }; - if (searchThreads > 0 && queryset != nullptr && numQueries != 0 && benchmarkData != nullptr) { - std::vector latencies(numQueries); - std::vector results(numQueries); - std::vector duration(searchThreads); - - for (int i = 0; i < numQueries; i++) + // Bulk insert (router path): single call, parallelism inside SPANNIndex::AddIndex + auto bulkFunc = [&]() { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "InsertVectors: bulk AddIndex for %d vectors (router enabled)\n", step); + ErrorCode ret = p_index->AddIndex(addset->GetVector((SizeType)start), step, addset->Dimension(), metaset, true); + if (ret != ErrorCode::Success) { - results[i] = QueryResult((const ValueType *)queryset->GetVector(i), k, false); + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "AddIndex bulk failed. start:%d count:%d Dim:%d Error:%d\n", + start, step, addset->Dimension(), static_cast(ret)); } + BOOST_REQUIRE(ret == ErrorCode::Success); + }; - std::atomic_size_t queriesSent(0); - auto search = [&](int tid) { - auto s1 = std::chrono::high_resolution_clock::now(); - size_t qid; - while ((qid = queriesSent.fetch_add(1)) < numQueries) - { - auto t1 = std::chrono::high_resolution_clock::now(); - p_index->SearchIndex(results[qid]); - auto t2 = std::chrono::high_resolution_clock::now(); - latencies[qid] = std::chrono::duration_cast(t2 - t1).count() / 1000.0f; - } - auto s2 = std::chrono::high_resolution_clock::now(); - duration[tid] = std::chrono::duration_cast(s2 - s1).count() / 1000.0f; - }; + std::function func; + int insertThreadCount; + if (useBulk) { + func = bulkFunc; + insertThreadCount = 1; + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "InsertVectors: bulk path - driver launcher=1, internal parallelism comes from " + "[BuildSSDIndex] AppendThreadNum (user-supplied InsertThreadNum=%d is unused on this path)\n", + insertThreads); + } else { + func = perVecFunc; + insertThreadCount = insertThreads; + } - for (int j = 0; j < insertThreads; j++) - { - threads.emplace_back(func); - } - for (int j = 0; j < searchThreads; j++) - { - threads.emplace_back(search, j); - } - for (auto &thread : threads) - { - thread.join(); - } + bool withSearch = (searchThreads > 0 && queryset != nullptr && numQueries != 0 && benchmarkData != nullptr); + + for (int j = 0; j < insertThreadCount; j++) + { + threads.emplace_back(func); + } + + std::vector latencies; + std::vector results; + double searchWallSeconds = 0.0; + std::thread searchThread; + if (withSearch) { + searchThread = std::thread([&]() { + searchWallSeconds = ExecutePartitionedSearch( + p_index, queryset, /*myStart=*/0, numQueries, k, searchThreads, + results, &latencies, /*statsOut=*/nullptr); + }); + } + + for (auto &thread : threads) + { + thread.join(); + } + if (withSearch) { + searchThread.join(); // Calculate statistics float mean = 0, minLat = (std::numeric_limits::max)(), maxLat = 0; @@ -556,10 +714,7 @@ void InsertVectors(SPANN::Index *p_index, int insertThreads, int step float p90 = latencies[static_cast(numQueries * 0.90)]; float p95 = latencies[static_cast(numQueries * 0.95)]; float p99 = latencies[static_cast(numQueries * 0.99)]; - float maxBatchLatency = 1e-6; - for (int i = 0; i < searchThreads; i++) - if (maxBatchLatency < duration[i]) maxBatchLatency = duration[i]; - float qps = numQueries / maxBatchLatency; + float qps = numQueries / std::max(static_cast(searchWallSeconds), 1e-6f); *benchmarkData << " \"numQueries\": " << numQueries << ",\n"; *benchmarkData << " \"meanLatency\": " << mean << ",\n"; @@ -594,68 +749,75 @@ template void BenchmarkQueryPerformance(std::shared_ptr &index, std::shared_ptr &queryset, std::shared_ptr &truth, const std::string &truthPath, SizeType baseVectorCount, int topK, int searchK, int numThreads, int numQueries, int batches, int totalbatches, - std::ostream &benchmarkData, std::string prefix = "") + std::ostream &benchmarkData, std::string prefix = "", + int nodeIndex = 0, SPANN::WorkerNode* router = nullptr, + SPANN::DispatcherNode* dispatcher = nullptr) { - // Benchmark: Query performance with detailed latency stats - std::vector latencies(numQueries); - std::atomic_size_t queriesSent(0); - std::vector results(numQueries); - std::vector searchStats(numQueries); - auto* spannIndex = dynamic_cast*>(index.get()); - - for (int i = 0; i < numQueries; i++) - { - results[i] = QueryResult((const T *)queryset->GetVector(i), searchK, false); + // Use hash ring node count (workers only) for partitioning, not GetNumNodes() (includes dispatcher) + auto ring = (router && router->IsEnabled()) ? router->GetHashRing() : nullptr; + int nodeCount = ring ? static_cast(ring->NodeCount()) : 1; + bool distributed = (dispatcher != nullptr && router != nullptr && router->IsEnabled() && nodeCount > 1); + + // Determine this node's query range (balanced contiguous partition) + int myStart = 0, myCount = numQueries; + if (distributed) { + myStart = (int)((long long)nodeIndex * numQueries / nodeCount); + int myEnd = (int)((long long)(nodeIndex + 1) * numQueries / nodeCount); + myCount = myEnd - myStart; } - std::vector threads; - threads.reserve(numThreads); - - auto batchStart = std::chrono::high_resolution_clock::now(); - - for (int i = 0; i < numThreads; i++) - { - threads.emplace_back([&]() { - size_t qid; - while ((qid = queriesSent.fetch_add(1)) < numQueries) - { - auto t1 = std::chrono::high_resolution_clock::now(); - if (spannIndex != nullptr) - { - spannIndex->SearchIndex(results[qid], &searchStats[qid]); - } - else - { - index->SearchIndex(results[qid]); - } - auto t2 = std::chrono::high_resolution_clock::now(); - latencies[qid] = std::chrono::duration_cast(t2 - t1).count() / 1000.0f; - } - }); + // Dispatch search command to all workers via TCP (distributed only) + std::int64_t dispatchId = -1; + int round = 0; + if (distributed) { + static std::atomic s_searchRound{0}; + round = s_searchRound.fetch_add(1); + dispatchId = dispatcher->BroadcastDispatchCommand( + SPANN::DispatchCommand::Type::Search, static_cast(round)); } - for (auto &thread : threads) - thread.join(); + // Run this node's share of queries. + std::vector results; + std::vector latencies; + std::vector searchStats; + double localWallTime = ExecutePartitionedSearch( + index.get(), queryset, myStart, myCount, searchK, numThreads, + results, &latencies, &searchStats); + float batchLatency = static_cast(localWallTime); + auto* spannIndex = dynamic_cast*>(index.get()); - auto batchEnd = std::chrono::high_resolution_clock::now(); - float batchLatency = - std::chrono::duration_cast(batchEnd - batchStart).count() / 1000000.0f; + if (distributed) { + // Driver also runs searches against its local node, so it can have + // outgoing merge hints queued. Drain before we move on. + if (router) { + router->FlushRemoteMerges(); + } + // Collect worker timings via TCP; QPS is governed by the slowest node. + auto workerTimes = dispatcher->WaitForAllResults(dispatchId, 300); + for (double wt : workerTimes) { + batchLatency = std::max(batchLatency, static_cast(wt)); + } + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "BenchmarkQueryPerformance round %d: local=%.1fms (%d queries), max=%.1fms, QPS=%.1f\n", + round, localWallTime * 1000, myCount, batchLatency * 1000, numQueries / batchLatency); + } - // Calculate statistics + // Calculate statistics (from this node's queries) + int statsCount = myCount; float mean = 0, minLat = (std::numeric_limits::max)(), maxLat = 0; - for (int i = 0; i < numQueries; i++) + for (int i = 0; i < statsCount; i++) { mean += latencies[i]; minLat = (std::min)(minLat, latencies[i]); maxLat = (std::max)(maxLat, latencies[i]); } - mean /= numQueries; + mean /= statsCount; std::sort(latencies.begin(), latencies.end()); - float p50 = latencies[static_cast(numQueries * 0.50)]; - float p90 = latencies[static_cast(numQueries * 0.90)]; - float p95 = latencies[static_cast(numQueries * 0.95)]; - float p99 = latencies[static_cast(numQueries * 0.99)]; + float p50 = latencies[static_cast(statsCount * 0.50)]; + float p90 = latencies[static_cast(statsCount * 0.90)]; + float p95 = latencies[static_cast(statsCount * 0.95)]; + float p99 = latencies[static_cast(statsCount * 0.99)]; float qps = numQueries / batchLatency; BOOST_TEST_MESSAGE(" Queries: " << numQueries); @@ -752,7 +914,7 @@ void BenchmarkQueryPerformance(std::shared_ptr &index, std::shared_ benchmarkData << prefix << " },\n"; } - // Recall evaluation (if truth file provided) + // Recall evaluation if (!truth || truthPath.empty() || truthPath == "none") { BOOST_TEST_MESSAGE(" Recall evaluation skipped (no truth data)"); @@ -763,7 +925,13 @@ void BenchmarkQueryPerformance(std::shared_ptr &index, std::shared_ BOOST_TEST_MESSAGE("Checking for truth file: " << truthPath); std::shared_ptr pvecset, paddvecset; - float avgRecall = TestUtils::TestDataGenerator::EvaluateRecall(results, truth, topK, searchK, batches, totalbatches); + // In distributed mode, this node only searched queries [myStart, myStart+myCount). + // Pass the global query count and this node's offset so EvaluateRecall indexes + // the truth file in global terms (BATCH > 0 reads the wrong truth rows otherwise). + int recallTotalQueries = distributed ? numQueries : -1; + int recallQueryOffset = distributed ? myStart : 0; + float avgRecall = TestUtils::TestDataGenerator::EvaluateRecall(results, truth, topK, searchK, batches, totalbatches, + recallTotalQueries, recallQueryOffset); BOOST_TEST_MESSAGE(" Recall" << topK << "@" << searchK << " = " << (avgRecall * 100.0f) << "%"); BOOST_TEST_MESSAGE(" (Evaluated on " << numQueries << " queries against base vectors)"); benchmarkData << std::fixed << std::setprecision(4); @@ -775,6 +943,106 @@ void BenchmarkQueryPerformance(std::shared_ptr &index, std::shared_ benchmarkData << prefix << " }"; } +// Run [myStart, myStart+myCount) queries against `index` using `numThreads` workers. +// Returns wall time in seconds. Fills `results` and (when non-null) per-query +// `latenciesOut` (ms) and `statsOut` (SPANN SearchStats). When `statsOut` is +// non-null and the index is a SPANN index, the stats overload of SearchIndex +// is used; otherwise the plain SearchIndex path runs. +template +double ExecutePartitionedSearch(VectorIndex* index, + std::shared_ptr& queryset, + int myStart, int myCount, + int searchK, int numThreads, + std::vector& results, + std::vector* latenciesOut, + std::vector* statsOut) +{ + auto* spannIndex = dynamic_cast*>(index); + bool useStats = (statsOut != nullptr && spannIndex != nullptr); + + results.resize(myCount); + for (int i = 0; i < myCount; i++) { + results[i] = QueryResult((const T*)queryset->GetVector(myStart + i), searchK, false); + } + if (useStats) statsOut->assign(myCount, SPANN::SearchStats()); + if (latenciesOut) latenciesOut->assign(myCount, 0.0f); + + std::atomic_size_t queriesSent(0); + int nThreads = std::min(numThreads, std::max(myCount, 1)); + std::vector threads; + threads.reserve(nThreads); + + auto t0 = std::chrono::high_resolution_clock::now(); + for (int i = 0; i < nThreads; i++) { + threads.emplace_back([&]() { + size_t qid; + while ((qid = queriesSent.fetch_add(1)) < static_cast(myCount)) { + auto t1 = std::chrono::high_resolution_clock::now(); + if (useStats) { + spannIndex->SearchIndex(results[qid], &(*statsOut)[qid]); + } else if (spannIndex != nullptr) { + spannIndex->SearchIndex(results[qid]); + } else { + index->SearchIndex(results[qid]); + } + auto t2 = std::chrono::high_resolution_clock::now(); + if (latenciesOut) { + (*latenciesOut)[qid] = + std::chrono::duration_cast(t2 - t1).count() / 1000.0f; + } + } + }); + } + for (auto& t : threads) t.join(); + auto t3 = std::chrono::high_resolution_clock::now(); + return std::chrono::duration_cast(t3 - t0).count() / 1000000.0; +} + +ErrorCode QuantizeVectors(const std::shared_ptr& quantizer, + const std::shared_ptr& source, + ByteArray& dest); + +template +void LoadAndInsertBatch(SPANN::Index* spannIndex, + const std::string& paddset, + const std::string& paddmeta, + const std::string& paddmetaidx, + int dimension, + int insertStart, int loadCount, int perNodeBatch, + int numInsertThreads, + SPANN::WorkerNode* router, + std::shared_ptr quantizer, + int searchDuringInsertThreads, + std::shared_ptr queryset, + int numQueries, int searchK, + std::ostream* benchmarkData, + const char* logPrefix) +{ + auto addset = TestUtils::TestDataGenerator::LoadVectorSet(paddset, dimension, insertStart, loadCount); + if (quantizer) { + auto addFloat = ConvertToFloatVectorSet(addset); + BOOST_REQUIRE(addFloat != nullptr); + ByteArray quantizedAddBytes = + ByteArray::Alloc((size_t)addFloat->Count() * (size_t)(quantizer->GetNumSubvectors())); + BOOST_REQUIRE(QuantizeVectors(quantizer, addFloat, quantizedAddBytes) == ErrorCode::Success); + addset = std::make_shared(quantizedAddBytes, + VectorValueType::UInt8, + quantizer->GetNumSubvectors(), + addFloat->Count()); + } + auto addmetaset = TestUtils::TestDataGenerator::LoadMetadataSet(paddmeta, paddmetaidx, insertStart, loadCount); + InsertVectors(spannIndex, numInsertThreads, perNodeBatch, + addset, addmetaset, + searchDuringInsertThreads, queryset, numQueries, searchK, + benchmarkData, 0, router); + if (router) { + router->FlushRemoteAppends(); + router->FlushRemoteMerges(); + router->LogRouteStats(" (batch flush)"); + router->ResetRouteStats(); + } +} + template void LogCheckpointLayerStats(const std::shared_ptr& index, int layers, int currentBatch, int totalBatches) { @@ -839,9 +1107,13 @@ ErrorCode QuantizeVectors(const std::shared_ptr& quantizer, template void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, const std::string &truthPath, DistCalcMethod distMethod, const std::string &indexPath, int dimension, int baseVectorCount, - int insertVectorCount, int deleteVectorCount, int batches, int topK, int numSearchThreads, int numInsertThreads, int numSearchDuringInsertThreads, int numQueries, Helper::IniReader& iniReader, + int insertVectorCount, int deleteVectorCount, int batches, int topK, int numSearchThreads, int numInsertThreads, int numSearchDuringInsertThreads, int numQueries, const std::string &outputFile = "output.json", const bool rebuild = true, const int resume = -1, - const std::string &quantizerFilePath = std::string(""), int quantizedDim = 0, int layers = 1) + const std::string &quantizerFilePath = std::string(""), int quantizedDim = 0, int layers = 1, + const std::map& ssdOverrides = {}, + bool rebuildSsdOnly = false, + bool buildOnly = false, + const DistributedConfig& distCfg = {}) { int oldM = M, oldK = K, oldN = N, oldQueries = queries; N = baseVectorCount; @@ -852,6 +1124,16 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c int insertBatchSize = insertVectorCount / max(batches, 1); int deleteBatchSize = deleteVectorCount / max(batches, 1); + // Use distributed config for multi-node partitioning + int nodeIndex = distCfg.workerIndex; + int numNodes = distCfg.GetNumWorkers(); + int myInsertStart = (numNodes > 1) ? (nodeIndex * insertBatchSize) / numNodes : 0; + int myInsertEnd = (numNodes > 1) ? ((nodeIndex + 1) * insertBatchSize) / numNodes : insertBatchSize; + int perNodeBatch = myInsertEnd - myInsertStart; + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "RunBenchmark: nodeIndex=%d numNodes=%d insertBatchSize=%d myInsertStart=%d myInsertEnd=%d perNodeBatch=%d\n", + nodeIndex, numNodes, insertBatchSize, myInsertStart, myInsertEnd, perNodeBatch); + // Variables to collect JSON output data std::ostringstream tmpbenchmark; @@ -905,12 +1187,78 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c jsonFile << " \"results\": {\n"; int SearchK = enableQuantization? topK * 4 : topK; + // Distributed routing: dispatcher + local worker (driver node is both) + std::unique_ptr dispatcher; + std::unique_ptr worker; + SPANN::WorkerNode* workerPtr = nullptr; // convenience alias std::shared_ptr index; std::shared_ptr quantizer; - + + // Distributed setup: when running a non-buildOnly distributed benchmark + // (i.e. the search/insert run phase), create the dispatcher + worker0 + // so the driver can broadcast the hash ring and accept remote callbacks. + // BuildOnly mode skips this entirely — build runs single-node and writes + // straight to the shared TiKV cluster (PD routes each key to the owning + // store), so no dispatcher / worker plumbing is needed for the build + // path. + if (distCfg.enabled && !buildOnly) { + auto dispAddr = distCfg.GetDispatcherAddr(); + auto workerAddrs = ParseNodeAddrs(distCfg.workerAddrs); + auto storeAddrs = Helper::StrUtils::SplitString(distCfg.storeAddrs, ","); + + dispatcher.reset(new SPANN::DispatcherNode()); + BOOST_REQUIRE_MESSAGE(dispatcher->Initialize(dispAddr, workerAddrs), + "DispatcherNode initialization failed (build-phase setup)"); + BOOST_REQUIRE(dispatcher->Start()); + + worker.reset(new SPANN::WorkerNode()); + // Pre-build: pass nullptr DB. After BuildIndex, swap in the real DB + // via SetDB() (or rebuild the worker on top of it for run mode). + BOOST_REQUIRE_MESSAGE( + worker->Initialize(nullptr, 0, dispAddr, workerAddrs, storeAddrs), + "WorkerNode initialization failed (build-phase setup)"); + BOOST_REQUIRE(worker->Start()); + workerPtr = worker.get(); + + dispatcher->SetLocalWorkerIndex(worker->GetLocalNodeIndex()); + worker->SetHashRing(dispatcher->GetHashRing()); + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "Pre-build: waiting for all peer connections...\n"); + BOOST_REQUIRE_MESSAGE(dispatcher->WaitForAllPeersConnected(180), + "Timed out waiting for peer connections (build-phase)"); + + auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(180); + while (std::chrono::steady_clock::now() < deadline) { + if (dispatcher->AllWorkersAcked()) break; + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + } + BOOST_REQUIRE_MESSAGE(dispatcher->AllWorkersAcked(), + "Timed out waiting for workers to ACK ring (build-phase)"); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "Pre-build: all %d workers connected and ring synchronized\n", numNodes); + + // Start heartbeat pump so remote workers can detect driver failure + // and exit cleanly instead of relying on a fixed wall-clock receiver + // timeout. Worker side enforces HeartbeatTimeoutSec (default 180s). + // Interval is fixed at 30s; six missed pings before worker bails. + dispatcher->StartHeartbeat(30); + } + // Build initial index BOOST_TEST_MESSAGE("\n=== Building Index ==="); - if (rebuild || !direxists(indexPath.c_str())) { + if (rebuild || rebuildSsdOnly || !direxists(indexPath.c_str())) { + if (!rebuildSsdOnly) { + // Allow empty or non-existent directories; block only if index files already exist + if (direxists(indexPath.c_str()) && fileexists((indexPath + FolderSep + "indexloader.ini").c_str())) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Error, + "Index directory '%s' already exists with index files. Refusing to delete. " + "Remove it manually or use RebuildSSDOnly=true to resume.\n", + indexPath.c_str()); + BOOST_FAIL("Index directory already exists: " + indexPath); + return; + } + } auto buildstart = std::chrono::high_resolution_clock::now(); if (enableQuantization) @@ -935,13 +1283,13 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c quantizedBase->Save(pquanvecset); } - index = BuildLargeIndex(indexPath, pquanvecset, pmeta, pmetaidx, iniReader, dist, numSearchThreads, numInsertThreads, layers, quantizer, "quantizer.bin"); + index = BuildLargeIndex(indexPath, pquanvecset, pmeta, pmetaidx, dist, numSearchThreads, numInsertThreads, layers, quantizer, "quantizer.bin", ssdOverrides, rebuildSsdOnly, workerPtr); BOOST_REQUIRE(index != nullptr); index->SetQuantizerADC(true); } else { - index = BuildLargeIndex(indexPath, pvecset, pmeta, pmetaidx, iniReader, dist, numSearchThreads, numInsertThreads, layers); + index = BuildLargeIndex(indexPath, pvecset, pmeta, pmetaidx, dist, numSearchThreads, numInsertThreads, layers, nullptr, "quantizer.bin", ssdOverrides, rebuildSsdOnly, workerPtr); BOOST_REQUIRE(index != nullptr); } @@ -957,6 +1305,23 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c BOOST_REQUIRE(index != nullptr); } + // Set up distributed routing for RUN mode if configured. + // (Build-phase needs no dispatcher/worker; the run-phase dispatcher+worker + // were created in the pre-build block above.) The driver node is both + // dispatcher (ring management) and worker 0 (compute). + if (distCfg.enabled && !buildOnly) { + // Bind worker to ALL searcher layers (wires append + headsync + lock + fetch callbacks). + // Every layer must see the worker so AddIDCapacity grows each layer's + // version map by capa * numNodes (not just capa). + auto* spannIndex = dynamic_cast*>(index.get()); + BOOST_REQUIRE(spannIndex != nullptr); + BindWorkerToAllLayers(workerPtr, spannIndex); + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "Run mode: worker bound to all %d layers\n", + (int)spannIndex->GetOptions()->m_layers); + } + auto queryset = TestUtils::TestDataGenerator::LoadVectorSet(pqueryset, M); BOOST_REQUIRE(queryset != nullptr); @@ -976,32 +1341,50 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c truth = TestUtils::TestDataGenerator::LoadVectorSet(ptruth, K); } - // Benchmark 0: Query performance before insertions (round 1 — cold cache) - BOOST_TEST_MESSAGE("\n=== Benchmark 0: Query Before Insertions (Round 1) ==="); - BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, - numSearchThreads, numQueries, 0, batches, tmpbenchmark); - jsonFile << " \"benchmark0_query_before_insert\": "; - BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, - numSearchThreads, numQueries, 0, batches, jsonFile); - jsonFile << ",\n"; - jsonFile.flush(); - - // Benchmark 0b: Query performance before insertions (round 2 — warm cache) - BOOST_TEST_MESSAGE("\n=== Benchmark 0b: Query Before Insertions (Round 2) ==="); - BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, - numSearchThreads, numQueries, 0, batches, tmpbenchmark); - jsonFile << " \"benchmark0b_query_before_insert_round2\": "; - BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, - numSearchThreads, numQueries, 0, batches, jsonFile); - jsonFile << ",\n"; - jsonFile.flush(); + // Benchmark 0/0b: query performance before insertions. Skip in BuildOnly + // mode (no point measuring queries when we're about to exit; queries also + // require workers to be running for distributed scatter-gather). + if (!buildOnly) { + // Benchmark 0: Query performance before insertions (round 1 — cold cache) + BOOST_TEST_MESSAGE("\n=== Benchmark 0: Query Before Insertions (Round 1) ==="); + BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, + numSearchThreads, numQueries, 0, batches, tmpbenchmark, "", + nodeIndex, workerPtr, dispatcher.get()); + jsonFile << " \"benchmark0_query_before_insert\": "; + BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, + numSearchThreads, numQueries, 0, batches, jsonFile, "", + nodeIndex, workerPtr, dispatcher.get()); + jsonFile << ",\n"; + jsonFile.flush(); + + // Benchmark 0b: Query performance before insertions (round 2 — warm cache) + BOOST_TEST_MESSAGE("\n=== Benchmark 0b: Query Before Insertions (Round 2) ==="); + BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, + numSearchThreads, numQueries, 0, batches, tmpbenchmark, "", + nodeIndex, workerPtr, dispatcher.get()); + jsonFile << " \"benchmark0b_query_before_insert_round2\": "; + BenchmarkQueryPerformance(index, queryset, truth, truthPath, baseVectorCount, topK, SearchK, + numSearchThreads, numQueries, 0, batches, jsonFile, "", + nodeIndex, workerPtr, dispatcher.get()); + jsonFile << ",\n"; + jsonFile.flush(); + } else { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "BuildOnly=true: skipping Benchmark 0/0b query rounds\n"); + jsonFile << " \"benchmark0_query_before_insert\": {},\n"; + jsonFile << " \"benchmark0b_query_before_insert_round2\": {},\n"; + jsonFile.flush(); + } BOOST_REQUIRE(index->SaveIndex(indexPath) == ErrorCode::Success); index = nullptr; // Benchmark 1: Insert performance - if (insertBatchSize > 0) + if (buildOnly) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "BuildOnly=true: skipping insert batches, index saved to %s\n", indexPath.c_str()); + jsonFile << " \"benchmark1_insert\": {}\n"; + } + else if (insertBatchSize > 0) { BOOST_TEST_MESSAGE("\n=== Benchmark 1: Insert Performance ==="); { @@ -1079,31 +1462,50 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Cloned index from %s to %s, check:%d, time: %f seconds\n", prevPath.c_str(), clonePath.c_str(), (int)(cloneret == ErrorCode::Success), seconds); - int insertStart = iter * insertBatchSize; + // Re-bind the worker to ALL layers of the new cloned index's searchers + // (every layer must see the worker so AddIDCapacity grows each layer's + // version map by capa * numNodes). + if (workerPtr) { + BindWorkerToIndex(workerPtr, cloneIndex); + } + + // Dispatch insert command to workers via TCP + std::uint64_t insertDispatchId = 0; + if (dispatcher && numNodes > 1) { + insertDispatchId = dispatcher->BroadcastDispatchCommand( + SPANN::DispatchCommand::Type::Insert, static_cast(iter)); + } + + // Each node inserts its contiguous slice + // [iter*batchSize + myInsertStart, +perNodeBatch). + int insertStart = iter * insertBatchSize + myInsertStart; + int loadCount = perNodeBatch; { - std::shared_ptr addset = TestUtils::TestDataGenerator::LoadVectorSet(paddset, M, insertStart, insertBatchSize); - ByteArray quantizedAddBytes; - if (enableQuantization) { - auto addFloat = ConvertToFloatVectorSet(addset); - BOOST_REQUIRE(addFloat != nullptr); - quantizedAddBytes = ByteArray::Alloc((size_t)addFloat->Count() * (size_t)(quantizer->GetNumSubvectors())); - BOOST_REQUIRE(QuantizeVectors(quantizer, addFloat, quantizedAddBytes) == ErrorCode::Success); - addset = std::make_shared(quantizedAddBytes, - VectorValueType::UInt8, - quantizer->GetNumSubvectors(), - addFloat->Count()); - } - std::shared_ptr addmetaset = TestUtils::TestDataGenerator::LoadMetadataSet(paddmeta, paddmetaidx, insertStart, insertBatchSize); + std::string driverTag = "RunBenchmark iter=" + std::to_string(iter); start = std::chrono::high_resolution_clock::now(); - InsertVectors(static_cast *>(cloneIndex.get()), numInsertThreads, insertBatchSize, - addset, addmetaset, numSearchDuringInsertThreads, queryset, numQueries, SearchK, &jsonFile, 0); - end = std::chrono::high_resolution_clock::now(); + LoadAndInsertBatch(static_cast*>(cloneIndex.get()), + paddset, paddmeta, paddmetaidx, M, + insertStart, loadCount, perNodeBatch, + numInsertThreads, workerPtr, + enableQuantization ? quantizer : nullptr, + numSearchDuringInsertThreads, queryset, + numQueries, SearchK, &jsonFile, + driverTag.c_str()); } + + // Wait for all worker nodes to finish this batch via TCP. + if (insertDispatchId > 0) { + auto workerTimes = dispatcher->WaitForAllResults(insertDispatchId, 7200); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Driver: all %d workers finished batch %d\n", + (int)workerTimes.size(), iter + 1); + } + + end = std::chrono::high_resolution_clock::now(); seconds = std::chrono::duration_cast(end - start).count() / 1000000.0f; double throughput = insertBatchSize / seconds; - BOOST_TEST_MESSAGE(" Inserted: " << insertBatchSize << " vectors"); + BOOST_TEST_MESSAGE(" Inserted: " << insertBatchSize << " vectors (" << perNodeBatch << " local)"); BOOST_TEST_MESSAGE(" Time: " << seconds << " seconds"); BOOST_TEST_MESSAGE(" Throughput: " << throughput << " vectors/sec"); @@ -1167,17 +1569,21 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c BOOST_TEST_MESSAGE("\n=== Benchmark 2: Query After Insertions and Deletions ==="); jsonFile << " \"search\":"; BenchmarkQueryPerformance(cloneIndex, queryset, truth, truthPath, baseVectorCount, topK, SearchK, numSearchThreads, - numQueries, iter + 1, batches, tmpbenchmark, " "); + numQueries, iter + 1, batches, tmpbenchmark, " ", + nodeIndex, workerPtr, dispatcher.get()); BenchmarkQueryPerformance(cloneIndex, queryset, truth, truthPath, baseVectorCount, - topK, SearchK, numSearchThreads, numQueries, iter + 1, batches, jsonFile, " "); + topK, SearchK, numSearchThreads, numQueries, iter + 1, batches, jsonFile, " ", + nodeIndex, workerPtr, dispatcher.get()); jsonFile << ",\n"; BOOST_TEST_MESSAGE("\n=== Benchmark 2b: Query After Insertions and Deletions (Round 2) ==="); jsonFile << " \"search_round2\":"; BenchmarkQueryPerformance(cloneIndex, queryset, truth, truthPath, baseVectorCount, topK, SearchK, numSearchThreads, - numQueries, iter + 1, batches, tmpbenchmark, " "); + numQueries, iter + 1, batches, tmpbenchmark, " ", + nodeIndex, workerPtr, dispatcher.get()); BenchmarkQueryPerformance(cloneIndex, queryset, truth, truthPath, baseVectorCount, - topK, SearchK, numSearchThreads, numQueries, iter + 1, batches, jsonFile, " "); + topK, SearchK, numSearchThreads, numQueries, iter + 1, batches, jsonFile, " ", + nodeIndex, workerPtr, dispatcher.get()); jsonFile << ",\n"; start = std::chrono::high_resolution_clock::now(); @@ -1226,6 +1632,18 @@ void RunBenchmark(const std::string &vectorPath, const std::string &queryPath, c jsonFile << "}\n"; jsonFile.close(); + // Stop workers in distributed mode + if (dispatcher && numNodes > 1) { + // Stop the heartbeat pump first so we don't race a stray Heartbeat + // packet against the Stop dispatch on the same connection. + dispatcher->StopHeartbeat(); + auto dispatchId = dispatcher->BroadcastDispatchCommand(SPANN::DispatchCommand::Type::Stop, 0); + // Wait briefly for ACKs so workers exit cleanly before the driver + // tears down the network (which would force-kill in-flight RPCs). + dispatcher->WaitForAllResults(dispatchId, 60); + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Driver: sent Stop command to all workers\n"); + } + M = oldM; K = oldK; N = oldN; @@ -2201,6 +2619,14 @@ BOOST_AUTO_TEST_CASE(IterativeSearchPerf) std::filesystem::remove_all("original_index"); } +// Forward declaration +template +void RunWorker(const std::string& indexPath, int dimension, int baseVectorCount, + int insertVectorCount, int batches, int topK, int numSearchThreads, + int numInsertThreads, int numQueries, VectorValueType valueType, + const std::map& ssdOverrides, + const DistributedConfig& distCfg, int workerTimeout); + BOOST_AUTO_TEST_CASE(BenchmarkFromConfig) { using namespace SPFreshTest; @@ -2248,14 +2674,59 @@ BOOST_AUTO_TEST_CASE(BenchmarkFromConfig) int topK = iniReader.GetParameter("Benchmark", "TopK", 10); int numSearchThreads = iniReader.GetParameter("Benchmark", "NumSearchThreads", 8); int numInsertThreads = iniReader.GetParameter("Benchmark", "NumInsertThreads", 8); - int appendThreadNum = iniReader.GetParameter("Benchmark", "AppendThreadNum", 0); int numSearchDuringInsertThreads = iniReader.GetParameter("Benchmark", "NumSearchDuringInsertThreads", 1); + int appendThreadNum = iniReader.GetParameter("Benchmark", "AppendThreadNum", 0); int numQueries = iniReader.GetParameter("Benchmark", "NumQueries", 1000); int layers = iniReader.GetParameter("Benchmark", "Layers", 1); DistCalcMethod distMethod = iniReader.GetParameter("Benchmark", "DistMethod", DistCalcMethod::L2); - bool rebuild = (iniReader.GetParameter("Benchmark", "Rebuild", true) || iniReader.GetParameter("Benchmark", "RebuildSSDOnly", false)); + bool rebuild = iniReader.GetParameter("Benchmark", "Rebuild", true); + bool rebuildSsdOnly = iniReader.GetParameter("Benchmark", "RebuildSSDOnly", false); + bool buildOnly = iniReader.GetParameter("Benchmark", "BuildOnly", false); int resume = iniReader.GetParameter("Benchmark", "Resume", -1); + // Read storage backend overrides for BuildSSDIndex + std::map ssdOverrides; + std::string storage = iniReader.GetParameter("Benchmark", "Storage", std::string("")); + if (!storage.empty()) { + ssdOverrides["Storage"] = storage; + } + std::string tikvKeyPrefix = iniReader.GetParameter("Benchmark", "TiKVKeyPrefix", std::string("")); + if (!tikvKeyPrefix.empty()) { + ssdOverrides["TiKVKeyPrefix"] = tikvKeyPrefix; + } + if (appendThreadNum > 0) { + ssdOverrides["AppendThreadNum"] = std::to_string(appendThreadNum); + } + + // Pass through any [BuildSSDIndex] section params from the ini as overrides + auto buildSSDParams = iniReader.GetParameters("BuildSSDIndex"); + for (const auto &[key, val] : buildSSDParams) { + ssdOverrides[key] = val; + } + + // Read distributed config from [Distributed] section + auto distCfg = DistributedConfig::FromIni(iniReader); + + // Shared TiKV raft cluster: every compute node connects to the FULL PD + // endpoint list. The TiKV client uses PD-raft to route reads/writes to + // whichever store owns the region, so any compute can access any posting. + if (!distCfg.pdAddrs.empty()) { + ssdOverrides["TiKVPDAddresses"] = distCfg.pdAddrs; + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, + "Using PD address: %s (workerIndex=%d)\n", + distCfg.pdAddrs.c_str(), distCfg.workerIndex); + } + + // Pass through [SelectHead] and [BuildHead] params as overrides too + auto selectHeadParams = iniReader.GetParameters("SelectHead"); + for (const auto &[key, val] : selectHeadParams) { + ssdOverrides["SelectHead." + key] = val; + } + auto buildHeadParams = iniReader.GetParameters("BuildHead"); + for (const auto &[key, val] : buildHeadParams) { + ssdOverrides["BuildHead." + key] = val; + } + BOOST_TEST_MESSAGE("=== Benchmark Configuration ==="); BOOST_TEST_MESSAGE("Vector Path: " << vectorPath); BOOST_TEST_MESSAGE("Query Path: " << queryPath); @@ -2276,31 +2747,216 @@ BOOST_AUTO_TEST_CASE(BenchmarkFromConfig) BOOST_TEST_MESSAGE("QuantizedDim: " << quantizedDim); } + // Worker node path: if distributed and workerIndex > 0, run as remote worker and return + if (distCfg.enabled && distCfg.workerIndex > 0) { + int workerTimeout = iniReader.GetParameter("Benchmark", "WorkerTimeout", 3600); + BOOST_TEST_MESSAGE("Running as worker node " << distCfg.workerIndex); + if (valueType == VectorValueType::Float) + RunWorker(indexPath, dimension, baseVectorCount, insertVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numQueries, valueType, ssdOverrides, distCfg, workerTimeout); + else if (valueType == VectorValueType::Int8) + RunWorker(indexPath, dimension, baseVectorCount, insertVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numQueries, valueType, ssdOverrides, distCfg, workerTimeout); + else if (valueType == VectorValueType::UInt8) + RunWorker(indexPath, dimension, baseVectorCount, insertVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numQueries, valueType, ssdOverrides, distCfg, workerTimeout); + return; + } + // Get output file path from environment variable or use default const char *outputPath = std::getenv("BENCHMARK_OUTPUT"); std::string outputFile = outputPath ? std::string(outputPath) : "output.json"; BOOST_TEST_MESSAGE("Output File: " << outputFile); - // Dispatch to appropriate type + // Driver path (nodeIndex == 0 or single-node mode) if (valueType == VectorValueType::Float) { RunBenchmark(vectorPath, queryPath, truthPath, distMethod, indexPath, dimension, baseVectorCount, - insertVectorCount, deleteVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numSearchDuringInsertThreads, numQueries, iniReader, - outputFile, rebuild, resume, quantizerFilePath, quantizedDim, layers); + insertVectorCount, deleteVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numSearchDuringInsertThreads, numQueries, outputFile, + rebuild, resume, quantizerFilePath, quantizedDim, layers, ssdOverrides, rebuildSsdOnly, buildOnly, distCfg); } else if (valueType == VectorValueType::Int8) { RunBenchmark(vectorPath, queryPath, truthPath, distMethod, indexPath, dimension, baseVectorCount, - insertVectorCount, deleteVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numSearchDuringInsertThreads, numQueries, iniReader, - outputFile, rebuild, resume, quantizerFilePath, quantizedDim, layers); + insertVectorCount, deleteVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numSearchDuringInsertThreads, numQueries, + outputFile, rebuild, resume, quantizerFilePath, quantizedDim, layers, ssdOverrides, rebuildSsdOnly, buildOnly, distCfg); } else if (valueType == VectorValueType::UInt8) { RunBenchmark(vectorPath, queryPath, truthPath, distMethod, indexPath, dimension, baseVectorCount, - insertVectorCount, deleteVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numSearchDuringInsertThreads, numQueries, iniReader, - outputFile, rebuild, resume, quantizerFilePath, quantizedDim, layers); + insertVectorCount, deleteVectorCount, batchNum, topK, numSearchThreads, numInsertThreads, numSearchDuringInsertThreads, numQueries, + outputFile, rebuild, resume, quantizerFilePath, quantizedDim, layers, ssdOverrides, rebuildSsdOnly, buildOnly, distCfg); + } +} + +/// Worker node path for distributed benchmark (nodeIndex > 0). +/// Loads a pre-built head index, connects to TiKV, starts WorkerNode, +/// and waits for TCP dispatch commands from the driver node. +template +void RunWorker(const std::string& indexPath, int dimension, int baseVectorCount, + int insertVectorCount, int batches, int topK, int numSearchThreads, + int numInsertThreads, int numQueries, VectorValueType valueType, + const std::map& ssdOverrides, + const DistributedConfig& distCfg, int workerTimeout) +{ + int oldN = N, oldM = M, oldK = K, oldQ = queries; + N = baseVectorCount; M = dimension; K = topK; queries = numQueries; + + int nodeIndex = distCfg.workerIndex; + int numNodes = distCfg.GetNumWorkers(); + int insertBatchSize = insertVectorCount / std::max(batches, 1); + int myInsertStart = (numNodes > 1) ? (nodeIndex * insertBatchSize) / numNodes : 0; + int myInsertEnd = (numNodes > 1) ? ((nodeIndex + 1) * insertBatchSize) / numNodes : insertBatchSize; + int perNodeBatch = myInsertEnd - myInsertStart; + + BOOST_TEST_MESSAGE("Worker node " << nodeIndex << ": Loading index from " << indexPath); + std::shared_ptr index; + // IMPORTANT: Pass ssdOverrides through LoadIndex so that worker-specific settings + // (especially TiKVPDAddresses pointing at this worker's local PD) are applied + // BEFORE the underlying TiKV connection is constructed in PrepareDB. Without this, + // the worker would inherit the driver's PD address from the saved indexloader.ini + // and route every KV write back to the driver's TiKV instead of its own. + BOOST_REQUIRE(VectorIndex::LoadIndex(indexPath, ssdOverrides, index) == ErrorCode::Success); + BOOST_REQUIRE(index != nullptr); + + // Create WorkerNode + auto dispAddr = distCfg.GetDispatcherAddr(); + auto workerAddrs = ParseNodeAddrs(distCfg.workerAddrs); + auto storeAddrs = Helper::StrUtils::SplitString(distCfg.storeAddrs, ","); + + auto* spannIndex = dynamic_cast*>(index.get()); + BOOST_REQUIRE_MESSAGE(spannIndex != nullptr, "Failed to cast to SPANN::Index"); + auto diskIndex = spannIndex->GetDiskIndex(0); + BOOST_REQUIRE(diskIndex != nullptr); + auto* searcher = dynamic_cast*>(diskIndex.get()); + BOOST_REQUIRE(searcher != nullptr); + auto workerDb = searcher->GetDB(); + BOOST_REQUIRE_MESSAGE(workerDb != nullptr, "Worker: could not extract db from index"); + + SPANN::WorkerNode workerNode; + BOOST_REQUIRE_MESSAGE(workerNode.Initialize(workerDb, nodeIndex, dispAddr, workerAddrs, storeAddrs), + "WorkerNode initialization failed"); + BOOST_REQUIRE(workerNode.Start()); + auto* router = &workerNode; + + // Bind worker to ALL searcher layers (every layer must see the worker so + // AddIDCapacity grows each layer's version map by capa * numNodes). + BindWorkerToAllLayers(router, spannIndex); + + // Wait for ring from dispatcher + BOOST_REQUIRE_MESSAGE(router->WaitForRing(120), + "Worker: Timed out waiting for ring from dispatcher"); + + BOOST_TEST_MESSAGE("Worker " << nodeIndex << ": Ready, numNodes=" << numNodes + << " perNodeBatch=" << perNodeBatch); + + // Build data file names + std::string typeStr = Helper::Convert::ConvertToString(valueType); + std::string paddset = "perftest_addvector.bin." + typeStr + "_" + std::to_string(insertVectorCount) + "_" + std::to_string(dimension); + std::string paddmeta = "perftest_addmeta.bin." + std::to_string(baseVectorCount) + "_" + std::to_string(insertVectorCount); + std::string paddmetaidx = "perftest_addmetaidx.bin." + std::to_string(baseVectorCount) + "_" + std::to_string(insertVectorCount); + + // Load query set + int searchK = topK; + std::string pqueryset = "perftest_query.bin." + typeStr + "_" + std::to_string(numQueries) + "_" + std::to_string(dimension); + auto queryset = TestUtils::TestDataGenerator::LoadVectorSet(pqueryset, dimension); + BOOST_REQUIRE_MESSAGE(queryset != nullptr, "Worker: Failed to load query set from " << pqueryset); + + // Register dispatch callback + std::promise stopPromise; + auto stopFuture = stopPromise.get_future(); + std::once_flag stopOnce; + + router->SetDispatchCallback([&](const SPANN::DispatchCommand& cmd) -> SPANN::DispatchResult { + SPANN::DispatchResult result; + result.m_dispatchId = cmd.m_dispatchId; + result.m_round = cmd.m_round; + + if (cmd.m_type == SPANN::DispatchCommand::Type::Stop) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Worker %d: Stop command received\n", nodeIndex); + std::call_once(stopOnce, [&]() { stopPromise.set_value(); }); + result.m_status = SPANN::DispatchResult::Status::Success; + return result; + } + + if (cmd.m_type == SPANN::DispatchCommand::Type::Heartbeat) { + // Driver sends a Heartbeat every HeartbeatIntervalSec; the result + // is dropped by DispatchCoordinator. Acknowledge silently so we + // don't log noise every 30s during the insert phase. + result.m_status = SPANN::DispatchResult::Status::Success; + return result; + } + + if (cmd.m_type == SPANN::DispatchCommand::Type::Search) { + int myStart = (int)((long long)nodeIndex * numQueries / numNodes); + int myEnd = (int)((long long)(nodeIndex + 1) * numQueries / numNodes); + int myCount = myEnd - myStart; + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Worker %d: Search round %u - %d queries [%d, %d)\n", + nodeIndex, cmd.m_round, myCount, myStart, myEnd); + + std::vector results; + double wallTime = ExecutePartitionedSearch( + index.get(), queryset, myStart, myCount, searchK, + std::min(numSearchThreads, myCount), + results, /*latenciesOut=*/nullptr, /*statsOut=*/nullptr); + + // Drain merge hints accumulated during this search round. + // Search-side AsyncMergeInSearch on remote-owned heads enqueues + // notifications via QueueRemoteMerge; auto-flush only fires when + // a per-target bucket reaches kMergeAutoFlushThreshold, so the + // tail of every round (and any sparse rounds) needs an explicit + // drain to guarantee no hint is dropped. + router->FlushRemoteMerges(); + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Worker %d: Search round %u done - %.1fms\n", + nodeIndex, cmd.m_round, wallTime * 1000); + result.m_status = SPANN::DispatchResult::Status::Success; + result.m_wallTime = wallTime; + return result; + } + + if (cmd.m_type == SPANN::DispatchCommand::Type::Insert) { + int insertStart = cmd.m_round * insertBatchSize + myInsertStart; + int loadCount = perNodeBatch; + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Worker %d: Batch %u - inserting %d vectors (offset %d)\n", + nodeIndex, cmd.m_round + 1, perNodeBatch, insertStart); + + auto t1 = std::chrono::high_resolution_clock::now(); + std::string workerTag = + "Worker " + std::to_string(nodeIndex) + " batch=" + std::to_string(cmd.m_round + 1); + LoadAndInsertBatch(spannIndex, paddset, paddmeta, paddmetaidx, dimension, + insertStart, loadCount, perNodeBatch, + numInsertThreads, router, + /*quantizer=*/nullptr, + /*searchDuringInsertThreads=*/0, + /*queryset=*/nullptr, + /*numQueries=*/0, /*searchK=*/5, + /*benchmarkData=*/nullptr, + workerTag.c_str()); + auto t2 = std::chrono::high_resolution_clock::now(); + double secs = std::chrono::duration_cast(t2 - t1).count() / 1000000.0; + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Worker %d: Batch %u done - %d vectors in %.2f s (%.1f vec/s)\n", + nodeIndex, cmd.m_round + 1, perNodeBatch, secs, perNodeBatch / secs); + + result.m_status = SPANN::DispatchResult::Status::Success; + result.m_wallTime = secs; + return result; + } + + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "Worker %d: Unknown command type %d\n", + nodeIndex, (int)cmd.m_type); + result.m_status = SPANN::DispatchResult::Status::Failed; + result.m_errorCode = static_cast(SPTAG::ErrorCode::Undefined); + return result; + }); + + SPTAGLIB_LOG(Helper::LogLevel::LL_Info, "Worker %d: Waiting for dispatch commands\n", nodeIndex); + + auto status = stopFuture.wait_for(std::chrono::seconds(workerTimeout)); + if (status == std::future_status::timeout) { + SPTAGLIB_LOG(Helper::LogLevel::LL_Warning, "Worker %d: Timeout after %ds\n", nodeIndex, workerTimeout); } - //std::filesystem::remove_all(indexPath); + router->ClearDispatchCallback(); + N = oldN; M = oldM; K = oldK; queries = oldQ; + BOOST_TEST_MESSAGE("Worker " << nodeIndex << ": Shutting down"); } BOOST_AUTO_TEST_SUITE_END() diff --git a/Test/src/TestDataGenerator.cpp b/Test/src/TestDataGenerator.cpp index cb3318548..c32f19e0a 100644 --- a/Test/src/TestDataGenerator.cpp +++ b/Test/src/TestDataGenerator.cpp @@ -274,7 +274,8 @@ void TestDataGenerator::GenerateBatchTruth(const std::string &filename, std:: } template -float TestDataGenerator::EvaluateRecall(const std::vector &res, std::shared_ptr &truth, int recallK, int k, int batch, int totalbatches) +float TestDataGenerator::EvaluateRecall(const std::vector &res, std::shared_ptr &truth, int recallK, int k, int batch, int totalbatches, + int totalQueries, int queryOffset) { if (!truth) { @@ -285,14 +286,17 @@ float TestDataGenerator::EvaluateRecall(const std::vector recallK = min(recallK, static_cast(truth->Dimension())); float totalRecall = 0.0f; float eps = 1e-4f; - SizeType distbase = truth->Count() - (totalbatches + 1) * res.size(); + // Use global queryCount when caller provides it (distributed path); otherwise + // assume single-node where res.size() IS the global query count. + SizeType queryCount = (totalQueries > 0) ? static_cast(totalQueries) : static_cast(res.size()); + SizeType distbase = truth->Count() - (totalbatches + 1) * queryCount; for (SizeType i = 0; i < res.size(); ++i) { - const SizeType *truthNN = reinterpret_cast(truth->GetData()) + batch * res.size() + i; + const SizeType *truthNN = reinterpret_cast(truth->GetVector(batch * queryCount + queryOffset + i)); float *truthD = nullptr; if (truth->Count() > distbase) { - truthD = reinterpret_cast(truth->GetVector(distbase + batch * res.size() + i)); + truthD = reinterpret_cast(truth->GetVector(distbase + batch * queryCount + queryOffset + i)); } for (int j = 0; j < recallK; ++j) { diff --git a/ThirdParty/kvproto/.gitignore b/ThirdParty/kvproto/.gitignore new file mode 100644 index 000000000..b2dab26f7 --- /dev/null +++ b/ThirdParty/kvproto/.gitignore @@ -0,0 +1,4 @@ +# Generated C++ stubs are environment-specific (protoc/grpc versions must +# match the gRPC libs in the build env). Each developer should regenerate +# locally via generate_cpp.sh instead of consuming the committed snapshot. +generated/ diff --git a/ThirdParty/kvproto/generated/kvproto/errorpb.pb.cc b/ThirdParty/kvproto/generated/kvproto/errorpb.pb.cc index 6cf407047..118f4c847 100644 --- a/ThirdParty/kvproto/generated/kvproto/errorpb.pb.cc +++ b/ThirdParty/kvproto/generated/kvproto/errorpb.pb.cc @@ -4,507 +4,632 @@ #include "errorpb.pb.h" #include - -#include -#include -#include -#include -#include -#include -#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) -#include +// Must be included last. +#include "google/protobuf/port_def.inc" PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace errorpb { -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; +inline constexpr StoreNotMatch::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : request_store_id_{::uint64_t{0u}}, + actual_store_id_{::uint64_t{0u}}, + _cached_size_{0} {} -namespace errorpb { -PROTOBUF_CONSTEXPR NotLeader::NotLeader( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.leader_)*/nullptr - , /*decltype(_impl_.region_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct NotLeaderDefaultTypeInternal { - PROTOBUF_CONSTEXPR NotLeaderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~NotLeaderDefaultTypeInternal() {} - union { - NotLeader _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NotLeaderDefaultTypeInternal _NotLeader_default_instance_; -PROTOBUF_CONSTEXPR StoreNotMatch::StoreNotMatch( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.request_store_id_)*/uint64_t{0u} - , /*decltype(_impl_.actual_store_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} +template +PROTOBUF_CONSTEXPR StoreNotMatch::StoreNotMatch(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct StoreNotMatchDefaultTypeInternal { - PROTOBUF_CONSTEXPR StoreNotMatchDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR StoreNotMatchDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~StoreNotMatchDefaultTypeInternal() {} union { StoreNotMatch _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StoreNotMatchDefaultTypeInternal _StoreNotMatch_default_instance_; -PROTOBUF_CONSTEXPR RegionNotFound::RegionNotFound( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.region_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RegionNotFoundDefaultTypeInternal { - PROTOBUF_CONSTEXPR RegionNotFoundDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RegionNotFoundDefaultTypeInternal() {} - union { - RegionNotFound _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionNotFoundDefaultTypeInternal _RegionNotFound_default_instance_; -PROTOBUF_CONSTEXPR KeyNotInRegion::KeyNotInRegion( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.start_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.end_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct KeyNotInRegionDefaultTypeInternal { - PROTOBUF_CONSTEXPR KeyNotInRegionDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~KeyNotInRegionDefaultTypeInternal() {} - union { - KeyNotInRegion _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyNotInRegionDefaultTypeInternal _KeyNotInRegion_default_instance_; -PROTOBUF_CONSTEXPR EpochNotMatch::EpochNotMatch( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.current_regions_)*/{} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct EpochNotMatchDefaultTypeInternal { - PROTOBUF_CONSTEXPR EpochNotMatchDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~EpochNotMatchDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StoreNotMatchDefaultTypeInternal _StoreNotMatch_default_instance_; + template +PROTOBUF_CONSTEXPR StaleCommand::StaleCommand(::_pbi::ConstantInitialized) {} +struct StaleCommandDefaultTypeInternal { + PROTOBUF_CONSTEXPR StaleCommandDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~StaleCommandDefaultTypeInternal() {} union { - EpochNotMatch _instance; + StaleCommand _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EpochNotMatchDefaultTypeInternal _EpochNotMatch_default_instance_; -PROTOBUF_CONSTEXPR ServerIsBusy::ServerIsBusy( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.reason_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.backoff_ms_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StaleCommandDefaultTypeInternal _StaleCommand_default_instance_; + +inline constexpr ServerIsBusy::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : reason_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + backoff_ms_{::uint64_t{0u}}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR ServerIsBusy::ServerIsBusy(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct ServerIsBusyDefaultTypeInternal { - PROTOBUF_CONSTEXPR ServerIsBusyDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR ServerIsBusyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ServerIsBusyDefaultTypeInternal() {} union { ServerIsBusy _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServerIsBusyDefaultTypeInternal _ServerIsBusy_default_instance_; -PROTOBUF_CONSTEXPR StaleCommand::StaleCommand( - ::_pbi::ConstantInitialized) {} -struct StaleCommandDefaultTypeInternal { - PROTOBUF_CONSTEXPR StaleCommandDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~StaleCommandDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ServerIsBusyDefaultTypeInternal _ServerIsBusy_default_instance_; + +inline constexpr RegionNotFound::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : region_id_{::uint64_t{0u}}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR RegionNotFound::RegionNotFound(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RegionNotFoundDefaultTypeInternal { + PROTOBUF_CONSTEXPR RegionNotFoundDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RegionNotFoundDefaultTypeInternal() {} union { - StaleCommand _instance; + RegionNotFound _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StaleCommandDefaultTypeInternal _StaleCommand_default_instance_; -PROTOBUF_CONSTEXPR RaftEntryTooLarge::RaftEntryTooLarge( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.region_id_)*/uint64_t{0u} - , /*decltype(_impl_.entry_size_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionNotFoundDefaultTypeInternal _RegionNotFound_default_instance_; + +inline constexpr RaftEntryTooLarge::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : region_id_{::uint64_t{0u}}, + entry_size_{::uint64_t{0u}}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR RaftEntryTooLarge::RaftEntryTooLarge(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct RaftEntryTooLargeDefaultTypeInternal { - PROTOBUF_CONSTEXPR RaftEntryTooLargeDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR RaftEntryTooLargeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RaftEntryTooLargeDefaultTypeInternal() {} union { RaftEntryTooLarge _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RaftEntryTooLargeDefaultTypeInternal _RaftEntryTooLarge_default_instance_; -PROTOBUF_CONSTEXPR Error::Error( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.not_leader_)*/nullptr - , /*decltype(_impl_.region_not_found_)*/nullptr - , /*decltype(_impl_.key_not_in_region_)*/nullptr - , /*decltype(_impl_.epoch_not_match_)*/nullptr - , /*decltype(_impl_.server_is_busy_)*/nullptr - , /*decltype(_impl_.stale_command_)*/nullptr - , /*decltype(_impl_.store_not_match_)*/nullptr - , /*decltype(_impl_.raft_entry_too_large_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RaftEntryTooLargeDefaultTypeInternal _RaftEntryTooLarge_default_instance_; + +inline constexpr KeyNotInRegion::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + start_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + end_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_id_{::uint64_t{0u}}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR KeyNotInRegion::KeyNotInRegion(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct KeyNotInRegionDefaultTypeInternal { + PROTOBUF_CONSTEXPR KeyNotInRegionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~KeyNotInRegionDefaultTypeInternal() {} + union { + KeyNotInRegion _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyNotInRegionDefaultTypeInternal _KeyNotInRegion_default_instance_; + +inline constexpr NotLeader::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + leader_{nullptr}, + region_id_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR NotLeader::NotLeader(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct NotLeaderDefaultTypeInternal { + PROTOBUF_CONSTEXPR NotLeaderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~NotLeaderDefaultTypeInternal() {} + union { + NotLeader _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NotLeaderDefaultTypeInternal _NotLeader_default_instance_; + +inline constexpr EpochNotMatch::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : current_regions_{}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR EpochNotMatch::EpochNotMatch(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct EpochNotMatchDefaultTypeInternal { + PROTOBUF_CONSTEXPR EpochNotMatchDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~EpochNotMatchDefaultTypeInternal() {} + union { + EpochNotMatch _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EpochNotMatchDefaultTypeInternal _EpochNotMatch_default_instance_; + +inline constexpr Error::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + message_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + not_leader_{nullptr}, + region_not_found_{nullptr}, + key_not_in_region_{nullptr}, + epoch_not_match_{nullptr}, + server_is_busy_{nullptr}, + stale_command_{nullptr}, + store_not_match_{nullptr}, + raft_entry_too_large_{nullptr} {} + +template +PROTOBUF_CONSTEXPR Error::Error(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct ErrorDefaultTypeInternal { - PROTOBUF_CONSTEXPR ErrorDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ErrorDefaultTypeInternal() {} union { Error _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ErrorDefaultTypeInternal _Error_default_instance_; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ErrorDefaultTypeInternal _Error_default_instance_; } // namespace errorpb static ::_pb::Metadata file_level_metadata_errorpb_2eproto[9]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_errorpb_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_errorpb_2eproto = nullptr; - -const uint32_t TableStruct_errorpb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::NotLeader, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::NotLeader, _impl_.region_id_), - PROTOBUF_FIELD_OFFSET(::errorpb::NotLeader, _impl_.leader_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::StoreNotMatch, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::StoreNotMatch, _impl_.request_store_id_), - PROTOBUF_FIELD_OFFSET(::errorpb::StoreNotMatch, _impl_.actual_store_id_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::RegionNotFound, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::RegionNotFound, _impl_.region_id_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.region_id_), - PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.start_key_), - PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.end_key_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::EpochNotMatch, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::EpochNotMatch, _impl_.current_regions_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::ServerIsBusy, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::ServerIsBusy, _impl_.reason_), - PROTOBUF_FIELD_OFFSET(::errorpb::ServerIsBusy, _impl_.backoff_ms_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::StaleCommand, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::RaftEntryTooLarge, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::RaftEntryTooLarge, _impl_.region_id_), - PROTOBUF_FIELD_OFFSET(::errorpb::RaftEntryTooLarge, _impl_.entry_size_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.message_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.not_leader_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.region_not_found_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.key_not_in_region_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.epoch_not_match_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.server_is_busy_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.stale_command_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.store_not_match_), - PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.raft_entry_too_large_), +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_errorpb_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_errorpb_2eproto = nullptr; +const ::uint32_t TableStruct_errorpb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( + protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::errorpb::NotLeader, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::errorpb::NotLeader, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::NotLeader, _impl_.region_id_), + PROTOBUF_FIELD_OFFSET(::errorpb::NotLeader, _impl_.leader_), + ~0u, + 0, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::errorpb::StoreNotMatch, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::StoreNotMatch, _impl_.request_store_id_), + PROTOBUF_FIELD_OFFSET(::errorpb::StoreNotMatch, _impl_.actual_store_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::errorpb::RegionNotFound, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::RegionNotFound, _impl_.region_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.region_id_), + PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.start_key_), + PROTOBUF_FIELD_OFFSET(::errorpb::KeyNotInRegion, _impl_.end_key_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::errorpb::EpochNotMatch, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::EpochNotMatch, _impl_.current_regions_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::errorpb::ServerIsBusy, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::ServerIsBusy, _impl_.reason_), + PROTOBUF_FIELD_OFFSET(::errorpb::ServerIsBusy, _impl_.backoff_ms_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::errorpb::StaleCommand, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::errorpb::RaftEntryTooLarge, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::RaftEntryTooLarge, _impl_.region_id_), + PROTOBUF_FIELD_OFFSET(::errorpb::RaftEntryTooLarge, _impl_.entry_size_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.message_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.not_leader_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.region_not_found_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.key_not_in_region_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.epoch_not_match_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.server_is_busy_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.stale_command_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.store_not_match_), + PROTOBUF_FIELD_OFFSET(::errorpb::Error, _impl_.raft_entry_too_large_), + ~0u, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, }; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::errorpb::NotLeader)}, - { 8, -1, -1, sizeof(::errorpb::StoreNotMatch)}, - { 16, -1, -1, sizeof(::errorpb::RegionNotFound)}, - { 23, -1, -1, sizeof(::errorpb::KeyNotInRegion)}, - { 33, -1, -1, sizeof(::errorpb::EpochNotMatch)}, - { 40, -1, -1, sizeof(::errorpb::ServerIsBusy)}, - { 48, -1, -1, sizeof(::errorpb::StaleCommand)}, - { 54, -1, -1, sizeof(::errorpb::RaftEntryTooLarge)}, - { 62, -1, -1, sizeof(::errorpb::Error)}, + +static const ::_pbi::MigrationSchema + schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + {0, 10, -1, sizeof(::errorpb::NotLeader)}, + {12, -1, -1, sizeof(::errorpb::StoreNotMatch)}, + {22, -1, -1, sizeof(::errorpb::RegionNotFound)}, + {31, -1, -1, sizeof(::errorpb::KeyNotInRegion)}, + {43, -1, -1, sizeof(::errorpb::EpochNotMatch)}, + {52, -1, -1, sizeof(::errorpb::ServerIsBusy)}, + {62, -1, -1, sizeof(::errorpb::StaleCommand)}, + {70, -1, -1, sizeof(::errorpb::RaftEntryTooLarge)}, + {80, 97, -1, sizeof(::errorpb::Error)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::errorpb::_NotLeader_default_instance_._instance, - &::errorpb::_StoreNotMatch_default_instance_._instance, - &::errorpb::_RegionNotFound_default_instance_._instance, - &::errorpb::_KeyNotInRegion_default_instance_._instance, - &::errorpb::_EpochNotMatch_default_instance_._instance, - &::errorpb::_ServerIsBusy_default_instance_._instance, - &::errorpb::_StaleCommand_default_instance_._instance, - &::errorpb::_RaftEntryTooLarge_default_instance_._instance, - &::errorpb::_Error_default_instance_._instance, + &::errorpb::_NotLeader_default_instance_._instance, + &::errorpb::_StoreNotMatch_default_instance_._instance, + &::errorpb::_RegionNotFound_default_instance_._instance, + &::errorpb::_KeyNotInRegion_default_instance_._instance, + &::errorpb::_EpochNotMatch_default_instance_._instance, + &::errorpb::_ServerIsBusy_default_instance_._instance, + &::errorpb::_StaleCommand_default_instance_._instance, + &::errorpb::_RaftEntryTooLarge_default_instance_._instance, + &::errorpb::_Error_default_instance_._instance, }; - -const char descriptor_table_protodef_errorpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\rerrorpb.proto\022\007errorpb\032\014metapb.proto\"<" - "\n\tNotLeader\022\021\n\tregion_id\030\001 \001(\004\022\034\n\006leader" - "\030\002 \001(\0132\014.metapb.Peer\"B\n\rStoreNotMatch\022\030\n" - "\020request_store_id\030\001 \001(\004\022\027\n\017actual_store_" - "id\030\002 \001(\004\"#\n\016RegionNotFound\022\021\n\tregion_id\030" - "\001 \001(\004\"T\n\016KeyNotInRegion\022\013\n\003key\030\001 \001(\014\022\021\n\t" - "region_id\030\002 \001(\004\022\021\n\tstart_key\030\003 \001(\014\022\017\n\007en" - "d_key\030\004 \001(\014\"8\n\rEpochNotMatch\022\'\n\017current_" - "regions\030\001 \003(\0132\016.metapb.Region\"2\n\014ServerI" - "sBusy\022\016\n\006reason\030\001 \001(\t\022\022\n\nbackoff_ms\030\002 \001(" - "\004\"\016\n\014StaleCommand\":\n\021RaftEntryTooLarge\022\021" - "\n\tregion_id\030\001 \001(\004\022\022\n\nentry_size\030\002 \001(\004\"\240\003" - "\n\005Error\022\017\n\007message\030\001 \001(\t\022&\n\nnot_leader\030\002" - " \001(\0132\022.errorpb.NotLeader\0221\n\020region_not_f" - "ound\030\003 \001(\0132\027.errorpb.RegionNotFound\0222\n\021k" - "ey_not_in_region\030\004 \001(\0132\027.errorpb.KeyNotI" - "nRegion\022/\n\017epoch_not_match\030\005 \001(\0132\026.error" - "pb.EpochNotMatch\022-\n\016server_is_busy\030\006 \001(\013" - "2\025.errorpb.ServerIsBusy\022,\n\rstale_command" - "\030\007 \001(\0132\025.errorpb.StaleCommand\022/\n\017store_n" - "ot_match\030\010 \001(\0132\026.errorpb.StoreNotMatch\0228" - "\n\024raft_entry_too_large\030\t \001(\0132\032.errorpb.R" - "aftEntryTooLargeB\022\n\020org.tikv.kvprotob\006pr" - "oto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_errorpb_2eproto_deps[1] = { - &::descriptor_table_metapb_2eproto, +const char descriptor_table_protodef_errorpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + "\n\rerrorpb.proto\022\007errorpb\032\014metapb.proto\"<" + "\n\tNotLeader\022\021\n\tregion_id\030\001 \001(\004\022\034\n\006leader" + "\030\002 \001(\0132\014.metapb.Peer\"B\n\rStoreNotMatch\022\030\n" + "\020request_store_id\030\001 \001(\004\022\027\n\017actual_store_" + "id\030\002 \001(\004\"#\n\016RegionNotFound\022\021\n\tregion_id\030" + "\001 \001(\004\"T\n\016KeyNotInRegion\022\013\n\003key\030\001 \001(\014\022\021\n\t" + "region_id\030\002 \001(\004\022\021\n\tstart_key\030\003 \001(\014\022\017\n\007en" + "d_key\030\004 \001(\014\"8\n\rEpochNotMatch\022\'\n\017current_" + "regions\030\001 \003(\0132\016.metapb.Region\"2\n\014ServerI" + "sBusy\022\016\n\006reason\030\001 \001(\t\022\022\n\nbackoff_ms\030\002 \001(" + "\004\"\016\n\014StaleCommand\":\n\021RaftEntryTooLarge\022\021" + "\n\tregion_id\030\001 \001(\004\022\022\n\nentry_size\030\002 \001(\004\"\240\003" + "\n\005Error\022\017\n\007message\030\001 \001(\t\022&\n\nnot_leader\030\002" + " \001(\0132\022.errorpb.NotLeader\0221\n\020region_not_f" + "ound\030\003 \001(\0132\027.errorpb.RegionNotFound\0222\n\021k" + "ey_not_in_region\030\004 \001(\0132\027.errorpb.KeyNotI" + "nRegion\022/\n\017epoch_not_match\030\005 \001(\0132\026.error" + "pb.EpochNotMatch\022-\n\016server_is_busy\030\006 \001(\013" + "2\025.errorpb.ServerIsBusy\022,\n\rstale_command" + "\030\007 \001(\0132\025.errorpb.StaleCommand\022/\n\017store_n" + "ot_match\030\010 \001(\0132\026.errorpb.StoreNotMatch\0228" + "\n\024raft_entry_too_large\030\t \001(\0132\032.errorpb.R" + "aftEntryTooLargeB\022\n\020org.tikv.kvprotob\006pr" + "oto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_errorpb_2eproto_deps[1] = + { + &::descriptor_table_metapb_2eproto, }; -static ::_pbi::once_flag descriptor_table_errorpb_2eproto_once; +static ::absl::once_flag descriptor_table_errorpb_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_errorpb_2eproto = { - false, false, 924, descriptor_table_protodef_errorpb_2eproto, + false, + false, + 924, + descriptor_table_protodef_errorpb_2eproto, "errorpb.proto", - &descriptor_table_errorpb_2eproto_once, descriptor_table_errorpb_2eproto_deps, 1, 9, - schemas, file_default_instances, TableStruct_errorpb_2eproto::offsets, - file_level_metadata_errorpb_2eproto, file_level_enum_descriptors_errorpb_2eproto, + &descriptor_table_errorpb_2eproto_once, + descriptor_table_errorpb_2eproto_deps, + 1, + 9, + schemas, + file_default_instances, + TableStruct_errorpb_2eproto::offsets, + file_level_metadata_errorpb_2eproto, + file_level_enum_descriptors_errorpb_2eproto, file_level_service_descriptors_errorpb_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_errorpb_2eproto_getter() { return &descriptor_table_errorpb_2eproto; } - // Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_errorpb_2eproto(&descriptor_table_errorpb_2eproto); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_errorpb_2eproto(&descriptor_table_errorpb_2eproto); namespace errorpb { - // =================================================================== class NotLeader::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(NotLeader, _impl_._has_bits_); static const ::metapb::Peer& leader(const NotLeader* msg); + static void set_has_leader(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::metapb::Peer& -NotLeader::_Internal::leader(const NotLeader* msg) { +const ::metapb::Peer& NotLeader::_Internal::leader(const NotLeader* msg) { return *msg->_impl_.leader_; } void NotLeader::clear_leader() { - if (GetArenaForAllocation() == nullptr && _impl_.leader_ != nullptr) { - delete _impl_.leader_; - } - _impl_.leader_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.leader_ != nullptr) _impl_.leader_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -NotLeader::NotLeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +NotLeader::NotLeader(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.NotLeader) } -NotLeader::NotLeader(const NotLeader& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - NotLeader* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.leader_){nullptr} - , decltype(_impl_.region_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE NotLeader::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +NotLeader::NotLeader( + ::google::protobuf::Arena* arena, + const NotLeader& from) + : ::google::protobuf::Message(arena) { + NotLeader* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.leader_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::metapb::Peer>(arena, *from._impl_.leader_) + : nullptr; + _impl_.region_id_ = from._impl_.region_id_; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_leader()) { - _this->_impl_.leader_ = new ::metapb::Peer(*from._impl_.leader_); - } - _this->_impl_.region_id_ = from._impl_.region_id_; // @@protoc_insertion_point(copy_constructor:errorpb.NotLeader) } +inline PROTOBUF_NDEBUG_INLINE NotLeader::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} -inline void NotLeader::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.leader_){nullptr} - , decltype(_impl_.region_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void NotLeader::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, leader_), + 0, + offsetof(Impl_, region_id_) - + offsetof(Impl_, leader_) + + sizeof(Impl_::region_id_)); } - NotLeader::~NotLeader() { // @@protoc_insertion_point(destructor:errorpb.NotLeader) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void NotLeader::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.leader_; -} - -void NotLeader::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.leader_; + _impl_.~Impl_(); } -void NotLeader::Clear() { +PROTOBUF_NOINLINE void NotLeader::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.NotLeader) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - if (GetArenaForAllocation() == nullptr && _impl_.leader_ != nullptr) { - delete _impl_.leader_; - } - _impl_.leader_ = nullptr; - _impl_.region_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* NotLeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 region_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.Peer leader = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_leader(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.leader_ != nullptr); + _impl_.leader_->Clear(); + } + _impl_.region_id_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* NotLeader::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* NotLeader::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> NotLeader::_table_ = { + { + PROTOBUF_FIELD_OFFSET(NotLeader, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_NotLeader_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .metapb.Peer leader = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(NotLeader, _impl_.leader_)}}, + // uint64 region_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(NotLeader, _impl_.region_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(NotLeader, _impl_.region_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 region_id = 1; + {PROTOBUF_FIELD_OFFSET(NotLeader, _impl_.region_id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .metapb.Peer leader = 2; + {PROTOBUF_FIELD_OFFSET(NotLeader, _impl_.leader_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::metapb::Peer>()}, + }}, {{ + }}, +}; + +::uint8_t* NotLeader::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.NotLeader) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 region_id = 1; if (this->_internal_region_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_region_id(), target); } + cached_has_bits = _impl_._has_bits_[0]; // .metapb.Peer leader = 2; - if (this->_internal_has_leader()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::leader(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, _Internal::leader(this), _Internal::leader(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.NotLeader) return target; } -size_t NotLeader::ByteSizeLong() const { +::size_t NotLeader::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.NotLeader) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .metapb.Peer leader = 2; - if (this->_internal_has_leader()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.leader_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.leader_); } // uint64 region_id = 1; if (this->_internal_region_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_region_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NotLeader::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - NotLeader::MergeImpl +const ::google::protobuf::Message::ClassData NotLeader::_class_data_ = { + NotLeader::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NotLeader::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* NotLeader::GetClassData() const { + return &_class_data_; +} -void NotLeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void NotLeader::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.NotLeader) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_has_leader()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_leader()->::metapb::Peer::MergeFrom( from._internal_leader()); } if (from._internal_region_id() != 0) { _this->_internal_set_region_id(from._internal_region_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void NotLeader::CopyFrom(const NotLeader& from) { @@ -514,14 +639,18 @@ void NotLeader::CopyFrom(const NotLeader& from) { MergeFrom(from); } -bool NotLeader::IsInitialized() const { +PROTOBUF_NOINLINE bool NotLeader::IsInitialized() const { return true; } -void NotLeader::InternalSwap(NotLeader* other) { +::_pbi::CachedSize* NotLeader::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void NotLeader::InternalSwap(NotLeader* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(NotLeader, _impl_.region_id_) + sizeof(NotLeader::_impl_.region_id_) - PROTOBUF_FIELD_OFFSET(NotLeader, _impl_.leader_)>( @@ -529,184 +658,174 @@ void NotLeader::InternalSwap(NotLeader* other) { reinterpret_cast(&other->_impl_.leader_)); } -::PROTOBUF_NAMESPACE_ID::Metadata NotLeader::GetMetadata() const { +::google::protobuf::Metadata NotLeader::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[0]); } - // =================================================================== class StoreNotMatch::_Internal { public: }; -StoreNotMatch::StoreNotMatch(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +StoreNotMatch::StoreNotMatch(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.StoreNotMatch) } -StoreNotMatch::StoreNotMatch(const StoreNotMatch& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - StoreNotMatch* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.request_store_id_){} - , decltype(_impl_.actual_store_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.request_store_id_, &from._impl_.request_store_id_, - static_cast(reinterpret_cast(&_impl_.actual_store_id_) - - reinterpret_cast(&_impl_.request_store_id_)) + sizeof(_impl_.actual_store_id_)); - // @@protoc_insertion_point(copy_constructor:errorpb.StoreNotMatch) -} - -inline void StoreNotMatch::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.request_store_id_){uint64_t{0u}} - , decltype(_impl_.actual_store_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +StoreNotMatch::StoreNotMatch( + ::google::protobuf::Arena* arena, const StoreNotMatch& from) + : StoreNotMatch(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE StoreNotMatch::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} +inline void StoreNotMatch::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, request_store_id_), + 0, + offsetof(Impl_, actual_store_id_) - + offsetof(Impl_, request_store_id_) + + sizeof(Impl_::actual_store_id_)); +} StoreNotMatch::~StoreNotMatch() { // @@protoc_insertion_point(destructor:errorpb.StoreNotMatch) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void StoreNotMatch::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void StoreNotMatch::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void StoreNotMatch::Clear() { +PROTOBUF_NOINLINE void StoreNotMatch::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.StoreNotMatch) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.request_store_id_, 0, static_cast( + ::memset(&_impl_.request_store_id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.actual_store_id_) - reinterpret_cast(&_impl_.request_store_id_)) + sizeof(_impl_.actual_store_id_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* StoreNotMatch::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 request_store_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.request_store_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 actual_store_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.actual_store_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* StoreNotMatch::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* StoreNotMatch::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> StoreNotMatch::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_StoreNotMatch_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 actual_store_id = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(StoreNotMatch, _impl_.actual_store_id_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(StoreNotMatch, _impl_.actual_store_id_)}}, + // uint64 request_store_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(StoreNotMatch, _impl_.request_store_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(StoreNotMatch, _impl_.request_store_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 request_store_id = 1; + {PROTOBUF_FIELD_OFFSET(StoreNotMatch, _impl_.request_store_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 actual_store_id = 2; + {PROTOBUF_FIELD_OFFSET(StoreNotMatch, _impl_.actual_store_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* StoreNotMatch::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.StoreNotMatch) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 request_store_id = 1; if (this->_internal_request_store_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_request_store_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_request_store_id(), target); } // uint64 actual_store_id = 2; if (this->_internal_actual_store_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_actual_store_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_actual_store_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.StoreNotMatch) return target; } -size_t StoreNotMatch::ByteSizeLong() const { +::size_t StoreNotMatch::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.StoreNotMatch) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // uint64 request_store_id = 1; if (this->_internal_request_store_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_request_store_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_request_store_id()); } // uint64 actual_store_id = 2; if (this->_internal_actual_store_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_actual_store_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_actual_store_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StoreNotMatch::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - StoreNotMatch::MergeImpl +const ::google::protobuf::Message::ClassData StoreNotMatch::_class_data_ = { + StoreNotMatch::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StoreNotMatch::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* StoreNotMatch::GetClassData() const { + return &_class_data_; +} -void StoreNotMatch::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void StoreNotMatch::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.StoreNotMatch) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (from._internal_request_store_id() != 0) { @@ -715,7 +834,7 @@ void StoreNotMatch::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_actual_store_id() != 0) { _this->_internal_set_actual_store_id(from._internal_actual_store_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void StoreNotMatch::CopyFrom(const StoreNotMatch& from) { @@ -725,14 +844,17 @@ void StoreNotMatch::CopyFrom(const StoreNotMatch& from) { MergeFrom(from); } -bool StoreNotMatch::IsInitialized() const { +PROTOBUF_NOINLINE bool StoreNotMatch::IsInitialized() const { return true; } -void StoreNotMatch::InternalSwap(StoreNotMatch* other) { +::_pbi::CachedSize* StoreNotMatch::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void StoreNotMatch::InternalSwap(StoreNotMatch* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(StoreNotMatch, _impl_.actual_store_id_) + sizeof(StoreNotMatch::_impl_.actual_store_id_) - PROTOBUF_FIELD_OFFSET(StoreNotMatch, _impl_.request_store_id_)>( @@ -740,165 +862,154 @@ void StoreNotMatch::InternalSwap(StoreNotMatch* other) { reinterpret_cast(&other->_impl_.request_store_id_)); } -::PROTOBUF_NAMESPACE_ID::Metadata StoreNotMatch::GetMetadata() const { +::google::protobuf::Metadata StoreNotMatch::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[1]); } - // =================================================================== class RegionNotFound::_Internal { public: }; -RegionNotFound::RegionNotFound(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RegionNotFound::RegionNotFound(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.RegionNotFound) } -RegionNotFound::RegionNotFound(const RegionNotFound& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RegionNotFound* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.region_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.region_id_ = from._impl_.region_id_; - // @@protoc_insertion_point(copy_constructor:errorpb.RegionNotFound) -} - -inline void RegionNotFound::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.region_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +RegionNotFound::RegionNotFound( + ::google::protobuf::Arena* arena, const RegionNotFound& from) + : RegionNotFound(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE RegionNotFound::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} +inline void RegionNotFound::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_id_ = {}; +} RegionNotFound::~RegionNotFound() { // @@protoc_insertion_point(destructor:errorpb.RegionNotFound) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RegionNotFound::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void RegionNotFound::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void RegionNotFound::Clear() { +PROTOBUF_NOINLINE void RegionNotFound::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.RegionNotFound) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.region_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RegionNotFound::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 region_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_.region_id_ = ::uint64_t{0u}; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RegionNotFound::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RegionNotFound::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 0, 2> RegionNotFound::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_RegionNotFound_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 region_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RegionNotFound, _impl_.region_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(RegionNotFound, _impl_.region_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 region_id = 1; + {PROTOBUF_FIELD_OFFSET(RegionNotFound, _impl_.region_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* RegionNotFound::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.RegionNotFound) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 region_id = 1; if (this->_internal_region_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_region_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.RegionNotFound) return target; } -size_t RegionNotFound::ByteSizeLong() const { +::size_t RegionNotFound::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.RegionNotFound) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // uint64 region_id = 1; if (this->_internal_region_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_region_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RegionNotFound::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RegionNotFound::MergeImpl +const ::google::protobuf::Message::ClassData RegionNotFound::_class_data_ = { + RegionNotFound::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RegionNotFound::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RegionNotFound::GetClassData() const { + return &_class_data_; +} -void RegionNotFound::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RegionNotFound::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.RegionNotFound) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (from._internal_region_id() != 0) { _this->_internal_set_region_id(from._internal_region_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RegionNotFound::CopyFrom(const RegionNotFound& from) { @@ -908,283 +1019,240 @@ void RegionNotFound::CopyFrom(const RegionNotFound& from) { MergeFrom(from); } -bool RegionNotFound::IsInitialized() const { +PROTOBUF_NOINLINE bool RegionNotFound::IsInitialized() const { return true; } -void RegionNotFound::InternalSwap(RegionNotFound* other) { +::_pbi::CachedSize* RegionNotFound::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RegionNotFound::InternalSwap(RegionNotFound* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.region_id_, other->_impl_.region_id_); + swap(_impl_.region_id_, other->_impl_.region_id_); } -::PROTOBUF_NAMESPACE_ID::Metadata RegionNotFound::GetMetadata() const { +::google::protobuf::Metadata RegionNotFound::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[2]); } - // =================================================================== class KeyNotInRegion::_Internal { public: }; -KeyNotInRegion::KeyNotInRegion(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +KeyNotInRegion::KeyNotInRegion(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.KeyNotInRegion) } -KeyNotInRegion::KeyNotInRegion(const KeyNotInRegion& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - KeyNotInRegion* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.region_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_start_key().empty()) { - _this->_impl_.start_key_.Set(from._internal_start_key(), - _this->GetArenaForAllocation()); - } - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_end_key().empty()) { - _this->_impl_.end_key_.Set(from._internal_end_key(), - _this->GetArenaForAllocation()); - } - _this->_impl_.region_id_ = from._impl_.region_id_; +inline PROTOBUF_NDEBUG_INLINE KeyNotInRegion::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : key_(arena, from.key_), + start_key_(arena, from.start_key_), + end_key_(arena, from.end_key_), + _cached_size_{0} {} + +KeyNotInRegion::KeyNotInRegion( + ::google::protobuf::Arena* arena, + const KeyNotInRegion& from) + : ::google::protobuf::Message(arena) { + KeyNotInRegion* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + _impl_.region_id_ = from._impl_.region_id_; + // @@protoc_insertion_point(copy_constructor:errorpb.KeyNotInRegion) } +inline PROTOBUF_NDEBUG_INLINE KeyNotInRegion::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : key_(arena), + start_key_(arena), + end_key_(arena), + _cached_size_{0} {} -inline void KeyNotInRegion::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.region_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KeyNotInRegion::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_id_ = {}; } - KeyNotInRegion::~KeyNotInRegion() { // @@protoc_insertion_point(destructor:errorpb.KeyNotInRegion) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void KeyNotInRegion::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.key_.Destroy(); _impl_.start_key_.Destroy(); _impl_.end_key_.Destroy(); + _impl_.~Impl_(); } -void KeyNotInRegion::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void KeyNotInRegion::Clear() { +PROTOBUF_NOINLINE void KeyNotInRegion::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.KeyNotInRegion) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.key_.ClearToEmpty(); _impl_.start_key_.ClearToEmpty(); _impl_.end_key_.ClearToEmpty(); - _impl_.region_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* KeyNotInRegion::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // bytes key = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 region_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes start_key = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_start_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes end_key = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_end_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_.region_id_ = ::uint64_t{0u}; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* KeyNotInRegion::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* KeyNotInRegion::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 0, 2> KeyNotInRegion::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_KeyNotInRegion_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // bytes end_key = 4; + {::_pbi::TcParser::FastBS1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.end_key_)}}, + // bytes key = 1; + {::_pbi::TcParser::FastBS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.key_)}}, + // uint64 region_id = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(KeyNotInRegion, _impl_.region_id_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.region_id_)}}, + // bytes start_key = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.start_key_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes key = 1; + {PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.key_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // uint64 region_id = 2; + {PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.region_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // bytes start_key = 3; + {PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.start_key_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes end_key = 4; + {PROTOBUF_FIELD_OFFSET(KeyNotInRegion, _impl_.end_key_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* KeyNotInRegion::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.KeyNotInRegion) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // bytes key = 1; if (!this->_internal_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 1, this->_internal_key(), target); + const std::string& _s = this->_internal_key(); + target = stream->WriteBytesMaybeAliased(1, _s, target); } // uint64 region_id = 2; if (this->_internal_region_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_region_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_region_id(), target); } // bytes start_key = 3; if (!this->_internal_start_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_start_key(), target); + const std::string& _s = this->_internal_start_key(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } // bytes end_key = 4; if (!this->_internal_end_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 4, this->_internal_end_key(), target); + const std::string& _s = this->_internal_end_key(); + target = stream->WriteBytesMaybeAliased(4, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.KeyNotInRegion) return target; } -size_t KeyNotInRegion::ByteSizeLong() const { +::size_t KeyNotInRegion::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.KeyNotInRegion) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes key = 1; if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_key()); } // bytes start_key = 3; if (!this->_internal_start_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_start_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_start_key()); } // bytes end_key = 4; if (!this->_internal_end_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_end_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_end_key()); } // uint64 region_id = 2; if (this->_internal_region_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_region_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyNotInRegion::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - KeyNotInRegion::MergeImpl +const ::google::protobuf::Message::ClassData KeyNotInRegion::_class_data_ = { + KeyNotInRegion::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyNotInRegion::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* KeyNotInRegion::GetClassData() const { + return &_class_data_; +} -void KeyNotInRegion::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void KeyNotInRegion::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.KeyNotInRegion) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_key().empty()) { @@ -1199,7 +1267,7 @@ void KeyNotInRegion::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : if (from._internal_region_id() != 0) { _this->_internal_set_region_id(from._internal_region_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void KeyNotInRegion::CopyFrom(const KeyNotInRegion& from) { @@ -1209,36 +1277,29 @@ void KeyNotInRegion::CopyFrom(const KeyNotInRegion& from) { MergeFrom(from); } -bool KeyNotInRegion::IsInitialized() const { +PROTOBUF_NOINLINE bool KeyNotInRegion::IsInitialized() const { return true; } -void KeyNotInRegion::InternalSwap(KeyNotInRegion* other) { +::_pbi::CachedSize* KeyNotInRegion::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void KeyNotInRegion::InternalSwap(KeyNotInRegion* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.start_key_, lhs_arena, - &other->_impl_.start_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.end_key_, lhs_arena, - &other->_impl_.end_key_, rhs_arena - ); - swap(_impl_.region_id_, other->_impl_.region_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata KeyNotInRegion::GetMetadata() const { + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.start_key_, &other->_impl_.start_key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.end_key_, &other->_impl_.end_key_, arena); + swap(_impl_.region_id_, other->_impl_.region_id_); +} + +::google::protobuf::Metadata KeyNotInRegion::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[3]); } - // =================================================================== class EpochNotMatch::_Internal { @@ -1246,162 +1307,159 @@ class EpochNotMatch::_Internal { }; void EpochNotMatch::clear_current_regions() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.current_regions_.Clear(); } -EpochNotMatch::EpochNotMatch(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +EpochNotMatch::EpochNotMatch(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.EpochNotMatch) } -EpochNotMatch::EpochNotMatch(const EpochNotMatch& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - EpochNotMatch* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.current_regions_){from._impl_.current_regions_} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE EpochNotMatch::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : current_regions_{visibility, arena, from.current_regions_}, + _cached_size_{0} {} + +EpochNotMatch::EpochNotMatch( + ::google::protobuf::Arena* arena, + const EpochNotMatch& from) + : ::google::protobuf::Message(arena) { + EpochNotMatch* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:errorpb.EpochNotMatch) } +inline PROTOBUF_NDEBUG_INLINE EpochNotMatch::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : current_regions_{visibility, arena}, + _cached_size_{0} {} -inline void EpochNotMatch::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.current_regions_){arena} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void EpochNotMatch::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); } - EpochNotMatch::~EpochNotMatch() { // @@protoc_insertion_point(destructor:errorpb.EpochNotMatch) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void EpochNotMatch::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.current_regions_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void EpochNotMatch::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void EpochNotMatch::Clear() { +PROTOBUF_NOINLINE void EpochNotMatch::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.EpochNotMatch) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.current_regions_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* EpochNotMatch::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // repeated .metapb.Region current_regions = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_current_regions(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* EpochNotMatch::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* EpochNotMatch::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> EpochNotMatch::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_EpochNotMatch_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // repeated .metapb.Region current_regions = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(EpochNotMatch, _impl_.current_regions_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .metapb.Region current_regions = 1; + {PROTOBUF_FIELD_OFFSET(EpochNotMatch, _impl_.current_regions_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::metapb::Region>()}, + }}, {{ + }}, +}; + +::uint8_t* EpochNotMatch::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.EpochNotMatch) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // repeated .metapb.Region current_regions = 1; for (unsigned i = 0, n = static_cast(this->_internal_current_regions_size()); i < n; i++) { - const auto& repfield = this->_internal_current_regions(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_current_regions().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.EpochNotMatch) return target; } -size_t EpochNotMatch::ByteSizeLong() const { +::size_t EpochNotMatch::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.EpochNotMatch) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .metapb.Region current_regions = 1; total_size += 1UL * this->_internal_current_regions_size(); - for (const auto& msg : this->_impl_.current_regions_) { + for (const auto& msg : this->_internal_current_regions()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EpochNotMatch::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - EpochNotMatch::MergeImpl +const ::google::protobuf::Message::ClassData EpochNotMatch::_class_data_ = { + EpochNotMatch::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EpochNotMatch::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* EpochNotMatch::GetClassData() const { + return &_class_data_; +} -void EpochNotMatch::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void EpochNotMatch::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.EpochNotMatch) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.current_regions_.MergeFrom(from._impl_.current_regions_); - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_mutable_current_regions()->MergeFrom( + from._internal_current_regions()); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void EpochNotMatch::CopyFrom(const EpochNotMatch& from) { @@ -1411,212 +1469,201 @@ void EpochNotMatch::CopyFrom(const EpochNotMatch& from) { MergeFrom(from); } -bool EpochNotMatch::IsInitialized() const { +PROTOBUF_NOINLINE bool EpochNotMatch::IsInitialized() const { return true; } -void EpochNotMatch::InternalSwap(EpochNotMatch* other) { +::_pbi::CachedSize* EpochNotMatch::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void EpochNotMatch::InternalSwap(EpochNotMatch* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.current_regions_.InternalSwap(&other->_impl_.current_regions_); } -::PROTOBUF_NAMESPACE_ID::Metadata EpochNotMatch::GetMetadata() const { +::google::protobuf::Metadata EpochNotMatch::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[4]); } - // =================================================================== class ServerIsBusy::_Internal { public: }; -ServerIsBusy::ServerIsBusy(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +ServerIsBusy::ServerIsBusy(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.ServerIsBusy) } -ServerIsBusy::ServerIsBusy(const ServerIsBusy& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ServerIsBusy* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.reason_){} - , decltype(_impl_.backoff_ms_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.reason_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.reason_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_reason().empty()) { - _this->_impl_.reason_.Set(from._internal_reason(), - _this->GetArenaForAllocation()); - } - _this->_impl_.backoff_ms_ = from._impl_.backoff_ms_; +inline PROTOBUF_NDEBUG_INLINE ServerIsBusy::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : reason_(arena, from.reason_), + _cached_size_{0} {} + +ServerIsBusy::ServerIsBusy( + ::google::protobuf::Arena* arena, + const ServerIsBusy& from) + : ::google::protobuf::Message(arena) { + ServerIsBusy* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + _impl_.backoff_ms_ = from._impl_.backoff_ms_; + // @@protoc_insertion_point(copy_constructor:errorpb.ServerIsBusy) } +inline PROTOBUF_NDEBUG_INLINE ServerIsBusy::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : reason_(arena), + _cached_size_{0} {} -inline void ServerIsBusy::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.reason_){} - , decltype(_impl_.backoff_ms_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.reason_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.reason_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void ServerIsBusy::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.backoff_ms_ = {}; } - ServerIsBusy::~ServerIsBusy() { // @@protoc_insertion_point(destructor:errorpb.ServerIsBusy) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void ServerIsBusy::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.reason_.Destroy(); + _impl_.~Impl_(); } -void ServerIsBusy::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void ServerIsBusy::Clear() { +PROTOBUF_NOINLINE void ServerIsBusy::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.ServerIsBusy) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.reason_.ClearToEmpty(); - _impl_.backoff_ms_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ServerIsBusy::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string reason = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_reason(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "errorpb.ServerIsBusy.reason")); - } else - goto handle_unusual; - continue; - // uint64 backoff_ms = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.backoff_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_.backoff_ms_ = ::uint64_t{0u}; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* ServerIsBusy::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* ServerIsBusy::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 35, 2> ServerIsBusy::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_ServerIsBusy_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 backoff_ms = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ServerIsBusy, _impl_.backoff_ms_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(ServerIsBusy, _impl_.backoff_ms_)}}, + // string reason = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(ServerIsBusy, _impl_.reason_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string reason = 1; + {PROTOBUF_FIELD_OFFSET(ServerIsBusy, _impl_.reason_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 backoff_ms = 2; + {PROTOBUF_FIELD_OFFSET(ServerIsBusy, _impl_.backoff_ms_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + "\24\6\0\0\0\0\0\0" + "errorpb.ServerIsBusy" + "reason" + }}, +}; + +::uint8_t* ServerIsBusy::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.ServerIsBusy) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // string reason = 1; if (!this->_internal_reason().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_reason().data(), static_cast(this->_internal_reason().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "errorpb.ServerIsBusy.reason"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_reason(), target); + const std::string& _s = this->_internal_reason(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "errorpb.ServerIsBusy.reason"); + target = stream->WriteStringMaybeAliased(1, _s, target); } // uint64 backoff_ms = 2; if (this->_internal_backoff_ms() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_backoff_ms(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_backoff_ms(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.ServerIsBusy) return target; } -size_t ServerIsBusy::ByteSizeLong() const { +::size_t ServerIsBusy::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.ServerIsBusy) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string reason = 1; if (!this->_internal_reason().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_reason()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_reason()); } // uint64 backoff_ms = 2; if (this->_internal_backoff_ms() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_backoff_ms()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_backoff_ms()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ServerIsBusy::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ServerIsBusy::MergeImpl +const ::google::protobuf::Message::ClassData ServerIsBusy::_class_data_ = { + ServerIsBusy::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ServerIsBusy::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* ServerIsBusy::GetClassData() const { + return &_class_data_; +} -void ServerIsBusy::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void ServerIsBusy::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.ServerIsBusy) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_reason().empty()) { @@ -1625,7 +1672,7 @@ void ServerIsBusy::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P if (from._internal_backoff_ms() != 0) { _this->_internal_set_backoff_ms(from._internal_backoff_ms()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void ServerIsBusy::CopyFrom(const ServerIsBusy& from) { @@ -1635,43 +1682,46 @@ void ServerIsBusy::CopyFrom(const ServerIsBusy& from) { MergeFrom(from); } -bool ServerIsBusy::IsInitialized() const { +PROTOBUF_NOINLINE bool ServerIsBusy::IsInitialized() const { return true; } -void ServerIsBusy::InternalSwap(ServerIsBusy* other) { +::_pbi::CachedSize* ServerIsBusy::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void ServerIsBusy::InternalSwap(ServerIsBusy* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.reason_, lhs_arena, - &other->_impl_.reason_, rhs_arena - ); - swap(_impl_.backoff_ms_, other->_impl_.backoff_ms_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.reason_, &other->_impl_.reason_, arena); + swap(_impl_.backoff_ms_, other->_impl_.backoff_ms_); } -::PROTOBUF_NAMESPACE_ID::Metadata ServerIsBusy::GetMetadata() const { +::google::protobuf::Metadata ServerIsBusy::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[5]); } - // =================================================================== class StaleCommand::_Internal { public: }; -StaleCommand::StaleCommand(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { +StaleCommand::StaleCommand(::google::protobuf::Arena* arena) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { // @@protoc_insertion_point(arena_constructor:errorpb.StaleCommand) } -StaleCommand::StaleCommand(const StaleCommand& from) - : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { - StaleCommand* const _this = this; (void)_this; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +StaleCommand::StaleCommand( + ::google::protobuf::Arena* arena, + const StaleCommand& from) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + StaleCommand* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:errorpb.StaleCommand) } @@ -1679,196 +1729,178 @@ StaleCommand::StaleCommand(const StaleCommand& from) -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StaleCommand::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StaleCommand::GetClassData() const { return &_class_data_; } - - - -::PROTOBUF_NAMESPACE_ID::Metadata StaleCommand::GetMetadata() const { +::google::protobuf::Metadata StaleCommand::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[6]); } - // =================================================================== class RaftEntryTooLarge::_Internal { public: }; -RaftEntryTooLarge::RaftEntryTooLarge(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RaftEntryTooLarge::RaftEntryTooLarge(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.RaftEntryTooLarge) } -RaftEntryTooLarge::RaftEntryTooLarge(const RaftEntryTooLarge& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RaftEntryTooLarge* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.region_id_){} - , decltype(_impl_.entry_size_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.region_id_, &from._impl_.region_id_, - static_cast(reinterpret_cast(&_impl_.entry_size_) - - reinterpret_cast(&_impl_.region_id_)) + sizeof(_impl_.entry_size_)); - // @@protoc_insertion_point(copy_constructor:errorpb.RaftEntryTooLarge) -} - -inline void RaftEntryTooLarge::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.region_id_){uint64_t{0u}} - , decltype(_impl_.entry_size_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +RaftEntryTooLarge::RaftEntryTooLarge( + ::google::protobuf::Arena* arena, const RaftEntryTooLarge& from) + : RaftEntryTooLarge(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE RaftEntryTooLarge::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} +inline void RaftEntryTooLarge::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, region_id_), + 0, + offsetof(Impl_, entry_size_) - + offsetof(Impl_, region_id_) + + sizeof(Impl_::entry_size_)); +} RaftEntryTooLarge::~RaftEntryTooLarge() { // @@protoc_insertion_point(destructor:errorpb.RaftEntryTooLarge) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RaftEntryTooLarge::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void RaftEntryTooLarge::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RaftEntryTooLarge::Clear() { +PROTOBUF_NOINLINE void RaftEntryTooLarge::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.RaftEntryTooLarge) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.region_id_, 0, static_cast( + ::memset(&_impl_.region_id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.entry_size_) - reinterpret_cast(&_impl_.region_id_)) + sizeof(_impl_.entry_size_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RaftEntryTooLarge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 region_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 entry_size = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.entry_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RaftEntryTooLarge::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RaftEntryTooLarge::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> RaftEntryTooLarge::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_RaftEntryTooLarge_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 entry_size = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RaftEntryTooLarge, _impl_.entry_size_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(RaftEntryTooLarge, _impl_.entry_size_)}}, + // uint64 region_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RaftEntryTooLarge, _impl_.region_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(RaftEntryTooLarge, _impl_.region_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 region_id = 1; + {PROTOBUF_FIELD_OFFSET(RaftEntryTooLarge, _impl_.region_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 entry_size = 2; + {PROTOBUF_FIELD_OFFSET(RaftEntryTooLarge, _impl_.entry_size_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* RaftEntryTooLarge::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.RaftEntryTooLarge) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 region_id = 1; if (this->_internal_region_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_region_id(), target); } // uint64 entry_size = 2; if (this->_internal_entry_size() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_entry_size(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_entry_size(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.RaftEntryTooLarge) return target; } -size_t RaftEntryTooLarge::ByteSizeLong() const { +::size_t RaftEntryTooLarge::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.RaftEntryTooLarge) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // uint64 region_id = 1; if (this->_internal_region_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_region_id()); } // uint64 entry_size = 2; if (this->_internal_entry_size() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_entry_size()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_entry_size()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RaftEntryTooLarge::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RaftEntryTooLarge::MergeImpl +const ::google::protobuf::Message::ClassData RaftEntryTooLarge::_class_data_ = { + RaftEntryTooLarge::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RaftEntryTooLarge::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RaftEntryTooLarge::GetClassData() const { + return &_class_data_; +} -void RaftEntryTooLarge::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RaftEntryTooLarge::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.RaftEntryTooLarge) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (from._internal_region_id() != 0) { @@ -1877,7 +1909,7 @@ void RaftEntryTooLarge::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons if (from._internal_entry_size() != 0) { _this->_internal_set_entry_size(from._internal_entry_size()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RaftEntryTooLarge::CopyFrom(const RaftEntryTooLarge& from) { @@ -1887,14 +1919,17 @@ void RaftEntryTooLarge::CopyFrom(const RaftEntryTooLarge& from) { MergeFrom(from); } -bool RaftEntryTooLarge::IsInitialized() const { +PROTOBUF_NOINLINE bool RaftEntryTooLarge::IsInitialized() const { return true; } -void RaftEntryTooLarge::InternalSwap(RaftEntryTooLarge* other) { +::_pbi::CachedSize* RaftEntryTooLarge::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RaftEntryTooLarge::InternalSwap(RaftEntryTooLarge* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RaftEntryTooLarge, _impl_.entry_size_) + sizeof(RaftEntryTooLarge::_impl_.entry_size_) - PROTOBUF_FIELD_OFFSET(RaftEntryTooLarge, _impl_.region_id_)>( @@ -1902,513 +1937,512 @@ void RaftEntryTooLarge::InternalSwap(RaftEntryTooLarge* other) { reinterpret_cast(&other->_impl_.region_id_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RaftEntryTooLarge::GetMetadata() const { +::google::protobuf::Metadata RaftEntryTooLarge::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[7]); } - // =================================================================== class Error::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Error, _impl_._has_bits_); static const ::errorpb::NotLeader& not_leader(const Error* msg); + static void set_has_not_leader(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } static const ::errorpb::RegionNotFound& region_not_found(const Error* msg); + static void set_has_region_not_found(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } static const ::errorpb::KeyNotInRegion& key_not_in_region(const Error* msg); + static void set_has_key_not_in_region(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } static const ::errorpb::EpochNotMatch& epoch_not_match(const Error* msg); + static void set_has_epoch_not_match(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } static const ::errorpb::ServerIsBusy& server_is_busy(const Error* msg); + static void set_has_server_is_busy(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } static const ::errorpb::StaleCommand& stale_command(const Error* msg); + static void set_has_stale_command(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } static const ::errorpb::StoreNotMatch& store_not_match(const Error* msg); + static void set_has_store_not_match(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } static const ::errorpb::RaftEntryTooLarge& raft_entry_too_large(const Error* msg); + static void set_has_raft_entry_too_large(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } }; -const ::errorpb::NotLeader& -Error::_Internal::not_leader(const Error* msg) { +const ::errorpb::NotLeader& Error::_Internal::not_leader(const Error* msg) { return *msg->_impl_.not_leader_; } -const ::errorpb::RegionNotFound& -Error::_Internal::region_not_found(const Error* msg) { +const ::errorpb::RegionNotFound& Error::_Internal::region_not_found(const Error* msg) { return *msg->_impl_.region_not_found_; } -const ::errorpb::KeyNotInRegion& -Error::_Internal::key_not_in_region(const Error* msg) { +const ::errorpb::KeyNotInRegion& Error::_Internal::key_not_in_region(const Error* msg) { return *msg->_impl_.key_not_in_region_; } -const ::errorpb::EpochNotMatch& -Error::_Internal::epoch_not_match(const Error* msg) { +const ::errorpb::EpochNotMatch& Error::_Internal::epoch_not_match(const Error* msg) { return *msg->_impl_.epoch_not_match_; } -const ::errorpb::ServerIsBusy& -Error::_Internal::server_is_busy(const Error* msg) { +const ::errorpb::ServerIsBusy& Error::_Internal::server_is_busy(const Error* msg) { return *msg->_impl_.server_is_busy_; } -const ::errorpb::StaleCommand& -Error::_Internal::stale_command(const Error* msg) { +const ::errorpb::StaleCommand& Error::_Internal::stale_command(const Error* msg) { return *msg->_impl_.stale_command_; } -const ::errorpb::StoreNotMatch& -Error::_Internal::store_not_match(const Error* msg) { +const ::errorpb::StoreNotMatch& Error::_Internal::store_not_match(const Error* msg) { return *msg->_impl_.store_not_match_; } -const ::errorpb::RaftEntryTooLarge& -Error::_Internal::raft_entry_too_large(const Error* msg) { +const ::errorpb::RaftEntryTooLarge& Error::_Internal::raft_entry_too_large(const Error* msg) { return *msg->_impl_.raft_entry_too_large_; } -Error::Error(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Error::Error(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:errorpb.Error) } -Error::Error(const Error& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Error* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.message_){} - , decltype(_impl_.not_leader_){nullptr} - , decltype(_impl_.region_not_found_){nullptr} - , decltype(_impl_.key_not_in_region_){nullptr} - , decltype(_impl_.epoch_not_match_){nullptr} - , decltype(_impl_.server_is_busy_){nullptr} - , decltype(_impl_.stale_command_){nullptr} - , decltype(_impl_.store_not_match_){nullptr} - , decltype(_impl_.raft_entry_too_large_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.message_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.message_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_message().empty()) { - _this->_impl_.message_.Set(from._internal_message(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_not_leader()) { - _this->_impl_.not_leader_ = new ::errorpb::NotLeader(*from._impl_.not_leader_); - } - if (from._internal_has_region_not_found()) { - _this->_impl_.region_not_found_ = new ::errorpb::RegionNotFound(*from._impl_.region_not_found_); - } - if (from._internal_has_key_not_in_region()) { - _this->_impl_.key_not_in_region_ = new ::errorpb::KeyNotInRegion(*from._impl_.key_not_in_region_); - } - if (from._internal_has_epoch_not_match()) { - _this->_impl_.epoch_not_match_ = new ::errorpb::EpochNotMatch(*from._impl_.epoch_not_match_); - } - if (from._internal_has_server_is_busy()) { - _this->_impl_.server_is_busy_ = new ::errorpb::ServerIsBusy(*from._impl_.server_is_busy_); - } - if (from._internal_has_stale_command()) { - _this->_impl_.stale_command_ = new ::errorpb::StaleCommand(*from._impl_.stale_command_); - } - if (from._internal_has_store_not_match()) { - _this->_impl_.store_not_match_ = new ::errorpb::StoreNotMatch(*from._impl_.store_not_match_); - } - if (from._internal_has_raft_entry_too_large()) { - _this->_impl_.raft_entry_too_large_ = new ::errorpb::RaftEntryTooLarge(*from._impl_.raft_entry_too_large_); - } +inline PROTOBUF_NDEBUG_INLINE Error::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + message_(arena, from.message_) {} + +Error::Error( + ::google::protobuf::Arena* arena, + const Error& from) + : ::google::protobuf::Message(arena) { + Error* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.not_leader_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::NotLeader>(arena, *from._impl_.not_leader_) + : nullptr; + _impl_.region_not_found_ = (cached_has_bits & 0x00000002u) + ? CreateMaybeMessage<::errorpb::RegionNotFound>(arena, *from._impl_.region_not_found_) + : nullptr; + _impl_.key_not_in_region_ = (cached_has_bits & 0x00000004u) + ? CreateMaybeMessage<::errorpb::KeyNotInRegion>(arena, *from._impl_.key_not_in_region_) + : nullptr; + _impl_.epoch_not_match_ = (cached_has_bits & 0x00000008u) + ? CreateMaybeMessage<::errorpb::EpochNotMatch>(arena, *from._impl_.epoch_not_match_) + : nullptr; + _impl_.server_is_busy_ = (cached_has_bits & 0x00000010u) + ? CreateMaybeMessage<::errorpb::ServerIsBusy>(arena, *from._impl_.server_is_busy_) + : nullptr; + _impl_.stale_command_ = (cached_has_bits & 0x00000020u) + ? CreateMaybeMessage<::errorpb::StaleCommand>(arena, *from._impl_.stale_command_) + : nullptr; + _impl_.store_not_match_ = (cached_has_bits & 0x00000040u) + ? CreateMaybeMessage<::errorpb::StoreNotMatch>(arena, *from._impl_.store_not_match_) + : nullptr; + _impl_.raft_entry_too_large_ = (cached_has_bits & 0x00000080u) + ? CreateMaybeMessage<::errorpb::RaftEntryTooLarge>(arena, *from._impl_.raft_entry_too_large_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:errorpb.Error) } - -inline void Error::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.message_){} - , decltype(_impl_.not_leader_){nullptr} - , decltype(_impl_.region_not_found_){nullptr} - , decltype(_impl_.key_not_in_region_){nullptr} - , decltype(_impl_.epoch_not_match_){nullptr} - , decltype(_impl_.server_is_busy_){nullptr} - , decltype(_impl_.stale_command_){nullptr} - , decltype(_impl_.store_not_match_){nullptr} - , decltype(_impl_.raft_entry_too_large_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.message_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.message_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE Error::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + message_(arena) {} + +inline void Error::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, not_leader_), + 0, + offsetof(Impl_, raft_entry_too_large_) - + offsetof(Impl_, not_leader_) + + sizeof(Impl_::raft_entry_too_large_)); } - Error::~Error() { // @@protoc_insertion_point(destructor:errorpb.Error) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Error::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.message_.Destroy(); - if (this != internal_default_instance()) delete _impl_.not_leader_; - if (this != internal_default_instance()) delete _impl_.region_not_found_; - if (this != internal_default_instance()) delete _impl_.key_not_in_region_; - if (this != internal_default_instance()) delete _impl_.epoch_not_match_; - if (this != internal_default_instance()) delete _impl_.server_is_busy_; - if (this != internal_default_instance()) delete _impl_.stale_command_; - if (this != internal_default_instance()) delete _impl_.store_not_match_; - if (this != internal_default_instance()) delete _impl_.raft_entry_too_large_; -} - -void Error::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Error::Clear() { + delete _impl_.not_leader_; + delete _impl_.region_not_found_; + delete _impl_.key_not_in_region_; + delete _impl_.epoch_not_match_; + delete _impl_.server_is_busy_; + delete _impl_.stale_command_; + delete _impl_.store_not_match_; + delete _impl_.raft_entry_too_large_; + _impl_.~Impl_(); +} + +PROTOBUF_NOINLINE void Error::Clear() { // @@protoc_insertion_point(message_clear_start:errorpb.Error) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.message_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.not_leader_ != nullptr) { - delete _impl_.not_leader_; - } - _impl_.not_leader_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.region_not_found_ != nullptr) { - delete _impl_.region_not_found_; - } - _impl_.region_not_found_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.key_not_in_region_ != nullptr) { - delete _impl_.key_not_in_region_; - } - _impl_.key_not_in_region_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.epoch_not_match_ != nullptr) { - delete _impl_.epoch_not_match_; - } - _impl_.epoch_not_match_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.server_is_busy_ != nullptr) { - delete _impl_.server_is_busy_; - } - _impl_.server_is_busy_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.stale_command_ != nullptr) { - delete _impl_.stale_command_; - } - _impl_.stale_command_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.store_not_match_ != nullptr) { - delete _impl_.store_not_match_; - } - _impl_.store_not_match_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.raft_entry_too_large_ != nullptr) { - delete _impl_.raft_entry_too_large_; - } - _impl_.raft_entry_too_large_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string message = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_message(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "errorpb.Error.message")); - } else - goto handle_unusual; - continue; - // .errorpb.NotLeader not_leader = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_not_leader(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .errorpb.RegionNotFound region_not_found = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_region_not_found(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .errorpb.KeyNotInRegion key_not_in_region = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_key_not_in_region(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .errorpb.EpochNotMatch epoch_not_match = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr = ctx->ParseMessage(_internal_mutable_epoch_not_match(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .errorpb.ServerIsBusy server_is_busy = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr = ctx->ParseMessage(_internal_mutable_server_is_busy(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .errorpb.StaleCommand stale_command = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { - ptr = ctx->ParseMessage(_internal_mutable_stale_command(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .errorpb.StoreNotMatch store_not_match = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { - ptr = ctx->ParseMessage(_internal_mutable_store_not_match(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { - ptr = ctx->ParseMessage(_internal_mutable_raft_entry_too_large(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.not_leader_ != nullptr); + _impl_.not_leader_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.region_not_found_ != nullptr); + _impl_.region_not_found_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.key_not_in_region_ != nullptr); + _impl_.key_not_in_region_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + ABSL_DCHECK(_impl_.epoch_not_match_ != nullptr); + _impl_.epoch_not_match_->Clear(); + } + if (cached_has_bits & 0x00000010u) { + ABSL_DCHECK(_impl_.server_is_busy_ != nullptr); + _impl_.server_is_busy_->Clear(); } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + if (cached_has_bits & 0x00000020u) { + ABSL_DCHECK(_impl_.stale_command_ != nullptr); + _impl_.stale_command_->Clear(); + } + if (cached_has_bits & 0x00000040u) { + ABSL_DCHECK(_impl_.store_not_match_ != nullptr); + _impl_.store_not_match_->Clear(); + } + if (cached_has_bits & 0x00000080u) { + ABSL_DCHECK(_impl_.raft_entry_too_large_ != nullptr); + _impl_.raft_entry_too_large_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Error::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Error::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 9, 8, 37, 2> Error::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Error, _impl_._has_bits_), + 0, // no _extensions_ + 9, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294966784, // skipmap + offsetof(decltype(_table_), field_entries), + 9, // num_field_entries + 8, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Error_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string message = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Error, _impl_.message_)}}, + // .errorpb.NotLeader not_leader = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(Error, _impl_.not_leader_)}}, + // .errorpb.RegionNotFound region_not_found = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 1, PROTOBUF_FIELD_OFFSET(Error, _impl_.region_not_found_)}}, + // .errorpb.KeyNotInRegion key_not_in_region = 4; + {::_pbi::TcParser::FastMtS1, + {34, 2, 2, PROTOBUF_FIELD_OFFSET(Error, _impl_.key_not_in_region_)}}, + // .errorpb.EpochNotMatch epoch_not_match = 5; + {::_pbi::TcParser::FastMtS1, + {42, 3, 3, PROTOBUF_FIELD_OFFSET(Error, _impl_.epoch_not_match_)}}, + // .errorpb.ServerIsBusy server_is_busy = 6; + {::_pbi::TcParser::FastMtS1, + {50, 4, 4, PROTOBUF_FIELD_OFFSET(Error, _impl_.server_is_busy_)}}, + // .errorpb.StaleCommand stale_command = 7; + {::_pbi::TcParser::FastMdS1, + {58, 5, 5, PROTOBUF_FIELD_OFFSET(Error, _impl_.stale_command_)}}, + // .errorpb.StoreNotMatch store_not_match = 8; + {::_pbi::TcParser::FastMtS1, + {66, 6, 6, PROTOBUF_FIELD_OFFSET(Error, _impl_.store_not_match_)}}, + // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; + {::_pbi::TcParser::FastMtS1, + {74, 7, 7, PROTOBUF_FIELD_OFFSET(Error, _impl_.raft_entry_too_large_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string message = 1; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.message_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // .errorpb.NotLeader not_leader = 2; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.not_leader_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .errorpb.RegionNotFound region_not_found = 3; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.region_not_found_), _Internal::kHasBitsOffset + 1, 1, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .errorpb.KeyNotInRegion key_not_in_region = 4; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.key_not_in_region_), _Internal::kHasBitsOffset + 2, 2, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .errorpb.EpochNotMatch epoch_not_match = 5; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.epoch_not_match_), _Internal::kHasBitsOffset + 3, 3, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .errorpb.ServerIsBusy server_is_busy = 6; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.server_is_busy_), _Internal::kHasBitsOffset + 4, 4, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .errorpb.StaleCommand stale_command = 7; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.stale_command_), _Internal::kHasBitsOffset + 5, 5, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvDefault)}, + // .errorpb.StoreNotMatch store_not_match = 8; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.store_not_match_), _Internal::kHasBitsOffset + 6, 6, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.raft_entry_too_large_), _Internal::kHasBitsOffset + 7, 7, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::NotLeader>()}, + {::_pbi::TcParser::GetTable<::errorpb::RegionNotFound>()}, + {::_pbi::TcParser::GetTable<::errorpb::KeyNotInRegion>()}, + {::_pbi::TcParser::GetTable<::errorpb::EpochNotMatch>()}, + {::_pbi::TcParser::GetTable<::errorpb::ServerIsBusy>()}, + {::_pbi::FieldAuxDefaultMessage{}, &::errorpb::_StaleCommand_default_instance_}, + {::_pbi::TcParser::GetTable<::errorpb::StoreNotMatch>()}, + {::_pbi::TcParser::GetTable<::errorpb::RaftEntryTooLarge>()}, + }}, {{ + "\15\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "errorpb.Error" + "message" + }}, +}; + +::uint8_t* Error::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:errorpb.Error) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // string message = 1; if (!this->_internal_message().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_message().data(), static_cast(this->_internal_message().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "errorpb.Error.message"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_message(), target); + const std::string& _s = this->_internal_message(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "errorpb.Error.message"); + target = stream->WriteStringMaybeAliased(1, _s, target); } + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.NotLeader not_leader = 2; - if (this->_internal_has_not_leader()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::not_leader(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, _Internal::not_leader(this), _Internal::not_leader(this).GetCachedSize(), target, stream); } // .errorpb.RegionNotFound region_not_found = 3; - if (this->_internal_has_region_not_found()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::region_not_found(this), + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, _Internal::region_not_found(this), _Internal::region_not_found(this).GetCachedSize(), target, stream); } // .errorpb.KeyNotInRegion key_not_in_region = 4; - if (this->_internal_has_key_not_in_region()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::key_not_in_region(this), + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, _Internal::key_not_in_region(this), _Internal::key_not_in_region(this).GetCachedSize(), target, stream); } // .errorpb.EpochNotMatch epoch_not_match = 5; - if (this->_internal_has_epoch_not_match()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(5, _Internal::epoch_not_match(this), + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, _Internal::epoch_not_match(this), _Internal::epoch_not_match(this).GetCachedSize(), target, stream); } // .errorpb.ServerIsBusy server_is_busy = 6; - if (this->_internal_has_server_is_busy()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(6, _Internal::server_is_busy(this), + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, _Internal::server_is_busy(this), _Internal::server_is_busy(this).GetCachedSize(), target, stream); } // .errorpb.StaleCommand stale_command = 7; - if (this->_internal_has_stale_command()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(7, _Internal::stale_command(this), + if (cached_has_bits & 0x00000020u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, _Internal::stale_command(this), _Internal::stale_command(this).GetCachedSize(), target, stream); } // .errorpb.StoreNotMatch store_not_match = 8; - if (this->_internal_has_store_not_match()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(8, _Internal::store_not_match(this), + if (cached_has_bits & 0x00000040u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, _Internal::store_not_match(this), _Internal::store_not_match(this).GetCachedSize(), target, stream); } // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; - if (this->_internal_has_raft_entry_too_large()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(9, _Internal::raft_entry_too_large(this), + if (cached_has_bits & 0x00000080u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, _Internal::raft_entry_too_large(this), _Internal::raft_entry_too_large(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:errorpb.Error) return target; } -size_t Error::ByteSizeLong() const { +::size_t Error::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:errorpb.Error) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string message = 1; if (!this->_internal_message().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_message()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_message()); } - // .errorpb.NotLeader not_leader = 2; - if (this->_internal_has_not_leader()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.not_leader_); - } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // .errorpb.NotLeader not_leader = 2; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.not_leader_); + } - // .errorpb.RegionNotFound region_not_found = 3; - if (this->_internal_has_region_not_found()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_not_found_); - } + // .errorpb.RegionNotFound region_not_found = 3; + if (cached_has_bits & 0x00000002u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_not_found_); + } - // .errorpb.KeyNotInRegion key_not_in_region = 4; - if (this->_internal_has_key_not_in_region()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.key_not_in_region_); - } + // .errorpb.KeyNotInRegion key_not_in_region = 4; + if (cached_has_bits & 0x00000004u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.key_not_in_region_); + } - // .errorpb.EpochNotMatch epoch_not_match = 5; - if (this->_internal_has_epoch_not_match()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.epoch_not_match_); - } + // .errorpb.EpochNotMatch epoch_not_match = 5; + if (cached_has_bits & 0x00000008u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.epoch_not_match_); + } - // .errorpb.ServerIsBusy server_is_busy = 6; - if (this->_internal_has_server_is_busy()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.server_is_busy_); - } + // .errorpb.ServerIsBusy server_is_busy = 6; + if (cached_has_bits & 0x00000010u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.server_is_busy_); + } - // .errorpb.StaleCommand stale_command = 7; - if (this->_internal_has_stale_command()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.stale_command_); - } + // .errorpb.StaleCommand stale_command = 7; + if (cached_has_bits & 0x00000020u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.stale_command_); + } - // .errorpb.StoreNotMatch store_not_match = 8; - if (this->_internal_has_store_not_match()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.store_not_match_); - } + // .errorpb.StoreNotMatch store_not_match = 8; + if (cached_has_bits & 0x00000040u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.store_not_match_); + } - // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; - if (this->_internal_has_raft_entry_too_large()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.raft_entry_too_large_); - } + // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; + if (cached_has_bits & 0x00000080u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.raft_entry_too_large_); + } + } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Error::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Error::MergeImpl +const ::google::protobuf::Message::ClassData Error::_class_data_ = { + Error::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Error::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Error::GetClassData() const { + return &_class_data_; +} -void Error::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Error::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:errorpb.Error) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_message().empty()) { _this->_internal_set_message(from._internal_message()); } - if (from._internal_has_not_leader()) { - _this->_internal_mutable_not_leader()->::errorpb::NotLeader::MergeFrom( - from._internal_not_leader()); - } - if (from._internal_has_region_not_found()) { - _this->_internal_mutable_region_not_found()->::errorpb::RegionNotFound::MergeFrom( - from._internal_region_not_found()); - } - if (from._internal_has_key_not_in_region()) { - _this->_internal_mutable_key_not_in_region()->::errorpb::KeyNotInRegion::MergeFrom( - from._internal_key_not_in_region()); - } - if (from._internal_has_epoch_not_match()) { - _this->_internal_mutable_epoch_not_match()->::errorpb::EpochNotMatch::MergeFrom( - from._internal_epoch_not_match()); - } - if (from._internal_has_server_is_busy()) { - _this->_internal_mutable_server_is_busy()->::errorpb::ServerIsBusy::MergeFrom( - from._internal_server_is_busy()); - } - if (from._internal_has_stale_command()) { - _this->_internal_mutable_stale_command()->::errorpb::StaleCommand::MergeFrom( - from._internal_stale_command()); - } - if (from._internal_has_store_not_match()) { - _this->_internal_mutable_store_not_match()->::errorpb::StoreNotMatch::MergeFrom( - from._internal_store_not_match()); - } - if (from._internal_has_raft_entry_too_large()) { - _this->_internal_mutable_raft_entry_too_large()->::errorpb::RaftEntryTooLarge::MergeFrom( - from._internal_raft_entry_too_large()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_not_leader()->::errorpb::NotLeader::MergeFrom( + from._internal_not_leader()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_region_not_found()->::errorpb::RegionNotFound::MergeFrom( + from._internal_region_not_found()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_key_not_in_region()->::errorpb::KeyNotInRegion::MergeFrom( + from._internal_key_not_in_region()); + } + if (cached_has_bits & 0x00000008u) { + _this->_internal_mutable_epoch_not_match()->::errorpb::EpochNotMatch::MergeFrom( + from._internal_epoch_not_match()); + } + if (cached_has_bits & 0x00000010u) { + _this->_internal_mutable_server_is_busy()->::errorpb::ServerIsBusy::MergeFrom( + from._internal_server_is_busy()); + } + if (cached_has_bits & 0x00000020u) { + _this->_internal_mutable_stale_command()->::errorpb::StaleCommand::MergeFrom( + from._internal_stale_command()); + } + if (cached_has_bits & 0x00000040u) { + _this->_internal_mutable_store_not_match()->::errorpb::StoreNotMatch::MergeFrom( + from._internal_store_not_match()); + } + if (cached_has_bits & 0x00000080u) { + _this->_internal_mutable_raft_entry_too_large()->::errorpb::RaftEntryTooLarge::MergeFrom( + from._internal_raft_entry_too_large()); + } } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Error::CopyFrom(const Error& from) { @@ -2418,20 +2452,21 @@ void Error::CopyFrom(const Error& from) { MergeFrom(from); } -bool Error::IsInitialized() const { +PROTOBUF_NOINLINE bool Error::IsInitialized() const { return true; } -void Error::InternalSwap(Error* other) { +::_pbi::CachedSize* Error::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Error::InternalSwap(Error* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.message_, lhs_arena, - &other->_impl_.message_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, &other->_impl_.message_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(Error, _impl_.raft_entry_too_large_) + sizeof(Error::_impl_.raft_entry_too_large_) - PROTOBUF_FIELD_OFFSET(Error, _impl_.not_leader_)>( @@ -2439,52 +2474,16 @@ void Error::InternalSwap(Error* other) { reinterpret_cast(&other->_impl_.not_leader_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Error::GetMetadata() const { +::google::protobuf::Metadata Error::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_errorpb_2eproto_getter, &descriptor_table_errorpb_2eproto_once, file_level_metadata_errorpb_2eproto[8]); } - // @@protoc_insertion_point(namespace_scope) } // namespace errorpb -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::errorpb::NotLeader* -Arena::CreateMaybeMessage< ::errorpb::NotLeader >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::NotLeader >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::StoreNotMatch* -Arena::CreateMaybeMessage< ::errorpb::StoreNotMatch >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::StoreNotMatch >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::RegionNotFound* -Arena::CreateMaybeMessage< ::errorpb::RegionNotFound >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::RegionNotFound >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::KeyNotInRegion* -Arena::CreateMaybeMessage< ::errorpb::KeyNotInRegion >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::KeyNotInRegion >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::EpochNotMatch* -Arena::CreateMaybeMessage< ::errorpb::EpochNotMatch >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::EpochNotMatch >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::ServerIsBusy* -Arena::CreateMaybeMessage< ::errorpb::ServerIsBusy >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::ServerIsBusy >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::StaleCommand* -Arena::CreateMaybeMessage< ::errorpb::StaleCommand >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::StaleCommand >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::RaftEntryTooLarge* -Arena::CreateMaybeMessage< ::errorpb::RaftEntryTooLarge >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::RaftEntryTooLarge >(arena); -} -template<> PROTOBUF_NOINLINE ::errorpb::Error* -Arena::CreateMaybeMessage< ::errorpb::Error >(Arena* arena) { - return Arena::CreateMessageInternal< ::errorpb::Error >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include +#include "google/protobuf/port_undef.inc" diff --git a/ThirdParty/kvproto/generated/kvproto/errorpb.pb.h b/ThirdParty/kvproto/generated/kvproto/errorpb.pb.h index 0f128304e..67ef010d1 100644 --- a/ThirdParty/kvproto/generated/kvproto/errorpb.pb.h +++ b/ThirdParty/kvproto/generated/kvproto/errorpb.pb.h @@ -1,51 +1,62 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: errorpb.proto +// Protobuf C++ Version: 4.25.3 -#ifndef GOOGLE_PROTOBUF_INCLUDED_errorpb_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_errorpb_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_errorpb_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_errorpb_2eproto_2epb_2eh #include #include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION < 4025000 +#error "This file was generated by a newer version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please update" +#error "your headers." +#endif // PROTOBUF_VERSION + +#if 4025003 < PROTOBUF_MIN_PROTOC_VERSION +#error "This file was generated by an older version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please" +#error "regenerate this file with a newer version of protoc." +#endif // PROTOBUF_MIN_PROTOC_VERSION +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_bases.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" #include "metapb.pb.h" // @@protoc_insertion_point(includes) -#include + +// Must be included last. +#include "google/protobuf/port_def.inc" + #define PROTOBUF_INTERNAL_EXPORT_errorpb_2eproto -PROTOBUF_NAMESPACE_OPEN + +namespace google { +namespace protobuf { namespace internal { class AnyMetadata; } // namespace internal -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // Internal implementation detail -- do not use these members. struct TableStruct_errorpb_2eproto { - static const uint32_t offsets[]; + static const ::uint32_t offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_errorpb_2eproto; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_errorpb_2eproto; namespace errorpb { class EpochNotMatch; struct EpochNotMatchDefaultTypeInternal; @@ -75,43 +86,42 @@ class StoreNotMatch; struct StoreNotMatchDefaultTypeInternal; extern StoreNotMatchDefaultTypeInternal _StoreNotMatch_default_instance_; } // namespace errorpb -PROTOBUF_NAMESPACE_OPEN -template<> ::errorpb::EpochNotMatch* Arena::CreateMaybeMessage<::errorpb::EpochNotMatch>(Arena*); -template<> ::errorpb::Error* Arena::CreateMaybeMessage<::errorpb::Error>(Arena*); -template<> ::errorpb::KeyNotInRegion* Arena::CreateMaybeMessage<::errorpb::KeyNotInRegion>(Arena*); -template<> ::errorpb::NotLeader* Arena::CreateMaybeMessage<::errorpb::NotLeader>(Arena*); -template<> ::errorpb::RaftEntryTooLarge* Arena::CreateMaybeMessage<::errorpb::RaftEntryTooLarge>(Arena*); -template<> ::errorpb::RegionNotFound* Arena::CreateMaybeMessage<::errorpb::RegionNotFound>(Arena*); -template<> ::errorpb::ServerIsBusy* Arena::CreateMaybeMessage<::errorpb::ServerIsBusy>(Arena*); -template<> ::errorpb::StaleCommand* Arena::CreateMaybeMessage<::errorpb::StaleCommand>(Arena*); -template<> ::errorpb::StoreNotMatch* Arena::CreateMaybeMessage<::errorpb::StoreNotMatch>(Arena*); -PROTOBUF_NAMESPACE_CLOSE +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + namespace errorpb { // =================================================================== -class NotLeader final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.NotLeader) */ { + +// ------------------------------------------------------------------- + +class StoreNotMatch final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.StoreNotMatch) */ { public: - inline NotLeader() : NotLeader(nullptr) {} - ~NotLeader() override; - explicit PROTOBUF_CONSTEXPR NotLeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline StoreNotMatch() : StoreNotMatch(nullptr) {} + ~StoreNotMatch() override; + template + explicit PROTOBUF_CONSTEXPR StoreNotMatch(::google::protobuf::internal::ConstantInitialized); - NotLeader(const NotLeader& from); - NotLeader(NotLeader&& from) noexcept - : NotLeader() { + inline StoreNotMatch(const StoreNotMatch& from) + : StoreNotMatch(nullptr, from) {} + StoreNotMatch(StoreNotMatch&& from) noexcept + : StoreNotMatch() { *this = ::std::move(from); } - inline NotLeader& operator=(const NotLeader& from) { + inline StoreNotMatch& operator=(const StoreNotMatch& from) { CopyFrom(from); return *this; } - inline NotLeader& operator=(NotLeader&& from) noexcept { + inline StoreNotMatch& operator=(StoreNotMatch&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -121,165 +131,183 @@ class NotLeader final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const NotLeader& default_instance() { + static const StoreNotMatch& default_instance() { return *internal_default_instance(); } - static inline const NotLeader* internal_default_instance() { - return reinterpret_cast( - &_NotLeader_default_instance_); + static inline const StoreNotMatch* internal_default_instance() { + return reinterpret_cast( + &_StoreNotMatch_default_instance_); } static constexpr int kIndexInFileMessages = - 0; + 1; - friend void swap(NotLeader& a, NotLeader& b) { + friend void swap(StoreNotMatch& a, StoreNotMatch& b) { a.Swap(&b); } - inline void Swap(NotLeader* other) { + inline void Swap(StoreNotMatch* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(NotLeader* other) { + void UnsafeArenaSwap(StoreNotMatch* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - NotLeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + StoreNotMatch* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const NotLeader& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const NotLeader& from) { - NotLeader::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const StoreNotMatch& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const StoreNotMatch& from) { + StoreNotMatch::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(NotLeader* other); + void InternalSwap(StoreNotMatch* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.NotLeader"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.StoreNotMatch"; } protected: - explicit NotLeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit StoreNotMatch(::google::protobuf::Arena* arena); + StoreNotMatch(::google::protobuf::Arena* arena, const StoreNotMatch& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kLeaderFieldNumber = 2, - kRegionIdFieldNumber = 1, + kRequestStoreIdFieldNumber = 1, + kActualStoreIdFieldNumber = 2, }; - // .metapb.Peer leader = 2; - bool has_leader() const; - private: - bool _internal_has_leader() const; - public: - void clear_leader(); - const ::metapb::Peer& leader() const; - PROTOBUF_NODISCARD ::metapb::Peer* release_leader(); - ::metapb::Peer* mutable_leader(); - void set_allocated_leader(::metapb::Peer* leader); + // uint64 request_store_id = 1; + void clear_request_store_id() ; + ::uint64_t request_store_id() const; + void set_request_store_id(::uint64_t value); + private: - const ::metapb::Peer& _internal_leader() const; - ::metapb::Peer* _internal_mutable_leader(); + ::uint64_t _internal_request_store_id() const; + void _internal_set_request_store_id(::uint64_t value); + public: - void unsafe_arena_set_allocated_leader( - ::metapb::Peer* leader); - ::metapb::Peer* unsafe_arena_release_leader(); + // uint64 actual_store_id = 2; + void clear_actual_store_id() ; + ::uint64_t actual_store_id() const; + void set_actual_store_id(::uint64_t value); - // uint64 region_id = 1; - void clear_region_id(); - uint64_t region_id() const; - void set_region_id(uint64_t value); private: - uint64_t _internal_region_id() const; - void _internal_set_region_id(uint64_t value); - public: + ::uint64_t _internal_actual_store_id() const; + void _internal_set_actual_store_id(::uint64_t value); - // @@protoc_insertion_point(class_scope:errorpb.NotLeader) + public: + // @@protoc_insertion_point(class_scope:errorpb.StoreNotMatch) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::metapb::Peer* leader_; - uint64_t region_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint64_t request_store_id_; + ::uint64_t actual_store_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class StoreNotMatch final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.StoreNotMatch) */ { +class StaleCommand final : + public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:errorpb.StaleCommand) */ { public: - inline StoreNotMatch() : StoreNotMatch(nullptr) {} - ~StoreNotMatch() override; - explicit PROTOBUF_CONSTEXPR StoreNotMatch(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline StaleCommand() : StaleCommand(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR StaleCommand(::google::protobuf::internal::ConstantInitialized); - StoreNotMatch(const StoreNotMatch& from); - StoreNotMatch(StoreNotMatch&& from) noexcept - : StoreNotMatch() { + inline StaleCommand(const StaleCommand& from) + : StaleCommand(nullptr, from) {} + StaleCommand(StaleCommand&& from) noexcept + : StaleCommand() { *this = ::std::move(from); } - inline StoreNotMatch& operator=(const StoreNotMatch& from) { + inline StaleCommand& operator=(const StaleCommand& from) { CopyFrom(from); return *this; } - inline StoreNotMatch& operator=(StoreNotMatch&& from) noexcept { + inline StaleCommand& operator=(StaleCommand&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -289,156 +317,134 @@ class StoreNotMatch final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const StoreNotMatch& default_instance() { + static const StaleCommand& default_instance() { return *internal_default_instance(); } - static inline const StoreNotMatch* internal_default_instance() { - return reinterpret_cast( - &_StoreNotMatch_default_instance_); + static inline const StaleCommand* internal_default_instance() { + return reinterpret_cast( + &_StaleCommand_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 6; - friend void swap(StoreNotMatch& a, StoreNotMatch& b) { + friend void swap(StaleCommand& a, StaleCommand& b) { a.Swap(&b); } - inline void Swap(StoreNotMatch* other) { + inline void Swap(StaleCommand* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(StoreNotMatch* other) { + void UnsafeArenaSwap(StaleCommand* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - StoreNotMatch* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + StaleCommand* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const StoreNotMatch& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const StoreNotMatch& from) { - StoreNotMatch::MergeImpl(*this, from); + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const StaleCommand& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const StaleCommand& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(StoreNotMatch* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.StoreNotMatch"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.StaleCommand"; } protected: - explicit StoreNotMatch(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit StaleCommand(::google::protobuf::Arena* arena); + StaleCommand(::google::protobuf::Arena* arena, const StaleCommand& from); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - enum : int { - kRequestStoreIdFieldNumber = 1, - kActualStoreIdFieldNumber = 2, - }; - // uint64 request_store_id = 1; - void clear_request_store_id(); - uint64_t request_store_id() const; - void set_request_store_id(uint64_t value); - private: - uint64_t _internal_request_store_id() const; - void _internal_set_request_store_id(uint64_t value); - public: - - // uint64 actual_store_id = 2; - void clear_actual_store_id(); - uint64_t actual_store_id() const; - void set_actual_store_id(uint64_t value); - private: - uint64_t _internal_actual_store_id() const; - void _internal_set_actual_store_id(uint64_t value); - public: - - // @@protoc_insertion_point(class_scope:errorpb.StoreNotMatch) + // @@protoc_insertion_point(class_scope:errorpb.StaleCommand) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - uint64_t request_store_id_; - uint64_t actual_store_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + PROTOBUF_TSAN_DECLARE_MEMBER }; - union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RegionNotFound final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.RegionNotFound) */ { +class ServerIsBusy final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.ServerIsBusy) */ { public: - inline RegionNotFound() : RegionNotFound(nullptr) {} - ~RegionNotFound() override; - explicit PROTOBUF_CONSTEXPR RegionNotFound(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline ServerIsBusy() : ServerIsBusy(nullptr) {} + ~ServerIsBusy() override; + template + explicit PROTOBUF_CONSTEXPR ServerIsBusy(::google::protobuf::internal::ConstantInitialized); - RegionNotFound(const RegionNotFound& from); - RegionNotFound(RegionNotFound&& from) noexcept - : RegionNotFound() { + inline ServerIsBusy(const ServerIsBusy& from) + : ServerIsBusy(nullptr, from) {} + ServerIsBusy(ServerIsBusy&& from) noexcept + : ServerIsBusy() { *this = ::std::move(from); } - inline RegionNotFound& operator=(const RegionNotFound& from) { + inline ServerIsBusy& operator=(const ServerIsBusy& from) { CopyFrom(from); return *this; } - inline RegionNotFound& operator=(RegionNotFound&& from) noexcept { + inline ServerIsBusy& operator=(ServerIsBusy&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -448,145 +454,190 @@ class RegionNotFound final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RegionNotFound& default_instance() { + static const ServerIsBusy& default_instance() { return *internal_default_instance(); } - static inline const RegionNotFound* internal_default_instance() { - return reinterpret_cast( - &_RegionNotFound_default_instance_); + static inline const ServerIsBusy* internal_default_instance() { + return reinterpret_cast( + &_ServerIsBusy_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 5; - friend void swap(RegionNotFound& a, RegionNotFound& b) { + friend void swap(ServerIsBusy& a, ServerIsBusy& b) { a.Swap(&b); } - inline void Swap(RegionNotFound* other) { + inline void Swap(ServerIsBusy* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RegionNotFound* other) { + void UnsafeArenaSwap(ServerIsBusy* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RegionNotFound* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ServerIsBusy* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RegionNotFound& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RegionNotFound& from) { - RegionNotFound::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ServerIsBusy& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const ServerIsBusy& from) { + ServerIsBusy::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RegionNotFound* other); + void InternalSwap(ServerIsBusy* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.RegionNotFound"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.ServerIsBusy"; } protected: - explicit RegionNotFound(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit ServerIsBusy(::google::protobuf::Arena* arena); + ServerIsBusy(::google::protobuf::Arena* arena, const ServerIsBusy& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kRegionIdFieldNumber = 1, + kReasonFieldNumber = 1, + kBackoffMsFieldNumber = 2, }; - // uint64 region_id = 1; - void clear_region_id(); - uint64_t region_id() const; - void set_region_id(uint64_t value); + // string reason = 1; + void clear_reason() ; + const std::string& reason() const; + template + void set_reason(Arg_&& arg, Args_... args); + std::string* mutable_reason(); + PROTOBUF_NODISCARD std::string* release_reason(); + void set_allocated_reason(std::string* value); + private: - uint64_t _internal_region_id() const; - void _internal_set_region_id(uint64_t value); + const std::string& _internal_reason() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_reason( + const std::string& value); + std::string* _internal_mutable_reason(); + public: + // uint64 backoff_ms = 2; + void clear_backoff_ms() ; + ::uint64_t backoff_ms() const; + void set_backoff_ms(::uint64_t value); - // @@protoc_insertion_point(class_scope:errorpb.RegionNotFound) + private: + ::uint64_t _internal_backoff_ms() const; + void _internal_set_backoff_ms(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:errorpb.ServerIsBusy) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 35, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - uint64_t region_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr reason_; + ::uint64_t backoff_ms_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class KeyNotInRegion final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.KeyNotInRegion) */ { +class RegionNotFound final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.RegionNotFound) */ { public: - inline KeyNotInRegion() : KeyNotInRegion(nullptr) {} - ~KeyNotInRegion() override; - explicit PROTOBUF_CONSTEXPR KeyNotInRegion(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RegionNotFound() : RegionNotFound(nullptr) {} + ~RegionNotFound() override; + template + explicit PROTOBUF_CONSTEXPR RegionNotFound(::google::protobuf::internal::ConstantInitialized); - KeyNotInRegion(const KeyNotInRegion& from); - KeyNotInRegion(KeyNotInRegion&& from) noexcept - : KeyNotInRegion() { + inline RegionNotFound(const RegionNotFound& from) + : RegionNotFound(nullptr, from) {} + RegionNotFound(RegionNotFound&& from) noexcept + : RegionNotFound() { *this = ::std::move(from); } - inline KeyNotInRegion& operator=(const KeyNotInRegion& from) { + inline RegionNotFound& operator=(const RegionNotFound& from) { CopyFrom(from); return *this; } - inline KeyNotInRegion& operator=(KeyNotInRegion&& from) noexcept { + inline RegionNotFound& operator=(RegionNotFound&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -596,193 +647,172 @@ class KeyNotInRegion final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const KeyNotInRegion& default_instance() { + static const RegionNotFound& default_instance() { return *internal_default_instance(); } - static inline const KeyNotInRegion* internal_default_instance() { - return reinterpret_cast( - &_KeyNotInRegion_default_instance_); + static inline const RegionNotFound* internal_default_instance() { + return reinterpret_cast( + &_RegionNotFound_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 2; - friend void swap(KeyNotInRegion& a, KeyNotInRegion& b) { + friend void swap(RegionNotFound& a, RegionNotFound& b) { a.Swap(&b); } - inline void Swap(KeyNotInRegion* other) { + inline void Swap(RegionNotFound* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(KeyNotInRegion* other) { + void UnsafeArenaSwap(RegionNotFound* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - KeyNotInRegion* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RegionNotFound* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const KeyNotInRegion& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const KeyNotInRegion& from) { - KeyNotInRegion::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RegionNotFound& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RegionNotFound& from) { + RegionNotFound::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(KeyNotInRegion* other); + void InternalSwap(RegionNotFound* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.KeyNotInRegion"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.RegionNotFound"; } protected: - explicit KeyNotInRegion(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RegionNotFound(::google::protobuf::Arena* arena); + RegionNotFound(::google::protobuf::Arena* arena, const RegionNotFound& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKeyFieldNumber = 1, - kStartKeyFieldNumber = 3, - kEndKeyFieldNumber = 4, - kRegionIdFieldNumber = 2, + kRegionIdFieldNumber = 1, }; - // bytes key = 1; - void clear_key(); - const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_key(); - PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); - private: - const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); - std::string* _internal_mutable_key(); - public: - - // bytes start_key = 3; - void clear_start_key(); - const std::string& start_key() const; - template - void set_start_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_start_key(); - PROTOBUF_NODISCARD std::string* release_start_key(); - void set_allocated_start_key(std::string* start_key); - private: - const std::string& _internal_start_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key(const std::string& value); - std::string* _internal_mutable_start_key(); - public: + // uint64 region_id = 1; + void clear_region_id() ; + ::uint64_t region_id() const; + void set_region_id(::uint64_t value); - // bytes end_key = 4; - void clear_end_key(); - const std::string& end_key() const; - template - void set_end_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_end_key(); - PROTOBUF_NODISCARD std::string* release_end_key(); - void set_allocated_end_key(std::string* end_key); private: - const std::string& _internal_end_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key(const std::string& value); - std::string* _internal_mutable_end_key(); - public: + ::uint64_t _internal_region_id() const; + void _internal_set_region_id(::uint64_t value); - // uint64 region_id = 2; - void clear_region_id(); - uint64_t region_id() const; - void set_region_id(uint64_t value); - private: - uint64_t _internal_region_id() const; - void _internal_set_region_id(uint64_t value); public: - - // @@protoc_insertion_point(class_scope:errorpb.KeyNotInRegion) + // @@protoc_insertion_point(class_scope:errorpb.RegionNotFound) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_key_; - uint64_t region_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint64_t region_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class EpochNotMatch final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.EpochNotMatch) */ { +class RaftEntryTooLarge final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.RaftEntryTooLarge) */ { public: - inline EpochNotMatch() : EpochNotMatch(nullptr) {} - ~EpochNotMatch() override; - explicit PROTOBUF_CONSTEXPR EpochNotMatch(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RaftEntryTooLarge() : RaftEntryTooLarge(nullptr) {} + ~RaftEntryTooLarge() override; + template + explicit PROTOBUF_CONSTEXPR RaftEntryTooLarge(::google::protobuf::internal::ConstantInitialized); - EpochNotMatch(const EpochNotMatch& from); - EpochNotMatch(EpochNotMatch&& from) noexcept - : EpochNotMatch() { + inline RaftEntryTooLarge(const RaftEntryTooLarge& from) + : RaftEntryTooLarge(nullptr, from) {} + RaftEntryTooLarge(RaftEntryTooLarge&& from) noexcept + : RaftEntryTooLarge() { *this = ::std::move(from); } - inline EpochNotMatch& operator=(const EpochNotMatch& from) { + inline RaftEntryTooLarge& operator=(const RaftEntryTooLarge& from) { CopyFrom(from); return *this; } - inline EpochNotMatch& operator=(EpochNotMatch&& from) noexcept { + inline RaftEntryTooLarge& operator=(RaftEntryTooLarge&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -792,154 +822,184 @@ class EpochNotMatch final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const EpochNotMatch& default_instance() { + static const RaftEntryTooLarge& default_instance() { return *internal_default_instance(); } - static inline const EpochNotMatch* internal_default_instance() { - return reinterpret_cast( - &_EpochNotMatch_default_instance_); + static inline const RaftEntryTooLarge* internal_default_instance() { + return reinterpret_cast( + &_RaftEntryTooLarge_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 7; - friend void swap(EpochNotMatch& a, EpochNotMatch& b) { + friend void swap(RaftEntryTooLarge& a, RaftEntryTooLarge& b) { a.Swap(&b); } - inline void Swap(EpochNotMatch* other) { + inline void Swap(RaftEntryTooLarge* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(EpochNotMatch* other) { + void UnsafeArenaSwap(RaftEntryTooLarge* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - EpochNotMatch* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RaftEntryTooLarge* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const EpochNotMatch& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const EpochNotMatch& from) { - EpochNotMatch::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RaftEntryTooLarge& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RaftEntryTooLarge& from) { + RaftEntryTooLarge::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(EpochNotMatch* other); + void InternalSwap(RaftEntryTooLarge* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.EpochNotMatch"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.RaftEntryTooLarge"; } protected: - explicit EpochNotMatch(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RaftEntryTooLarge(::google::protobuf::Arena* arena); + RaftEntryTooLarge(::google::protobuf::Arena* arena, const RaftEntryTooLarge& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kCurrentRegionsFieldNumber = 1, + kRegionIdFieldNumber = 1, + kEntrySizeFieldNumber = 2, }; - // repeated .metapb.Region current_regions = 1; - int current_regions_size() const; - private: - int _internal_current_regions_size() const; - public: - void clear_current_regions(); - ::metapb::Region* mutable_current_regions(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Region >* - mutable_current_regions(); + // uint64 region_id = 1; + void clear_region_id() ; + ::uint64_t region_id() const; + void set_region_id(::uint64_t value); + private: - const ::metapb::Region& _internal_current_regions(int index) const; - ::metapb::Region* _internal_add_current_regions(); + ::uint64_t _internal_region_id() const; + void _internal_set_region_id(::uint64_t value); + public: - const ::metapb::Region& current_regions(int index) const; - ::metapb::Region* add_current_regions(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Region >& - current_regions() const; + // uint64 entry_size = 2; + void clear_entry_size() ; + ::uint64_t entry_size() const; + void set_entry_size(::uint64_t value); - // @@protoc_insertion_point(class_scope:errorpb.EpochNotMatch) + private: + ::uint64_t _internal_entry_size() const; + void _internal_set_entry_size(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:errorpb.RaftEntryTooLarge) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Region > current_regions_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint64_t region_id_; + ::uint64_t entry_size_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class ServerIsBusy final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.ServerIsBusy) */ { +class KeyNotInRegion final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.KeyNotInRegion) */ { public: - inline ServerIsBusy() : ServerIsBusy(nullptr) {} - ~ServerIsBusy() override; - explicit PROTOBUF_CONSTEXPR ServerIsBusy(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline KeyNotInRegion() : KeyNotInRegion(nullptr) {} + ~KeyNotInRegion() override; + template + explicit PROTOBUF_CONSTEXPR KeyNotInRegion(::google::protobuf::internal::ConstantInitialized); - ServerIsBusy(const ServerIsBusy& from); - ServerIsBusy(ServerIsBusy&& from) noexcept - : ServerIsBusy() { + inline KeyNotInRegion(const KeyNotInRegion& from) + : KeyNotInRegion(nullptr, from) {} + KeyNotInRegion(KeyNotInRegion&& from) noexcept + : KeyNotInRegion() { *this = ::std::move(from); } - inline ServerIsBusy& operator=(const ServerIsBusy& from) { + inline KeyNotInRegion& operator=(const KeyNotInRegion& from) { CopyFrom(from); return *this; } - inline ServerIsBusy& operator=(ServerIsBusy&& from) noexcept { + inline KeyNotInRegion& operator=(KeyNotInRegion&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -949,160 +1009,226 @@ class ServerIsBusy final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ServerIsBusy& default_instance() { + static const KeyNotInRegion& default_instance() { return *internal_default_instance(); } - static inline const ServerIsBusy* internal_default_instance() { - return reinterpret_cast( - &_ServerIsBusy_default_instance_); + static inline const KeyNotInRegion* internal_default_instance() { + return reinterpret_cast( + &_KeyNotInRegion_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 3; - friend void swap(ServerIsBusy& a, ServerIsBusy& b) { + friend void swap(KeyNotInRegion& a, KeyNotInRegion& b) { a.Swap(&b); } - inline void Swap(ServerIsBusy* other) { + inline void Swap(KeyNotInRegion* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ServerIsBusy* other) { + void UnsafeArenaSwap(KeyNotInRegion* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - ServerIsBusy* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + KeyNotInRegion* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ServerIsBusy& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ServerIsBusy& from) { - ServerIsBusy::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const KeyNotInRegion& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const KeyNotInRegion& from) { + KeyNotInRegion::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ServerIsBusy* other); + void InternalSwap(KeyNotInRegion* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.ServerIsBusy"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.KeyNotInRegion"; } protected: - explicit ServerIsBusy(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit KeyNotInRegion(::google::protobuf::Arena* arena); + KeyNotInRegion(::google::protobuf::Arena* arena, const KeyNotInRegion& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kReasonFieldNumber = 1, - kBackoffMsFieldNumber = 2, + kKeyFieldNumber = 1, + kStartKeyFieldNumber = 3, + kEndKeyFieldNumber = 4, + kRegionIdFieldNumber = 2, }; - // string reason = 1; - void clear_reason(); - const std::string& reason() const; - template - void set_reason(ArgT0&& arg0, ArgT... args); - std::string* mutable_reason(); - PROTOBUF_NODISCARD std::string* release_reason(); - void set_allocated_reason(std::string* reason); + // bytes key = 1; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); + private: - const std::string& _internal_reason() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_reason(const std::string& value); - std::string* _internal_mutable_reason(); + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); + public: + // bytes start_key = 3; + void clear_start_key() ; + const std::string& start_key() const; + template + void set_start_key(Arg_&& arg, Args_... args); + std::string* mutable_start_key(); + PROTOBUF_NODISCARD std::string* release_start_key(); + void set_allocated_start_key(std::string* value); - // uint64 backoff_ms = 2; - void clear_backoff_ms(); - uint64_t backoff_ms() const; - void set_backoff_ms(uint64_t value); private: - uint64_t _internal_backoff_ms() const; - void _internal_set_backoff_ms(uint64_t value); + const std::string& _internal_start_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key( + const std::string& value); + std::string* _internal_mutable_start_key(); + public: + // bytes end_key = 4; + void clear_end_key() ; + const std::string& end_key() const; + template + void set_end_key(Arg_&& arg, Args_... args); + std::string* mutable_end_key(); + PROTOBUF_NODISCARD std::string* release_end_key(); + void set_allocated_end_key(std::string* value); - // @@protoc_insertion_point(class_scope:errorpb.ServerIsBusy) + private: + const std::string& _internal_end_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key( + const std::string& value); + std::string* _internal_mutable_end_key(); + + public: + // uint64 region_id = 2; + void clear_region_id() ; + ::uint64_t region_id() const; + void set_region_id(::uint64_t value); + + private: + ::uint64_t _internal_region_id() const; + void _internal_set_region_id(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:errorpb.KeyNotInRegion) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reason_; - uint64_t backoff_ms_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr start_key_; + ::google::protobuf::internal::ArenaStringPtr end_key_; + ::uint64_t region_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class StaleCommand final : - public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:errorpb.StaleCommand) */ { +class NotLeader final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.NotLeader) */ { public: - inline StaleCommand() : StaleCommand(nullptr) {} - explicit PROTOBUF_CONSTEXPR StaleCommand(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline NotLeader() : NotLeader(nullptr) {} + ~NotLeader() override; + template + explicit PROTOBUF_CONSTEXPR NotLeader(::google::protobuf::internal::ConstantInitialized); - StaleCommand(const StaleCommand& from); - StaleCommand(StaleCommand&& from) noexcept - : StaleCommand() { + inline NotLeader(const NotLeader& from) + : NotLeader(nullptr, from) {} + NotLeader(NotLeader&& from) noexcept + : NotLeader() { *this = ::std::move(from); } - inline StaleCommand& operator=(const StaleCommand& from) { + inline NotLeader& operator=(const NotLeader& from) { CopyFrom(from); return *this; } - inline StaleCommand& operator=(StaleCommand&& from) noexcept { + inline NotLeader& operator=(NotLeader&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1112,116 +1238,190 @@ class StaleCommand final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const StaleCommand& default_instance() { + static const NotLeader& default_instance() { return *internal_default_instance(); } - static inline const StaleCommand* internal_default_instance() { - return reinterpret_cast( - &_StaleCommand_default_instance_); + static inline const NotLeader* internal_default_instance() { + return reinterpret_cast( + &_NotLeader_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 0; - friend void swap(StaleCommand& a, StaleCommand& b) { + friend void swap(NotLeader& a, NotLeader& b) { a.Swap(&b); } - inline void Swap(StaleCommand* other) { + inline void Swap(NotLeader* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(StaleCommand* other) { + void UnsafeArenaSwap(NotLeader* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - StaleCommand* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const StaleCommand& from) { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); + NotLeader* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const StaleCommand& from) { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const NotLeader& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const NotLeader& from) { + NotLeader::MergeImpl(*this, from); } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.StaleCommand"; + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(NotLeader* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.NotLeader"; } protected: - explicit StaleCommand(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit NotLeader(::google::protobuf::Arena* arena); + NotLeader(::google::protobuf::Arena* arena, const NotLeader& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:errorpb.StaleCommand) + enum : int { + kLeaderFieldNumber = 2, + kRegionIdFieldNumber = 1, + }; + // .metapb.Peer leader = 2; + bool has_leader() const; + void clear_leader() ; + const ::metapb::Peer& leader() const; + PROTOBUF_NODISCARD ::metapb::Peer* release_leader(); + ::metapb::Peer* mutable_leader(); + void set_allocated_leader(::metapb::Peer* value); + void unsafe_arena_set_allocated_leader(::metapb::Peer* value); + ::metapb::Peer* unsafe_arena_release_leader(); + + private: + const ::metapb::Peer& _internal_leader() const; + ::metapb::Peer* _internal_mutable_leader(); + + public: + // uint64 region_id = 1; + void clear_region_id() ; + ::uint64_t region_id() const; + void set_region_id(::uint64_t value); + + private: + ::uint64_t _internal_region_id() const; + void _internal_set_region_id(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:errorpb.NotLeader) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::metapb::Peer* leader_; + ::uint64_t region_id_; + PROTOBUF_TSAN_DECLARE_MEMBER }; + union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RaftEntryTooLarge final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.RaftEntryTooLarge) */ { +class EpochNotMatch final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.EpochNotMatch) */ { public: - inline RaftEntryTooLarge() : RaftEntryTooLarge(nullptr) {} - ~RaftEntryTooLarge() override; - explicit PROTOBUF_CONSTEXPR RaftEntryTooLarge(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline EpochNotMatch() : EpochNotMatch(nullptr) {} + ~EpochNotMatch() override; + template + explicit PROTOBUF_CONSTEXPR EpochNotMatch(::google::protobuf::internal::ConstantInitialized); - RaftEntryTooLarge(const RaftEntryTooLarge& from); - RaftEntryTooLarge(RaftEntryTooLarge&& from) noexcept - : RaftEntryTooLarge() { + inline EpochNotMatch(const EpochNotMatch& from) + : EpochNotMatch(nullptr, from) {} + EpochNotMatch(EpochNotMatch&& from) noexcept + : EpochNotMatch() { *this = ::std::move(from); } - inline RaftEntryTooLarge& operator=(const RaftEntryTooLarge& from) { + inline EpochNotMatch& operator=(const EpochNotMatch& from) { CopyFrom(from); return *this; } - inline RaftEntryTooLarge& operator=(RaftEntryTooLarge&& from) noexcept { + inline EpochNotMatch& operator=(EpochNotMatch&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1231,142 +1431,166 @@ class RaftEntryTooLarge final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RaftEntryTooLarge& default_instance() { + static const EpochNotMatch& default_instance() { return *internal_default_instance(); } - static inline const RaftEntryTooLarge* internal_default_instance() { - return reinterpret_cast( - &_RaftEntryTooLarge_default_instance_); + static inline const EpochNotMatch* internal_default_instance() { + return reinterpret_cast( + &_EpochNotMatch_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 4; - friend void swap(RaftEntryTooLarge& a, RaftEntryTooLarge& b) { + friend void swap(EpochNotMatch& a, EpochNotMatch& b) { a.Swap(&b); } - inline void Swap(RaftEntryTooLarge* other) { + inline void Swap(EpochNotMatch* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RaftEntryTooLarge* other) { + void UnsafeArenaSwap(EpochNotMatch* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RaftEntryTooLarge* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + EpochNotMatch* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RaftEntryTooLarge& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RaftEntryTooLarge& from) { - RaftEntryTooLarge::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const EpochNotMatch& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const EpochNotMatch& from) { + EpochNotMatch::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RaftEntryTooLarge* other); + void InternalSwap(EpochNotMatch* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "errorpb.RaftEntryTooLarge"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "errorpb.EpochNotMatch"; } protected: - explicit RaftEntryTooLarge(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit EpochNotMatch(::google::protobuf::Arena* arena); + EpochNotMatch(::google::protobuf::Arena* arena, const EpochNotMatch& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kRegionIdFieldNumber = 1, - kEntrySizeFieldNumber = 2, + kCurrentRegionsFieldNumber = 1, }; - // uint64 region_id = 1; - void clear_region_id(); - uint64_t region_id() const; - void set_region_id(uint64_t value); + // repeated .metapb.Region current_regions = 1; + int current_regions_size() const; private: - uint64_t _internal_region_id() const; - void _internal_set_region_id(uint64_t value); - public: + int _internal_current_regions_size() const; - // uint64 entry_size = 2; - void clear_entry_size(); - uint64_t entry_size() const; - void set_entry_size(uint64_t value); + public: + void clear_current_regions() ; + ::metapb::Region* mutable_current_regions(int index); + ::google::protobuf::RepeatedPtrField< ::metapb::Region >* + mutable_current_regions(); private: - uint64_t _internal_entry_size() const; - void _internal_set_entry_size(uint64_t value); + const ::google::protobuf::RepeatedPtrField<::metapb::Region>& _internal_current_regions() const; + ::google::protobuf::RepeatedPtrField<::metapb::Region>* _internal_mutable_current_regions(); public: - - // @@protoc_insertion_point(class_scope:errorpb.RaftEntryTooLarge) + const ::metapb::Region& current_regions(int index) const; + ::metapb::Region* add_current_regions(); + const ::google::protobuf::RepeatedPtrField< ::metapb::Region >& + current_regions() const; + // @@protoc_insertion_point(class_scope:errorpb.EpochNotMatch) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - uint64_t region_id_; - uint64_t entry_size_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::RepeatedPtrField< ::metapb::Region > current_regions_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- class Error final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:errorpb.Error) */ { + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:errorpb.Error) */ { public: inline Error() : Error(nullptr) {} ~Error() override; - explicit PROTOBUF_CONSTEXPR Error(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + template + explicit PROTOBUF_CONSTEXPR Error(::google::protobuf::internal::ConstantInitialized); - Error(const Error& from); + inline Error(const Error& from) + : Error(nullptr, from) {} Error(Error&& from) noexcept : Error() { *this = ::std::move(from); @@ -1378,9 +1602,9 @@ class Error final : } inline Error& operator=(Error&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1390,13 +1614,22 @@ class Error final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const Error& default_instance() { @@ -1415,65 +1648,65 @@ class Error final : inline void Swap(Error* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(Error* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Error* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + Error* New(::google::protobuf::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + using ::google::protobuf::Message::CopyFrom; void CopyFrom(const Error& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + using ::google::protobuf::Message::MergeFrom; void MergeFrom( const Error& from) { Error::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; void InternalSwap(Error* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "errorpb.Error"; } protected: - explicit Error(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Error(::google::protobuf::Arena* arena); + Error(::google::protobuf::Arena* arena, const Error& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1491,172 +1724,167 @@ class Error final : kRaftEntryTooLargeFieldNumber = 9, }; // string message = 1; - void clear_message(); + void clear_message() ; const std::string& message() const; - template - void set_message(ArgT0&& arg0, ArgT... args); + template + void set_message(Arg_&& arg, Args_... args); std::string* mutable_message(); PROTOBUF_NODISCARD std::string* release_message(); - void set_allocated_message(std::string* message); + void set_allocated_message(std::string* value); + private: const std::string& _internal_message() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_message(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message( + const std::string& value); std::string* _internal_mutable_message(); - public: + public: // .errorpb.NotLeader not_leader = 2; bool has_not_leader() const; - private: - bool _internal_has_not_leader() const; - public: - void clear_not_leader(); + void clear_not_leader() ; const ::errorpb::NotLeader& not_leader() const; PROTOBUF_NODISCARD ::errorpb::NotLeader* release_not_leader(); ::errorpb::NotLeader* mutable_not_leader(); - void set_allocated_not_leader(::errorpb::NotLeader* not_leader); + void set_allocated_not_leader(::errorpb::NotLeader* value); + void unsafe_arena_set_allocated_not_leader(::errorpb::NotLeader* value); + ::errorpb::NotLeader* unsafe_arena_release_not_leader(); + private: const ::errorpb::NotLeader& _internal_not_leader() const; ::errorpb::NotLeader* _internal_mutable_not_leader(); - public: - void unsafe_arena_set_allocated_not_leader( - ::errorpb::NotLeader* not_leader); - ::errorpb::NotLeader* unsafe_arena_release_not_leader(); + public: // .errorpb.RegionNotFound region_not_found = 3; bool has_region_not_found() const; - private: - bool _internal_has_region_not_found() const; - public: - void clear_region_not_found(); + void clear_region_not_found() ; const ::errorpb::RegionNotFound& region_not_found() const; PROTOBUF_NODISCARD ::errorpb::RegionNotFound* release_region_not_found(); ::errorpb::RegionNotFound* mutable_region_not_found(); - void set_allocated_region_not_found(::errorpb::RegionNotFound* region_not_found); + void set_allocated_region_not_found(::errorpb::RegionNotFound* value); + void unsafe_arena_set_allocated_region_not_found(::errorpb::RegionNotFound* value); + ::errorpb::RegionNotFound* unsafe_arena_release_region_not_found(); + private: const ::errorpb::RegionNotFound& _internal_region_not_found() const; ::errorpb::RegionNotFound* _internal_mutable_region_not_found(); - public: - void unsafe_arena_set_allocated_region_not_found( - ::errorpb::RegionNotFound* region_not_found); - ::errorpb::RegionNotFound* unsafe_arena_release_region_not_found(); + public: // .errorpb.KeyNotInRegion key_not_in_region = 4; bool has_key_not_in_region() const; - private: - bool _internal_has_key_not_in_region() const; - public: - void clear_key_not_in_region(); + void clear_key_not_in_region() ; const ::errorpb::KeyNotInRegion& key_not_in_region() const; PROTOBUF_NODISCARD ::errorpb::KeyNotInRegion* release_key_not_in_region(); ::errorpb::KeyNotInRegion* mutable_key_not_in_region(); - void set_allocated_key_not_in_region(::errorpb::KeyNotInRegion* key_not_in_region); + void set_allocated_key_not_in_region(::errorpb::KeyNotInRegion* value); + void unsafe_arena_set_allocated_key_not_in_region(::errorpb::KeyNotInRegion* value); + ::errorpb::KeyNotInRegion* unsafe_arena_release_key_not_in_region(); + private: const ::errorpb::KeyNotInRegion& _internal_key_not_in_region() const; ::errorpb::KeyNotInRegion* _internal_mutable_key_not_in_region(); - public: - void unsafe_arena_set_allocated_key_not_in_region( - ::errorpb::KeyNotInRegion* key_not_in_region); - ::errorpb::KeyNotInRegion* unsafe_arena_release_key_not_in_region(); + public: // .errorpb.EpochNotMatch epoch_not_match = 5; bool has_epoch_not_match() const; - private: - bool _internal_has_epoch_not_match() const; - public: - void clear_epoch_not_match(); + void clear_epoch_not_match() ; const ::errorpb::EpochNotMatch& epoch_not_match() const; PROTOBUF_NODISCARD ::errorpb::EpochNotMatch* release_epoch_not_match(); ::errorpb::EpochNotMatch* mutable_epoch_not_match(); - void set_allocated_epoch_not_match(::errorpb::EpochNotMatch* epoch_not_match); + void set_allocated_epoch_not_match(::errorpb::EpochNotMatch* value); + void unsafe_arena_set_allocated_epoch_not_match(::errorpb::EpochNotMatch* value); + ::errorpb::EpochNotMatch* unsafe_arena_release_epoch_not_match(); + private: const ::errorpb::EpochNotMatch& _internal_epoch_not_match() const; ::errorpb::EpochNotMatch* _internal_mutable_epoch_not_match(); - public: - void unsafe_arena_set_allocated_epoch_not_match( - ::errorpb::EpochNotMatch* epoch_not_match); - ::errorpb::EpochNotMatch* unsafe_arena_release_epoch_not_match(); + public: // .errorpb.ServerIsBusy server_is_busy = 6; bool has_server_is_busy() const; - private: - bool _internal_has_server_is_busy() const; - public: - void clear_server_is_busy(); + void clear_server_is_busy() ; const ::errorpb::ServerIsBusy& server_is_busy() const; PROTOBUF_NODISCARD ::errorpb::ServerIsBusy* release_server_is_busy(); ::errorpb::ServerIsBusy* mutable_server_is_busy(); - void set_allocated_server_is_busy(::errorpb::ServerIsBusy* server_is_busy); + void set_allocated_server_is_busy(::errorpb::ServerIsBusy* value); + void unsafe_arena_set_allocated_server_is_busy(::errorpb::ServerIsBusy* value); + ::errorpb::ServerIsBusy* unsafe_arena_release_server_is_busy(); + private: const ::errorpb::ServerIsBusy& _internal_server_is_busy() const; ::errorpb::ServerIsBusy* _internal_mutable_server_is_busy(); - public: - void unsafe_arena_set_allocated_server_is_busy( - ::errorpb::ServerIsBusy* server_is_busy); - ::errorpb::ServerIsBusy* unsafe_arena_release_server_is_busy(); + public: // .errorpb.StaleCommand stale_command = 7; bool has_stale_command() const; - private: - bool _internal_has_stale_command() const; - public: - void clear_stale_command(); + void clear_stale_command() ; const ::errorpb::StaleCommand& stale_command() const; PROTOBUF_NODISCARD ::errorpb::StaleCommand* release_stale_command(); ::errorpb::StaleCommand* mutable_stale_command(); - void set_allocated_stale_command(::errorpb::StaleCommand* stale_command); + void set_allocated_stale_command(::errorpb::StaleCommand* value); + void unsafe_arena_set_allocated_stale_command(::errorpb::StaleCommand* value); + ::errorpb::StaleCommand* unsafe_arena_release_stale_command(); + private: const ::errorpb::StaleCommand& _internal_stale_command() const; ::errorpb::StaleCommand* _internal_mutable_stale_command(); - public: - void unsafe_arena_set_allocated_stale_command( - ::errorpb::StaleCommand* stale_command); - ::errorpb::StaleCommand* unsafe_arena_release_stale_command(); + public: // .errorpb.StoreNotMatch store_not_match = 8; bool has_store_not_match() const; - private: - bool _internal_has_store_not_match() const; - public: - void clear_store_not_match(); + void clear_store_not_match() ; const ::errorpb::StoreNotMatch& store_not_match() const; PROTOBUF_NODISCARD ::errorpb::StoreNotMatch* release_store_not_match(); ::errorpb::StoreNotMatch* mutable_store_not_match(); - void set_allocated_store_not_match(::errorpb::StoreNotMatch* store_not_match); + void set_allocated_store_not_match(::errorpb::StoreNotMatch* value); + void unsafe_arena_set_allocated_store_not_match(::errorpb::StoreNotMatch* value); + ::errorpb::StoreNotMatch* unsafe_arena_release_store_not_match(); + private: const ::errorpb::StoreNotMatch& _internal_store_not_match() const; ::errorpb::StoreNotMatch* _internal_mutable_store_not_match(); - public: - void unsafe_arena_set_allocated_store_not_match( - ::errorpb::StoreNotMatch* store_not_match); - ::errorpb::StoreNotMatch* unsafe_arena_release_store_not_match(); + public: // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; bool has_raft_entry_too_large() const; - private: - bool _internal_has_raft_entry_too_large() const; - public: - void clear_raft_entry_too_large(); + void clear_raft_entry_too_large() ; const ::errorpb::RaftEntryTooLarge& raft_entry_too_large() const; PROTOBUF_NODISCARD ::errorpb::RaftEntryTooLarge* release_raft_entry_too_large(); ::errorpb::RaftEntryTooLarge* mutable_raft_entry_too_large(); - void set_allocated_raft_entry_too_large(::errorpb::RaftEntryTooLarge* raft_entry_too_large); + void set_allocated_raft_entry_too_large(::errorpb::RaftEntryTooLarge* value); + void unsafe_arena_set_allocated_raft_entry_too_large(::errorpb::RaftEntryTooLarge* value); + ::errorpb::RaftEntryTooLarge* unsafe_arena_release_raft_entry_too_large(); + private: const ::errorpb::RaftEntryTooLarge& _internal_raft_entry_too_large() const; ::errorpb::RaftEntryTooLarge* _internal_mutable_raft_entry_too_large(); - public: - void unsafe_arena_set_allocated_raft_entry_too_large( - ::errorpb::RaftEntryTooLarge* raft_entry_too_large); - ::errorpb::RaftEntryTooLarge* unsafe_arena_release_raft_entry_too_large(); + public: // @@protoc_insertion_point(class_scope:errorpb.Error) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 9, 8, + 37, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr message_; ::errorpb::NotLeader* not_leader_; ::errorpb::RegionNotFound* region_not_found_; ::errorpb::KeyNotInRegion* key_not_in_region_; @@ -1665,124 +1893,139 @@ class Error final : ::errorpb::StaleCommand* stale_command_; ::errorpb::StoreNotMatch* store_not_match_; ::errorpb::RaftEntryTooLarge* raft_entry_too_large_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_errorpb_2eproto; }; + // =================================================================== + + // =================================================================== + #ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ +// ------------------------------------------------------------------- + // NotLeader // uint64 region_id = 1; inline void NotLeader::clear_region_id() { - _impl_.region_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.region_id_ = ::uint64_t{0u}; } -inline uint64_t NotLeader::_internal_region_id() const { - return _impl_.region_id_; -} -inline uint64_t NotLeader::region_id() const { +inline ::uint64_t NotLeader::region_id() const { // @@protoc_insertion_point(field_get:errorpb.NotLeader.region_id) return _internal_region_id(); } -inline void NotLeader::_internal_set_region_id(uint64_t value) { - - _impl_.region_id_ = value; -} -inline void NotLeader::set_region_id(uint64_t value) { +inline void NotLeader::set_region_id(::uint64_t value) { _internal_set_region_id(value); // @@protoc_insertion_point(field_set:errorpb.NotLeader.region_id) } +inline ::uint64_t NotLeader::_internal_region_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.region_id_; +} +inline void NotLeader::_internal_set_region_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.region_id_ = value; +} // .metapb.Peer leader = 2; -inline bool NotLeader::_internal_has_leader() const { - return this != internal_default_instance() && _impl_.leader_ != nullptr; -} inline bool NotLeader::has_leader() const { - return _internal_has_leader(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.leader_ != nullptr); + return value; } inline const ::metapb::Peer& NotLeader::_internal_leader() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::metapb::Peer* p = _impl_.leader_; - return p != nullptr ? *p : reinterpret_cast( - ::metapb::_Peer_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::metapb::_Peer_default_instance_); } -inline const ::metapb::Peer& NotLeader::leader() const { +inline const ::metapb::Peer& NotLeader::leader() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.NotLeader.leader) return _internal_leader(); } -inline void NotLeader::unsafe_arena_set_allocated_leader( - ::metapb::Peer* leader) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.leader_); +inline void NotLeader::unsafe_arena_set_allocated_leader(::metapb::Peer* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.leader_); } - _impl_.leader_ = leader; - if (leader) { - + _impl_.leader_ = reinterpret_cast<::metapb::Peer*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.NotLeader.leader) } inline ::metapb::Peer* NotLeader::release_leader() { - - ::metapb::Peer* temp = _impl_.leader_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::metapb::Peer* released = _impl_.leader_; _impl_.leader_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::metapb::Peer* NotLeader::unsafe_arena_release_leader() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.NotLeader.leader) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::metapb::Peer* temp = _impl_.leader_; _impl_.leader_ = nullptr; return temp; } inline ::metapb::Peer* NotLeader::_internal_mutable_leader() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.leader_ == nullptr) { - auto* p = CreateMaybeMessage<::metapb::Peer>(GetArenaForAllocation()); - _impl_.leader_ = p; + auto* p = CreateMaybeMessage<::metapb::Peer>(GetArena()); + _impl_.leader_ = reinterpret_cast<::metapb::Peer*>(p); } return _impl_.leader_; } -inline ::metapb::Peer* NotLeader::mutable_leader() { +inline ::metapb::Peer* NotLeader::mutable_leader() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::metapb::Peer* _msg = _internal_mutable_leader(); // @@protoc_insertion_point(field_mutable:errorpb.NotLeader.leader) return _msg; } -inline void NotLeader::set_allocated_leader(::metapb::Peer* leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void NotLeader::set_allocated_leader(::metapb::Peer* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.leader_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.leader_); } - if (leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(leader)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - leader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, leader, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.leader_ = leader; + + _impl_.leader_ = reinterpret_cast<::metapb::Peer*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.NotLeader.leader) } @@ -1792,43 +2035,49 @@ inline void NotLeader::set_allocated_leader(::metapb::Peer* leader) { // uint64 request_store_id = 1; inline void StoreNotMatch::clear_request_store_id() { - _impl_.request_store_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.request_store_id_ = ::uint64_t{0u}; } -inline uint64_t StoreNotMatch::_internal_request_store_id() const { - return _impl_.request_store_id_; -} -inline uint64_t StoreNotMatch::request_store_id() const { +inline ::uint64_t StoreNotMatch::request_store_id() const { // @@protoc_insertion_point(field_get:errorpb.StoreNotMatch.request_store_id) return _internal_request_store_id(); } -inline void StoreNotMatch::_internal_set_request_store_id(uint64_t value) { - - _impl_.request_store_id_ = value; -} -inline void StoreNotMatch::set_request_store_id(uint64_t value) { +inline void StoreNotMatch::set_request_store_id(::uint64_t value) { _internal_set_request_store_id(value); // @@protoc_insertion_point(field_set:errorpb.StoreNotMatch.request_store_id) } +inline ::uint64_t StoreNotMatch::_internal_request_store_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.request_store_id_; +} +inline void StoreNotMatch::_internal_set_request_store_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.request_store_id_ = value; +} // uint64 actual_store_id = 2; inline void StoreNotMatch::clear_actual_store_id() { - _impl_.actual_store_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.actual_store_id_ = ::uint64_t{0u}; } -inline uint64_t StoreNotMatch::_internal_actual_store_id() const { - return _impl_.actual_store_id_; -} -inline uint64_t StoreNotMatch::actual_store_id() const { +inline ::uint64_t StoreNotMatch::actual_store_id() const { // @@protoc_insertion_point(field_get:errorpb.StoreNotMatch.actual_store_id) return _internal_actual_store_id(); } -inline void StoreNotMatch::_internal_set_actual_store_id(uint64_t value) { - - _impl_.actual_store_id_ = value; -} -inline void StoreNotMatch::set_actual_store_id(uint64_t value) { +inline void StoreNotMatch::set_actual_store_id(::uint64_t value) { _internal_set_actual_store_id(value); // @@protoc_insertion_point(field_set:errorpb.StoreNotMatch.actual_store_id) } +inline ::uint64_t StoreNotMatch::_internal_actual_store_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.actual_store_id_; +} +inline void StoreNotMatch::_internal_set_actual_store_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.actual_store_id_ = value; +} // ------------------------------------------------------------------- @@ -1836,23 +2085,26 @@ inline void StoreNotMatch::set_actual_store_id(uint64_t value) { // uint64 region_id = 1; inline void RegionNotFound::clear_region_id() { - _impl_.region_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.region_id_ = ::uint64_t{0u}; } -inline uint64_t RegionNotFound::_internal_region_id() const { - return _impl_.region_id_; -} -inline uint64_t RegionNotFound::region_id() const { +inline ::uint64_t RegionNotFound::region_id() const { // @@protoc_insertion_point(field_get:errorpb.RegionNotFound.region_id) return _internal_region_id(); } -inline void RegionNotFound::_internal_set_region_id(uint64_t value) { - - _impl_.region_id_ = value; -} -inline void RegionNotFound::set_region_id(uint64_t value) { +inline void RegionNotFound::set_region_id(::uint64_t value) { _internal_set_region_id(value); // @@protoc_insertion_point(field_set:errorpb.RegionNotFound.region_id) } +inline ::uint64_t RegionNotFound::_internal_region_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.region_id_; +} +inline void RegionNotFound::_internal_set_region_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.region_id_ = value; +} // ------------------------------------------------------------------- @@ -1860,171 +2112,183 @@ inline void RegionNotFound::set_region_id(uint64_t value) { // bytes key = 1; inline void KeyNotInRegion::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_.ClearToEmpty(); } -inline const std::string& KeyNotInRegion::key() const { +inline const std::string& KeyNotInRegion::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.KeyNotInRegion.key) return _internal_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void KeyNotInRegion::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void KeyNotInRegion::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:errorpb.KeyNotInRegion.key) } -inline std::string* KeyNotInRegion::mutable_key() { +inline std::string* KeyNotInRegion::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_key(); // @@protoc_insertion_point(field_mutable:errorpb.KeyNotInRegion.key) return _s; } inline const std::string& KeyNotInRegion::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.key_.Get(); } inline void KeyNotInRegion::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(value, GetArena()); } inline std::string* KeyNotInRegion::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.key_.Mutable( GetArena()); } inline std::string* KeyNotInRegion::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.KeyNotInRegion.key) return _impl_.key_.Release(); } -inline void KeyNotInRegion::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KeyNotInRegion::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:errorpb.KeyNotInRegion.key) } // uint64 region_id = 2; inline void KeyNotInRegion::clear_region_id() { - _impl_.region_id_ = uint64_t{0u}; -} -inline uint64_t KeyNotInRegion::_internal_region_id() const { - return _impl_.region_id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.region_id_ = ::uint64_t{0u}; } -inline uint64_t KeyNotInRegion::region_id() const { +inline ::uint64_t KeyNotInRegion::region_id() const { // @@protoc_insertion_point(field_get:errorpb.KeyNotInRegion.region_id) return _internal_region_id(); } -inline void KeyNotInRegion::_internal_set_region_id(uint64_t value) { - - _impl_.region_id_ = value; -} -inline void KeyNotInRegion::set_region_id(uint64_t value) { +inline void KeyNotInRegion::set_region_id(::uint64_t value) { _internal_set_region_id(value); // @@protoc_insertion_point(field_set:errorpb.KeyNotInRegion.region_id) } +inline ::uint64_t KeyNotInRegion::_internal_region_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.region_id_; +} +inline void KeyNotInRegion::_internal_set_region_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.region_id_ = value; +} // bytes start_key = 3; inline void KeyNotInRegion::clear_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.start_key_.ClearToEmpty(); } -inline const std::string& KeyNotInRegion::start_key() const { +inline const std::string& KeyNotInRegion::start_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.KeyNotInRegion.start_key) return _internal_start_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void KeyNotInRegion::set_start_key(ArgT0&& arg0, ArgT... args) { - - _impl_.start_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void KeyNotInRegion::set_start_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:errorpb.KeyNotInRegion.start_key) } -inline std::string* KeyNotInRegion::mutable_start_key() { +inline std::string* KeyNotInRegion::mutable_start_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_start_key(); // @@protoc_insertion_point(field_mutable:errorpb.KeyNotInRegion.start_key) return _s; } inline const std::string& KeyNotInRegion::_internal_start_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.start_key_.Get(); } inline void KeyNotInRegion::_internal_set_start_key(const std::string& value) { - - _impl_.start_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.Set(value, GetArena()); } inline std::string* KeyNotInRegion::_internal_mutable_start_key() { - - return _impl_.start_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.start_key_.Mutable( GetArena()); } inline std::string* KeyNotInRegion::release_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.KeyNotInRegion.start_key) return _impl_.start_key_.Release(); } -inline void KeyNotInRegion::set_allocated_start_key(std::string* start_key) { - if (start_key != nullptr) { - - } else { - - } - _impl_.start_key_.SetAllocated(start_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.start_key_.IsDefault()) { - _impl_.start_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KeyNotInRegion::set_allocated_start_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.start_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.start_key_.IsDefault()) { + _impl_.start_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:errorpb.KeyNotInRegion.start_key) } // bytes end_key = 4; inline void KeyNotInRegion::clear_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.end_key_.ClearToEmpty(); } -inline const std::string& KeyNotInRegion::end_key() const { +inline const std::string& KeyNotInRegion::end_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.KeyNotInRegion.end_key) return _internal_end_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void KeyNotInRegion::set_end_key(ArgT0&& arg0, ArgT... args) { - - _impl_.end_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void KeyNotInRegion::set_end_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:errorpb.KeyNotInRegion.end_key) } -inline std::string* KeyNotInRegion::mutable_end_key() { +inline std::string* KeyNotInRegion::mutable_end_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_end_key(); // @@protoc_insertion_point(field_mutable:errorpb.KeyNotInRegion.end_key) return _s; } inline const std::string& KeyNotInRegion::_internal_end_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.end_key_.Get(); } inline void KeyNotInRegion::_internal_set_end_key(const std::string& value) { - - _impl_.end_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.Set(value, GetArena()); } inline std::string* KeyNotInRegion::_internal_mutable_end_key() { - - return _impl_.end_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.end_key_.Mutable( GetArena()); } inline std::string* KeyNotInRegion::release_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.KeyNotInRegion.end_key) return _impl_.end_key_.Release(); } -inline void KeyNotInRegion::set_allocated_end_key(std::string* end_key) { - if (end_key != nullptr) { - - } else { - - } - _impl_.end_key_.SetAllocated(end_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.end_key_.IsDefault()) { - _impl_.end_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KeyNotInRegion::set_allocated_end_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.end_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.end_key_.IsDefault()) { + _impl_.end_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:errorpb.KeyNotInRegion.end_key) } @@ -2034,40 +2298,48 @@ inline void KeyNotInRegion::set_allocated_end_key(std::string* end_key) { // repeated .metapb.Region current_regions = 1; inline int EpochNotMatch::_internal_current_regions_size() const { - return _impl_.current_regions_.size(); + return _internal_current_regions().size(); } inline int EpochNotMatch::current_regions_size() const { return _internal_current_regions_size(); } -inline ::metapb::Region* EpochNotMatch::mutable_current_regions(int index) { +inline ::metapb::Region* EpochNotMatch::mutable_current_regions(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:errorpb.EpochNotMatch.current_regions) - return _impl_.current_regions_.Mutable(index); + return _internal_mutable_current_regions()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Region >* -EpochNotMatch::mutable_current_regions() { +inline ::google::protobuf::RepeatedPtrField<::metapb::Region>* EpochNotMatch::mutable_current_regions() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:errorpb.EpochNotMatch.current_regions) - return &_impl_.current_regions_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_current_regions(); } -inline const ::metapb::Region& EpochNotMatch::_internal_current_regions(int index) const { - return _impl_.current_regions_.Get(index); -} -inline const ::metapb::Region& EpochNotMatch::current_regions(int index) const { +inline const ::metapb::Region& EpochNotMatch::current_regions(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.EpochNotMatch.current_regions) - return _internal_current_regions(index); -} -inline ::metapb::Region* EpochNotMatch::_internal_add_current_regions() { - return _impl_.current_regions_.Add(); + return _internal_current_regions().Get(index); } -inline ::metapb::Region* EpochNotMatch::add_current_regions() { - ::metapb::Region* _add = _internal_add_current_regions(); +inline ::metapb::Region* EpochNotMatch::add_current_regions() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::metapb::Region* _add = _internal_mutable_current_regions()->Add(); // @@protoc_insertion_point(field_add:errorpb.EpochNotMatch.current_regions) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Region >& -EpochNotMatch::current_regions() const { +inline const ::google::protobuf::RepeatedPtrField<::metapb::Region>& EpochNotMatch::current_regions() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:errorpb.EpochNotMatch.current_regions) + return _internal_current_regions(); +} +inline const ::google::protobuf::RepeatedPtrField<::metapb::Region>& +EpochNotMatch::_internal_current_regions() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.current_regions_; } +inline ::google::protobuf::RepeatedPtrField<::metapb::Region>* +EpochNotMatch::_internal_mutable_current_regions() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.current_regions_; +} // ------------------------------------------------------------------- @@ -2075,73 +2347,79 @@ EpochNotMatch::current_regions() const { // string reason = 1; inline void ServerIsBusy::clear_reason() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.reason_.ClearToEmpty(); } -inline const std::string& ServerIsBusy::reason() const { +inline const std::string& ServerIsBusy::reason() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.ServerIsBusy.reason) return _internal_reason(); } -template -inline PROTOBUF_ALWAYS_INLINE -void ServerIsBusy::set_reason(ArgT0&& arg0, ArgT... args) { - - _impl_.reason_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void ServerIsBusy::set_reason(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.reason_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:errorpb.ServerIsBusy.reason) } -inline std::string* ServerIsBusy::mutable_reason() { +inline std::string* ServerIsBusy::mutable_reason() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_reason(); // @@protoc_insertion_point(field_mutable:errorpb.ServerIsBusy.reason) return _s; } inline const std::string& ServerIsBusy::_internal_reason() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.reason_.Get(); } inline void ServerIsBusy::_internal_set_reason(const std::string& value) { - - _impl_.reason_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.reason_.Set(value, GetArena()); } inline std::string* ServerIsBusy::_internal_mutable_reason() { - - return _impl_.reason_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.reason_.Mutable( GetArena()); } inline std::string* ServerIsBusy::release_reason() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.ServerIsBusy.reason) return _impl_.reason_.Release(); } -inline void ServerIsBusy::set_allocated_reason(std::string* reason) { - if (reason != nullptr) { - - } else { - - } - _impl_.reason_.SetAllocated(reason, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.reason_.IsDefault()) { - _impl_.reason_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void ServerIsBusy::set_allocated_reason(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.reason_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.reason_.IsDefault()) { + _impl_.reason_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:errorpb.ServerIsBusy.reason) } // uint64 backoff_ms = 2; inline void ServerIsBusy::clear_backoff_ms() { - _impl_.backoff_ms_ = uint64_t{0u}; -} -inline uint64_t ServerIsBusy::_internal_backoff_ms() const { - return _impl_.backoff_ms_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.backoff_ms_ = ::uint64_t{0u}; } -inline uint64_t ServerIsBusy::backoff_ms() const { +inline ::uint64_t ServerIsBusy::backoff_ms() const { // @@protoc_insertion_point(field_get:errorpb.ServerIsBusy.backoff_ms) return _internal_backoff_ms(); } -inline void ServerIsBusy::_internal_set_backoff_ms(uint64_t value) { - - _impl_.backoff_ms_ = value; -} -inline void ServerIsBusy::set_backoff_ms(uint64_t value) { +inline void ServerIsBusy::set_backoff_ms(::uint64_t value) { _internal_set_backoff_ms(value); // @@protoc_insertion_point(field_set:errorpb.ServerIsBusy.backoff_ms) } +inline ::uint64_t ServerIsBusy::_internal_backoff_ms() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.backoff_ms_; +} +inline void ServerIsBusy::_internal_set_backoff_ms(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.backoff_ms_ = value; +} // ------------------------------------------------------------------- @@ -2153,43 +2431,49 @@ inline void ServerIsBusy::set_backoff_ms(uint64_t value) { // uint64 region_id = 1; inline void RaftEntryTooLarge::clear_region_id() { - _impl_.region_id_ = uint64_t{0u}; -} -inline uint64_t RaftEntryTooLarge::_internal_region_id() const { - return _impl_.region_id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.region_id_ = ::uint64_t{0u}; } -inline uint64_t RaftEntryTooLarge::region_id() const { +inline ::uint64_t RaftEntryTooLarge::region_id() const { // @@protoc_insertion_point(field_get:errorpb.RaftEntryTooLarge.region_id) return _internal_region_id(); } -inline void RaftEntryTooLarge::_internal_set_region_id(uint64_t value) { - - _impl_.region_id_ = value; -} -inline void RaftEntryTooLarge::set_region_id(uint64_t value) { +inline void RaftEntryTooLarge::set_region_id(::uint64_t value) { _internal_set_region_id(value); // @@protoc_insertion_point(field_set:errorpb.RaftEntryTooLarge.region_id) } +inline ::uint64_t RaftEntryTooLarge::_internal_region_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.region_id_; +} +inline void RaftEntryTooLarge::_internal_set_region_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.region_id_ = value; +} // uint64 entry_size = 2; inline void RaftEntryTooLarge::clear_entry_size() { - _impl_.entry_size_ = uint64_t{0u}; -} -inline uint64_t RaftEntryTooLarge::_internal_entry_size() const { - return _impl_.entry_size_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.entry_size_ = ::uint64_t{0u}; } -inline uint64_t RaftEntryTooLarge::entry_size() const { +inline ::uint64_t RaftEntryTooLarge::entry_size() const { // @@protoc_insertion_point(field_get:errorpb.RaftEntryTooLarge.entry_size) return _internal_entry_size(); } -inline void RaftEntryTooLarge::_internal_set_entry_size(uint64_t value) { - - _impl_.entry_size_ = value; -} -inline void RaftEntryTooLarge::set_entry_size(uint64_t value) { +inline void RaftEntryTooLarge::set_entry_size(::uint64_t value) { _internal_set_entry_size(value); // @@protoc_insertion_point(field_set:errorpb.RaftEntryTooLarge.entry_size) } +inline ::uint64_t RaftEntryTooLarge::_internal_entry_size() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.entry_size_; +} +inline void RaftEntryTooLarge::_internal_set_entry_size(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.entry_size_ = value; +} // ------------------------------------------------------------------- @@ -2197,799 +2481,835 @@ inline void RaftEntryTooLarge::set_entry_size(uint64_t value) { // string message = 1; inline void Error::clear_message() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.message_.ClearToEmpty(); } -inline const std::string& Error::message() const { +inline const std::string& Error::message() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.message) return _internal_message(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Error::set_message(ArgT0&& arg0, ArgT... args) { - - _impl_.message_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Error::set_message(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.message_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:errorpb.Error.message) } -inline std::string* Error::mutable_message() { +inline std::string* Error::mutable_message() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_message(); // @@protoc_insertion_point(field_mutable:errorpb.Error.message) return _s; } inline const std::string& Error::_internal_message() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.message_.Get(); } inline void Error::_internal_set_message(const std::string& value) { - - _impl_.message_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.message_.Set(value, GetArena()); } inline std::string* Error::_internal_mutable_message() { - - return _impl_.message_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.message_.Mutable( GetArena()); } inline std::string* Error::release_message() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.message) return _impl_.message_.Release(); } -inline void Error::set_allocated_message(std::string* message) { - if (message != nullptr) { - - } else { - - } - _impl_.message_.SetAllocated(message, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.message_.IsDefault()) { - _impl_.message_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Error::set_allocated_message(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.message_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.message_.IsDefault()) { + _impl_.message_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:errorpb.Error.message) } // .errorpb.NotLeader not_leader = 2; -inline bool Error::_internal_has_not_leader() const { - return this != internal_default_instance() && _impl_.not_leader_ != nullptr; -} inline bool Error::has_not_leader() const { - return _internal_has_not_leader(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.not_leader_ != nullptr); + return value; } inline void Error::clear_not_leader() { - if (GetArenaForAllocation() == nullptr && _impl_.not_leader_ != nullptr) { - delete _impl_.not_leader_; - } - _impl_.not_leader_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.not_leader_ != nullptr) _impl_.not_leader_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::errorpb::NotLeader& Error::_internal_not_leader() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::NotLeader* p = _impl_.not_leader_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_NotLeader_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_NotLeader_default_instance_); } -inline const ::errorpb::NotLeader& Error::not_leader() const { +inline const ::errorpb::NotLeader& Error::not_leader() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.not_leader) return _internal_not_leader(); } -inline void Error::unsafe_arena_set_allocated_not_leader( - ::errorpb::NotLeader* not_leader) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.not_leader_); +inline void Error::unsafe_arena_set_allocated_not_leader(::errorpb::NotLeader* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.not_leader_); } - _impl_.not_leader_ = not_leader; - if (not_leader) { - + _impl_.not_leader_ = reinterpret_cast<::errorpb::NotLeader*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.not_leader) } inline ::errorpb::NotLeader* Error::release_not_leader() { - - ::errorpb::NotLeader* temp = _impl_.not_leader_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::NotLeader* released = _impl_.not_leader_; _impl_.not_leader_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::NotLeader* Error::unsafe_arena_release_not_leader() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.not_leader) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::NotLeader* temp = _impl_.not_leader_; _impl_.not_leader_ = nullptr; return temp; } inline ::errorpb::NotLeader* Error::_internal_mutable_not_leader() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.not_leader_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::NotLeader>(GetArenaForAllocation()); - _impl_.not_leader_ = p; + auto* p = CreateMaybeMessage<::errorpb::NotLeader>(GetArena()); + _impl_.not_leader_ = reinterpret_cast<::errorpb::NotLeader*>(p); } return _impl_.not_leader_; } -inline ::errorpb::NotLeader* Error::mutable_not_leader() { +inline ::errorpb::NotLeader* Error::mutable_not_leader() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::NotLeader* _msg = _internal_mutable_not_leader(); // @@protoc_insertion_point(field_mutable:errorpb.Error.not_leader) return _msg; } -inline void Error::set_allocated_not_leader(::errorpb::NotLeader* not_leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_not_leader(::errorpb::NotLeader* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.not_leader_; + delete reinterpret_cast<::errorpb::NotLeader*>(_impl_.not_leader_); } - if (not_leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(not_leader); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::NotLeader*>(value)->GetArena(); if (message_arena != submessage_arena) { - not_leader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, not_leader, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.not_leader_ = not_leader; + + _impl_.not_leader_ = reinterpret_cast<::errorpb::NotLeader*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.not_leader) } // .errorpb.RegionNotFound region_not_found = 3; -inline bool Error::_internal_has_region_not_found() const { - return this != internal_default_instance() && _impl_.region_not_found_ != nullptr; -} inline bool Error::has_region_not_found() const { - return _internal_has_region_not_found(); + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_not_found_ != nullptr); + return value; } inline void Error::clear_region_not_found() { - if (GetArenaForAllocation() == nullptr && _impl_.region_not_found_ != nullptr) { - delete _impl_.region_not_found_; - } - _impl_.region_not_found_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_not_found_ != nullptr) _impl_.region_not_found_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; } inline const ::errorpb::RegionNotFound& Error::_internal_region_not_found() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::RegionNotFound* p = _impl_.region_not_found_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_RegionNotFound_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_RegionNotFound_default_instance_); } -inline const ::errorpb::RegionNotFound& Error::region_not_found() const { +inline const ::errorpb::RegionNotFound& Error::region_not_found() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.region_not_found) return _internal_region_not_found(); } -inline void Error::unsafe_arena_set_allocated_region_not_found( - ::errorpb::RegionNotFound* region_not_found) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_not_found_); +inline void Error::unsafe_arena_set_allocated_region_not_found(::errorpb::RegionNotFound* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_not_found_); } - _impl_.region_not_found_ = region_not_found; - if (region_not_found) { - + _impl_.region_not_found_ = reinterpret_cast<::errorpb::RegionNotFound*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.region_not_found) } inline ::errorpb::RegionNotFound* Error::release_region_not_found() { - - ::errorpb::RegionNotFound* temp = _impl_.region_not_found_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::errorpb::RegionNotFound* released = _impl_.region_not_found_; _impl_.region_not_found_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::RegionNotFound* Error::unsafe_arena_release_region_not_found() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.region_not_found) - + + _impl_._has_bits_[0] &= ~0x00000002u; ::errorpb::RegionNotFound* temp = _impl_.region_not_found_; _impl_.region_not_found_ = nullptr; return temp; } inline ::errorpb::RegionNotFound* Error::_internal_mutable_region_not_found() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000002u; if (_impl_.region_not_found_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::RegionNotFound>(GetArenaForAllocation()); - _impl_.region_not_found_ = p; + auto* p = CreateMaybeMessage<::errorpb::RegionNotFound>(GetArena()); + _impl_.region_not_found_ = reinterpret_cast<::errorpb::RegionNotFound*>(p); } return _impl_.region_not_found_; } -inline ::errorpb::RegionNotFound* Error::mutable_region_not_found() { +inline ::errorpb::RegionNotFound* Error::mutable_region_not_found() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::RegionNotFound* _msg = _internal_mutable_region_not_found(); // @@protoc_insertion_point(field_mutable:errorpb.Error.region_not_found) return _msg; } -inline void Error::set_allocated_region_not_found(::errorpb::RegionNotFound* region_not_found) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_region_not_found(::errorpb::RegionNotFound* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.region_not_found_; + delete reinterpret_cast<::errorpb::RegionNotFound*>(_impl_.region_not_found_); } - if (region_not_found) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(region_not_found); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::RegionNotFound*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_not_found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_not_found, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } - _impl_.region_not_found_ = region_not_found; + + _impl_.region_not_found_ = reinterpret_cast<::errorpb::RegionNotFound*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.region_not_found) } // .errorpb.KeyNotInRegion key_not_in_region = 4; -inline bool Error::_internal_has_key_not_in_region() const { - return this != internal_default_instance() && _impl_.key_not_in_region_ != nullptr; -} inline bool Error::has_key_not_in_region() const { - return _internal_has_key_not_in_region(); + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.key_not_in_region_ != nullptr); + return value; } inline void Error::clear_key_not_in_region() { - if (GetArenaForAllocation() == nullptr && _impl_.key_not_in_region_ != nullptr) { - delete _impl_.key_not_in_region_; - } - _impl_.key_not_in_region_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.key_not_in_region_ != nullptr) _impl_.key_not_in_region_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; } inline const ::errorpb::KeyNotInRegion& Error::_internal_key_not_in_region() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::KeyNotInRegion* p = _impl_.key_not_in_region_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_KeyNotInRegion_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_KeyNotInRegion_default_instance_); } -inline const ::errorpb::KeyNotInRegion& Error::key_not_in_region() const { +inline const ::errorpb::KeyNotInRegion& Error::key_not_in_region() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.key_not_in_region) return _internal_key_not_in_region(); } -inline void Error::unsafe_arena_set_allocated_key_not_in_region( - ::errorpb::KeyNotInRegion* key_not_in_region) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.key_not_in_region_); +inline void Error::unsafe_arena_set_allocated_key_not_in_region(::errorpb::KeyNotInRegion* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.key_not_in_region_); } - _impl_.key_not_in_region_ = key_not_in_region; - if (key_not_in_region) { - + _impl_.key_not_in_region_ = reinterpret_cast<::errorpb::KeyNotInRegion*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; } else { - + _impl_._has_bits_[0] &= ~0x00000004u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.key_not_in_region) } inline ::errorpb::KeyNotInRegion* Error::release_key_not_in_region() { - - ::errorpb::KeyNotInRegion* temp = _impl_.key_not_in_region_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000004u; + ::errorpb::KeyNotInRegion* released = _impl_.key_not_in_region_; _impl_.key_not_in_region_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::KeyNotInRegion* Error::unsafe_arena_release_key_not_in_region() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.key_not_in_region) - + + _impl_._has_bits_[0] &= ~0x00000004u; ::errorpb::KeyNotInRegion* temp = _impl_.key_not_in_region_; _impl_.key_not_in_region_ = nullptr; return temp; } inline ::errorpb::KeyNotInRegion* Error::_internal_mutable_key_not_in_region() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000004u; if (_impl_.key_not_in_region_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::KeyNotInRegion>(GetArenaForAllocation()); - _impl_.key_not_in_region_ = p; + auto* p = CreateMaybeMessage<::errorpb::KeyNotInRegion>(GetArena()); + _impl_.key_not_in_region_ = reinterpret_cast<::errorpb::KeyNotInRegion*>(p); } return _impl_.key_not_in_region_; } -inline ::errorpb::KeyNotInRegion* Error::mutable_key_not_in_region() { +inline ::errorpb::KeyNotInRegion* Error::mutable_key_not_in_region() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::KeyNotInRegion* _msg = _internal_mutable_key_not_in_region(); // @@protoc_insertion_point(field_mutable:errorpb.Error.key_not_in_region) return _msg; } -inline void Error::set_allocated_key_not_in_region(::errorpb::KeyNotInRegion* key_not_in_region) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_key_not_in_region(::errorpb::KeyNotInRegion* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.key_not_in_region_; + delete reinterpret_cast<::errorpb::KeyNotInRegion*>(_impl_.key_not_in_region_); } - if (key_not_in_region) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(key_not_in_region); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::KeyNotInRegion*>(value)->GetArena(); if (message_arena != submessage_arena) { - key_not_in_region = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, key_not_in_region, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000004u; } else { - + _impl_._has_bits_[0] &= ~0x00000004u; } - _impl_.key_not_in_region_ = key_not_in_region; + + _impl_.key_not_in_region_ = reinterpret_cast<::errorpb::KeyNotInRegion*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.key_not_in_region) } // .errorpb.EpochNotMatch epoch_not_match = 5; -inline bool Error::_internal_has_epoch_not_match() const { - return this != internal_default_instance() && _impl_.epoch_not_match_ != nullptr; -} inline bool Error::has_epoch_not_match() const { - return _internal_has_epoch_not_match(); + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || _impl_.epoch_not_match_ != nullptr); + return value; } inline void Error::clear_epoch_not_match() { - if (GetArenaForAllocation() == nullptr && _impl_.epoch_not_match_ != nullptr) { - delete _impl_.epoch_not_match_; - } - _impl_.epoch_not_match_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.epoch_not_match_ != nullptr) _impl_.epoch_not_match_->Clear(); + _impl_._has_bits_[0] &= ~0x00000008u; } inline const ::errorpb::EpochNotMatch& Error::_internal_epoch_not_match() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::EpochNotMatch* p = _impl_.epoch_not_match_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_EpochNotMatch_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_EpochNotMatch_default_instance_); } -inline const ::errorpb::EpochNotMatch& Error::epoch_not_match() const { +inline const ::errorpb::EpochNotMatch& Error::epoch_not_match() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.epoch_not_match) return _internal_epoch_not_match(); } -inline void Error::unsafe_arena_set_allocated_epoch_not_match( - ::errorpb::EpochNotMatch* epoch_not_match) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.epoch_not_match_); +inline void Error::unsafe_arena_set_allocated_epoch_not_match(::errorpb::EpochNotMatch* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.epoch_not_match_); } - _impl_.epoch_not_match_ = epoch_not_match; - if (epoch_not_match) { - + _impl_.epoch_not_match_ = reinterpret_cast<::errorpb::EpochNotMatch*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000008u; } else { - + _impl_._has_bits_[0] &= ~0x00000008u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.epoch_not_match) } inline ::errorpb::EpochNotMatch* Error::release_epoch_not_match() { - - ::errorpb::EpochNotMatch* temp = _impl_.epoch_not_match_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000008u; + ::errorpb::EpochNotMatch* released = _impl_.epoch_not_match_; _impl_.epoch_not_match_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::EpochNotMatch* Error::unsafe_arena_release_epoch_not_match() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.epoch_not_match) - + + _impl_._has_bits_[0] &= ~0x00000008u; ::errorpb::EpochNotMatch* temp = _impl_.epoch_not_match_; _impl_.epoch_not_match_ = nullptr; return temp; } inline ::errorpb::EpochNotMatch* Error::_internal_mutable_epoch_not_match() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000008u; if (_impl_.epoch_not_match_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::EpochNotMatch>(GetArenaForAllocation()); - _impl_.epoch_not_match_ = p; + auto* p = CreateMaybeMessage<::errorpb::EpochNotMatch>(GetArena()); + _impl_.epoch_not_match_ = reinterpret_cast<::errorpb::EpochNotMatch*>(p); } return _impl_.epoch_not_match_; } -inline ::errorpb::EpochNotMatch* Error::mutable_epoch_not_match() { +inline ::errorpb::EpochNotMatch* Error::mutable_epoch_not_match() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::EpochNotMatch* _msg = _internal_mutable_epoch_not_match(); // @@protoc_insertion_point(field_mutable:errorpb.Error.epoch_not_match) return _msg; } -inline void Error::set_allocated_epoch_not_match(::errorpb::EpochNotMatch* epoch_not_match) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_epoch_not_match(::errorpb::EpochNotMatch* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.epoch_not_match_; + delete reinterpret_cast<::errorpb::EpochNotMatch*>(_impl_.epoch_not_match_); } - if (epoch_not_match) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(epoch_not_match); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::EpochNotMatch*>(value)->GetArena(); if (message_arena != submessage_arena) { - epoch_not_match = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, epoch_not_match, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000008u; } else { - + _impl_._has_bits_[0] &= ~0x00000008u; } - _impl_.epoch_not_match_ = epoch_not_match; + + _impl_.epoch_not_match_ = reinterpret_cast<::errorpb::EpochNotMatch*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.epoch_not_match) } // .errorpb.ServerIsBusy server_is_busy = 6; -inline bool Error::_internal_has_server_is_busy() const { - return this != internal_default_instance() && _impl_.server_is_busy_ != nullptr; -} inline bool Error::has_server_is_busy() const { - return _internal_has_server_is_busy(); + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || _impl_.server_is_busy_ != nullptr); + return value; } inline void Error::clear_server_is_busy() { - if (GetArenaForAllocation() == nullptr && _impl_.server_is_busy_ != nullptr) { - delete _impl_.server_is_busy_; - } - _impl_.server_is_busy_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.server_is_busy_ != nullptr) _impl_.server_is_busy_->Clear(); + _impl_._has_bits_[0] &= ~0x00000010u; } inline const ::errorpb::ServerIsBusy& Error::_internal_server_is_busy() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::ServerIsBusy* p = _impl_.server_is_busy_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_ServerIsBusy_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_ServerIsBusy_default_instance_); } -inline const ::errorpb::ServerIsBusy& Error::server_is_busy() const { +inline const ::errorpb::ServerIsBusy& Error::server_is_busy() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.server_is_busy) return _internal_server_is_busy(); } -inline void Error::unsafe_arena_set_allocated_server_is_busy( - ::errorpb::ServerIsBusy* server_is_busy) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.server_is_busy_); +inline void Error::unsafe_arena_set_allocated_server_is_busy(::errorpb::ServerIsBusy* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.server_is_busy_); } - _impl_.server_is_busy_ = server_is_busy; - if (server_is_busy) { - + _impl_.server_is_busy_ = reinterpret_cast<::errorpb::ServerIsBusy*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000010u; } else { - + _impl_._has_bits_[0] &= ~0x00000010u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.server_is_busy) } inline ::errorpb::ServerIsBusy* Error::release_server_is_busy() { - - ::errorpb::ServerIsBusy* temp = _impl_.server_is_busy_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000010u; + ::errorpb::ServerIsBusy* released = _impl_.server_is_busy_; _impl_.server_is_busy_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::ServerIsBusy* Error::unsafe_arena_release_server_is_busy() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.server_is_busy) - + + _impl_._has_bits_[0] &= ~0x00000010u; ::errorpb::ServerIsBusy* temp = _impl_.server_is_busy_; _impl_.server_is_busy_ = nullptr; return temp; } inline ::errorpb::ServerIsBusy* Error::_internal_mutable_server_is_busy() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000010u; if (_impl_.server_is_busy_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::ServerIsBusy>(GetArenaForAllocation()); - _impl_.server_is_busy_ = p; + auto* p = CreateMaybeMessage<::errorpb::ServerIsBusy>(GetArena()); + _impl_.server_is_busy_ = reinterpret_cast<::errorpb::ServerIsBusy*>(p); } return _impl_.server_is_busy_; } -inline ::errorpb::ServerIsBusy* Error::mutable_server_is_busy() { +inline ::errorpb::ServerIsBusy* Error::mutable_server_is_busy() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::ServerIsBusy* _msg = _internal_mutable_server_is_busy(); // @@protoc_insertion_point(field_mutable:errorpb.Error.server_is_busy) return _msg; } -inline void Error::set_allocated_server_is_busy(::errorpb::ServerIsBusy* server_is_busy) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_server_is_busy(::errorpb::ServerIsBusy* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.server_is_busy_; + delete reinterpret_cast<::errorpb::ServerIsBusy*>(_impl_.server_is_busy_); } - if (server_is_busy) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(server_is_busy); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::ServerIsBusy*>(value)->GetArena(); if (message_arena != submessage_arena) { - server_is_busy = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, server_is_busy, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000010u; } else { - + _impl_._has_bits_[0] &= ~0x00000010u; } - _impl_.server_is_busy_ = server_is_busy; + + _impl_.server_is_busy_ = reinterpret_cast<::errorpb::ServerIsBusy*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.server_is_busy) } // .errorpb.StaleCommand stale_command = 7; -inline bool Error::_internal_has_stale_command() const { - return this != internal_default_instance() && _impl_.stale_command_ != nullptr; -} inline bool Error::has_stale_command() const { - return _internal_has_stale_command(); + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + PROTOBUF_ASSUME(!value || _impl_.stale_command_ != nullptr); + return value; } inline void Error::clear_stale_command() { - if (GetArenaForAllocation() == nullptr && _impl_.stale_command_ != nullptr) { - delete _impl_.stale_command_; - } - _impl_.stale_command_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.stale_command_ != nullptr) _impl_.stale_command_->Clear(); + _impl_._has_bits_[0] &= ~0x00000020u; } inline const ::errorpb::StaleCommand& Error::_internal_stale_command() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::StaleCommand* p = _impl_.stale_command_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_StaleCommand_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_StaleCommand_default_instance_); } -inline const ::errorpb::StaleCommand& Error::stale_command() const { +inline const ::errorpb::StaleCommand& Error::stale_command() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.stale_command) return _internal_stale_command(); } -inline void Error::unsafe_arena_set_allocated_stale_command( - ::errorpb::StaleCommand* stale_command) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.stale_command_); +inline void Error::unsafe_arena_set_allocated_stale_command(::errorpb::StaleCommand* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.stale_command_); } - _impl_.stale_command_ = stale_command; - if (stale_command) { - + _impl_.stale_command_ = reinterpret_cast<::errorpb::StaleCommand*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000020u; } else { - + _impl_._has_bits_[0] &= ~0x00000020u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.stale_command) } inline ::errorpb::StaleCommand* Error::release_stale_command() { - - ::errorpb::StaleCommand* temp = _impl_.stale_command_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000020u; + ::errorpb::StaleCommand* released = _impl_.stale_command_; _impl_.stale_command_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::StaleCommand* Error::unsafe_arena_release_stale_command() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.stale_command) - + + _impl_._has_bits_[0] &= ~0x00000020u; ::errorpb::StaleCommand* temp = _impl_.stale_command_; _impl_.stale_command_ = nullptr; return temp; } inline ::errorpb::StaleCommand* Error::_internal_mutable_stale_command() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000020u; if (_impl_.stale_command_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::StaleCommand>(GetArenaForAllocation()); - _impl_.stale_command_ = p; + auto* p = CreateMaybeMessage<::errorpb::StaleCommand>(GetArena()); + _impl_.stale_command_ = reinterpret_cast<::errorpb::StaleCommand*>(p); } return _impl_.stale_command_; } -inline ::errorpb::StaleCommand* Error::mutable_stale_command() { +inline ::errorpb::StaleCommand* Error::mutable_stale_command() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::StaleCommand* _msg = _internal_mutable_stale_command(); // @@protoc_insertion_point(field_mutable:errorpb.Error.stale_command) return _msg; } -inline void Error::set_allocated_stale_command(::errorpb::StaleCommand* stale_command) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_stale_command(::errorpb::StaleCommand* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.stale_command_; + delete reinterpret_cast<::errorpb::StaleCommand*>(_impl_.stale_command_); } - if (stale_command) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(stale_command); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::StaleCommand*>(value)->GetArena(); if (message_arena != submessage_arena) { - stale_command = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, stale_command, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000020u; } else { - + _impl_._has_bits_[0] &= ~0x00000020u; } - _impl_.stale_command_ = stale_command; + + _impl_.stale_command_ = reinterpret_cast<::errorpb::StaleCommand*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.stale_command) } // .errorpb.StoreNotMatch store_not_match = 8; -inline bool Error::_internal_has_store_not_match() const { - return this != internal_default_instance() && _impl_.store_not_match_ != nullptr; -} inline bool Error::has_store_not_match() const { - return _internal_has_store_not_match(); + bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; + PROTOBUF_ASSUME(!value || _impl_.store_not_match_ != nullptr); + return value; } inline void Error::clear_store_not_match() { - if (GetArenaForAllocation() == nullptr && _impl_.store_not_match_ != nullptr) { - delete _impl_.store_not_match_; - } - _impl_.store_not_match_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.store_not_match_ != nullptr) _impl_.store_not_match_->Clear(); + _impl_._has_bits_[0] &= ~0x00000040u; } inline const ::errorpb::StoreNotMatch& Error::_internal_store_not_match() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::StoreNotMatch* p = _impl_.store_not_match_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_StoreNotMatch_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_StoreNotMatch_default_instance_); } -inline const ::errorpb::StoreNotMatch& Error::store_not_match() const { +inline const ::errorpb::StoreNotMatch& Error::store_not_match() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.store_not_match) return _internal_store_not_match(); } -inline void Error::unsafe_arena_set_allocated_store_not_match( - ::errorpb::StoreNotMatch* store_not_match) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.store_not_match_); +inline void Error::unsafe_arena_set_allocated_store_not_match(::errorpb::StoreNotMatch* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.store_not_match_); } - _impl_.store_not_match_ = store_not_match; - if (store_not_match) { - + _impl_.store_not_match_ = reinterpret_cast<::errorpb::StoreNotMatch*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000040u; } else { - + _impl_._has_bits_[0] &= ~0x00000040u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.store_not_match) } inline ::errorpb::StoreNotMatch* Error::release_store_not_match() { - - ::errorpb::StoreNotMatch* temp = _impl_.store_not_match_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000040u; + ::errorpb::StoreNotMatch* released = _impl_.store_not_match_; _impl_.store_not_match_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::StoreNotMatch* Error::unsafe_arena_release_store_not_match() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.store_not_match) - + + _impl_._has_bits_[0] &= ~0x00000040u; ::errorpb::StoreNotMatch* temp = _impl_.store_not_match_; _impl_.store_not_match_ = nullptr; return temp; } inline ::errorpb::StoreNotMatch* Error::_internal_mutable_store_not_match() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000040u; if (_impl_.store_not_match_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::StoreNotMatch>(GetArenaForAllocation()); - _impl_.store_not_match_ = p; + auto* p = CreateMaybeMessage<::errorpb::StoreNotMatch>(GetArena()); + _impl_.store_not_match_ = reinterpret_cast<::errorpb::StoreNotMatch*>(p); } return _impl_.store_not_match_; } -inline ::errorpb::StoreNotMatch* Error::mutable_store_not_match() { +inline ::errorpb::StoreNotMatch* Error::mutable_store_not_match() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::StoreNotMatch* _msg = _internal_mutable_store_not_match(); // @@protoc_insertion_point(field_mutable:errorpb.Error.store_not_match) return _msg; } -inline void Error::set_allocated_store_not_match(::errorpb::StoreNotMatch* store_not_match) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_store_not_match(::errorpb::StoreNotMatch* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.store_not_match_; + delete reinterpret_cast<::errorpb::StoreNotMatch*>(_impl_.store_not_match_); } - if (store_not_match) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(store_not_match); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::StoreNotMatch*>(value)->GetArena(); if (message_arena != submessage_arena) { - store_not_match = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, store_not_match, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000040u; } else { - + _impl_._has_bits_[0] &= ~0x00000040u; } - _impl_.store_not_match_ = store_not_match; + + _impl_.store_not_match_ = reinterpret_cast<::errorpb::StoreNotMatch*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.store_not_match) } // .errorpb.RaftEntryTooLarge raft_entry_too_large = 9; -inline bool Error::_internal_has_raft_entry_too_large() const { - return this != internal_default_instance() && _impl_.raft_entry_too_large_ != nullptr; -} inline bool Error::has_raft_entry_too_large() const { - return _internal_has_raft_entry_too_large(); + bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0; + PROTOBUF_ASSUME(!value || _impl_.raft_entry_too_large_ != nullptr); + return value; } inline void Error::clear_raft_entry_too_large() { - if (GetArenaForAllocation() == nullptr && _impl_.raft_entry_too_large_ != nullptr) { - delete _impl_.raft_entry_too_large_; - } - _impl_.raft_entry_too_large_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.raft_entry_too_large_ != nullptr) _impl_.raft_entry_too_large_->Clear(); + _impl_._has_bits_[0] &= ~0x00000080u; } inline const ::errorpb::RaftEntryTooLarge& Error::_internal_raft_entry_too_large() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::RaftEntryTooLarge* p = _impl_.raft_entry_too_large_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_RaftEntryTooLarge_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_RaftEntryTooLarge_default_instance_); } -inline const ::errorpb::RaftEntryTooLarge& Error::raft_entry_too_large() const { +inline const ::errorpb::RaftEntryTooLarge& Error::raft_entry_too_large() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:errorpb.Error.raft_entry_too_large) return _internal_raft_entry_too_large(); } -inline void Error::unsafe_arena_set_allocated_raft_entry_too_large( - ::errorpb::RaftEntryTooLarge* raft_entry_too_large) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.raft_entry_too_large_); +inline void Error::unsafe_arena_set_allocated_raft_entry_too_large(::errorpb::RaftEntryTooLarge* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.raft_entry_too_large_); } - _impl_.raft_entry_too_large_ = raft_entry_too_large; - if (raft_entry_too_large) { - + _impl_.raft_entry_too_large_ = reinterpret_cast<::errorpb::RaftEntryTooLarge*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000080u; } else { - + _impl_._has_bits_[0] &= ~0x00000080u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:errorpb.Error.raft_entry_too_large) } inline ::errorpb::RaftEntryTooLarge* Error::release_raft_entry_too_large() { - - ::errorpb::RaftEntryTooLarge* temp = _impl_.raft_entry_too_large_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000080u; + ::errorpb::RaftEntryTooLarge* released = _impl_.raft_entry_too_large_; _impl_.raft_entry_too_large_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::RaftEntryTooLarge* Error::unsafe_arena_release_raft_entry_too_large() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:errorpb.Error.raft_entry_too_large) - + + _impl_._has_bits_[0] &= ~0x00000080u; ::errorpb::RaftEntryTooLarge* temp = _impl_.raft_entry_too_large_; _impl_.raft_entry_too_large_ = nullptr; return temp; } inline ::errorpb::RaftEntryTooLarge* Error::_internal_mutable_raft_entry_too_large() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000080u; if (_impl_.raft_entry_too_large_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::RaftEntryTooLarge>(GetArenaForAllocation()); - _impl_.raft_entry_too_large_ = p; + auto* p = CreateMaybeMessage<::errorpb::RaftEntryTooLarge>(GetArena()); + _impl_.raft_entry_too_large_ = reinterpret_cast<::errorpb::RaftEntryTooLarge*>(p); } return _impl_.raft_entry_too_large_; } -inline ::errorpb::RaftEntryTooLarge* Error::mutable_raft_entry_too_large() { +inline ::errorpb::RaftEntryTooLarge* Error::mutable_raft_entry_too_large() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::RaftEntryTooLarge* _msg = _internal_mutable_raft_entry_too_large(); // @@protoc_insertion_point(field_mutable:errorpb.Error.raft_entry_too_large) return _msg; } -inline void Error::set_allocated_raft_entry_too_large(::errorpb::RaftEntryTooLarge* raft_entry_too_large) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Error::set_allocated_raft_entry_too_large(::errorpb::RaftEntryTooLarge* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.raft_entry_too_large_; + delete reinterpret_cast<::errorpb::RaftEntryTooLarge*>(_impl_.raft_entry_too_large_); } - if (raft_entry_too_large) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(raft_entry_too_large); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::errorpb::RaftEntryTooLarge*>(value)->GetArena(); if (message_arena != submessage_arena) { - raft_entry_too_large = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, raft_entry_too_large, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000080u; } else { - + _impl_._has_bits_[0] &= ~0x00000080u; } - _impl_.raft_entry_too_large_ = raft_entry_too_large; + + _impl_.raft_entry_too_large_ = reinterpret_cast<::errorpb::RaftEntryTooLarge*>(value); // @@protoc_insertion_point(field_set_allocated:errorpb.Error.raft_entry_too_large) } #ifdef __GNUC__ - #pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) - } // namespace errorpb + // @@protoc_insertion_point(global_scope) -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_errorpb_2eproto +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_errorpb_2eproto_2epb_2eh diff --git a/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.cc b/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.cc index a0fed5227..a98037543 100644 --- a/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.cc +++ b/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.cc @@ -4,1239 +4,1564 @@ #include "kvrpcpb.pb.h" #include - -#include -#include -#include -#include -#include -#include -#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) -#include +// Must be included last. +#include "google/protobuf/port_def.inc" PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace kvrpcpb { -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; +inline constexpr KeyRange::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : start_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + end_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR KeyRange::KeyRange(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct KeyRangeDefaultTypeInternal { + PROTOBUF_CONSTEXPR KeyRangeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~KeyRangeDefaultTypeInternal() {} + union { + KeyRange _instance; + }; +}; -namespace kvrpcpb { -PROTOBUF_CONSTEXPR Context::Context( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.resolved_locks_)*/{} - , /*decltype(_impl_._resolved_locks_cached_byte_size_)*/{0} - , /*decltype(_impl_.resource_group_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.source_stmt_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_epoch_)*/nullptr - , /*decltype(_impl_.peer_)*/nullptr - , /*decltype(_impl_.region_id_)*/uint64_t{0u} - , /*decltype(_impl_.term_)*/uint64_t{0u} - , /*decltype(_impl_.priority_)*/0 - , /*decltype(_impl_.isolation_level_)*/0 - , /*decltype(_impl_.read_quorum_)*/false - , /*decltype(_impl_.not_fill_cache_)*/false - , /*decltype(_impl_.sync_log_)*/false - , /*decltype(_impl_.stale_read_)*/false - , /*decltype(_impl_.replica_read_)*/false - , /*decltype(_impl_.resource_group_tag_)*/uint64_t{0u} - , /*decltype(_impl_.max_execution_duration_ms_)*/uint64_t{0u} - , /*decltype(_impl_.request_source_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyRangeDefaultTypeInternal _KeyRange_default_instance_; + +inline constexpr Context::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + resolved_locks_{}, + _resolved_locks_cached_byte_size_{0}, + resource_group_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + source_stmt_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_epoch_{nullptr}, + peer_{nullptr}, + region_id_{::uint64_t{0u}}, + term_{::uint64_t{0u}}, + priority_{static_cast< ::kvrpcpb::CommandPri >(0)}, + isolation_level_{static_cast< ::kvrpcpb::IsolationLevel >(0)}, + read_quorum_{false}, + not_fill_cache_{false}, + sync_log_{false}, + stale_read_{false}, + replica_read_{false}, + resource_group_tag_{::uint64_t{0u}}, + max_execution_duration_ms_{::uint64_t{0u}}, + request_source_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR Context::Context(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct ContextDefaultTypeInternal { - PROTOBUF_CONSTEXPR ContextDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR ContextDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ContextDefaultTypeInternal() {} union { Context _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContextDefaultTypeInternal _Context_default_instance_; -PROTOBUF_CONSTEXPR KvPair::KvPair( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct KvPairDefaultTypeInternal { - PROTOBUF_CONSTEXPR KvPairDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~KvPairDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContextDefaultTypeInternal _Context_default_instance_; + +inline constexpr RawScanRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + start_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + end_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr}, + limit_{0u}, + key_only_{false}, + reverse_{false} {} + +template +PROTOBUF_CONSTEXPR RawScanRequest::RawScanRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawScanRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawScanRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawScanRequestDefaultTypeInternal() {} union { - KvPair _instance; + RawScanRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawScanRequestDefaultTypeInternal _RawScanRequest_default_instance_; + +inline constexpr RawPutRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr}, + ttl_{::uint64_t{0u}}, + for_cas_{false} {} + +template +PROTOBUF_CONSTEXPR RawPutRequest::RawPutRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawPutRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawPutRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawPutRequestDefaultTypeInternal() {} + union { + RawPutRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KvPairDefaultTypeInternal _KvPair_default_instance_; -PROTOBUF_CONSTEXPR RawGetRequest::RawGetRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawPutRequestDefaultTypeInternal _RawPutRequest_default_instance_; + +inline constexpr RawGetRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawGetRequest::RawGetRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct RawGetRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawGetRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR RawGetRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RawGetRequestDefaultTypeInternal() {} union { RawGetRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawGetRequestDefaultTypeInternal _RawGetRequest_default_instance_; -PROTOBUF_CONSTEXPR RawGetResponse::RawGetResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_.not_found_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawGetResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawGetResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawGetResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawGetRequestDefaultTypeInternal _RawGetRequest_default_instance_; + +inline constexpr RawDeleteRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr}, + for_cas_{false} {} + +template +PROTOBUF_CONSTEXPR RawDeleteRequest::RawDeleteRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawDeleteRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawDeleteRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawDeleteRequestDefaultTypeInternal() {} union { - RawGetResponse _instance; + RawDeleteRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawGetResponseDefaultTypeInternal _RawGetResponse_default_instance_; -PROTOBUF_CONSTEXPR RawBatchGetRequest::RawBatchGetRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.keys_)*/{} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawBatchGetRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawBatchGetRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawBatchGetRequestDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteRequestDefaultTypeInternal _RawDeleteRequest_default_instance_; + +inline constexpr RawDeleteRangeRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + start_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + end_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawDeleteRangeRequest::RawDeleteRangeRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawDeleteRangeRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawDeleteRangeRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawDeleteRangeRequestDefaultTypeInternal() {} union { - RawBatchGetRequest _instance; + RawDeleteRangeRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchGetRequestDefaultTypeInternal _RawBatchGetRequest_default_instance_; -PROTOBUF_CONSTEXPR RawBatchGetResponse::RawBatchGetResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.pairs_)*/{} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawBatchGetResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawBatchGetResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawBatchGetResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteRangeRequestDefaultTypeInternal _RawDeleteRangeRequest_default_instance_; + +inline constexpr RawCoprocessorRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + ranges_{}, + copr_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + copr_version_req_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawCoprocessorRequest::RawCoprocessorRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawCoprocessorRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawCoprocessorRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawCoprocessorRequestDefaultTypeInternal() {} union { - RawBatchGetResponse _instance; + RawCoprocessorRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchGetResponseDefaultTypeInternal _RawBatchGetResponse_default_instance_; -PROTOBUF_CONSTEXPR RawPutRequest::RawPutRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_.ttl_)*/uint64_t{0u} - , /*decltype(_impl_.for_cas_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawPutRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawPutRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawPutRequestDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCoprocessorRequestDefaultTypeInternal _RawCoprocessorRequest_default_instance_; + +inline constexpr RawCASRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + previous_value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr}, + ttl_{::uint64_t{0u}}, + previous_not_exist_{false}, + delete__{false} {} + +template +PROTOBUF_CONSTEXPR RawCASRequest::RawCASRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawCASRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawCASRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawCASRequestDefaultTypeInternal() {} union { - RawPutRequest _instance; + RawCASRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawPutRequestDefaultTypeInternal _RawPutRequest_default_instance_; -PROTOBUF_CONSTEXPR RawPutResponse::RawPutResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawPutResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawPutResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawPutResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCASRequestDefaultTypeInternal _RawCASRequest_default_instance_; + +inline constexpr RawBatchGetRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + keys_{}, + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawBatchGetRequest::RawBatchGetRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawBatchGetRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawBatchGetRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawBatchGetRequestDefaultTypeInternal() {} union { - RawPutResponse _instance; + RawBatchGetRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawPutResponseDefaultTypeInternal _RawPutResponse_default_instance_; -PROTOBUF_CONSTEXPR RawBatchPutRequest::RawBatchPutRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.pairs_)*/{} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_.ttl_)*/uint64_t{0u} - , /*decltype(_impl_.for_cas_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawBatchPutRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawBatchPutRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawBatchPutRequestDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchGetRequestDefaultTypeInternal _RawBatchGetRequest_default_instance_; + +inline constexpr RawBatchDeleteRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + keys_{}, + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawBatchDeleteRequest::RawBatchDeleteRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawBatchDeleteRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawBatchDeleteRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawBatchDeleteRequestDefaultTypeInternal() {} union { - RawBatchPutRequest _instance; + RawBatchDeleteRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchPutRequestDefaultTypeInternal _RawBatchPutRequest_default_instance_; -PROTOBUF_CONSTEXPR RawBatchPutResponse::RawBatchPutResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawBatchPutResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawBatchPutResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawBatchPutResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchDeleteRequestDefaultTypeInternal _RawBatchDeleteRequest_default_instance_; + +inline constexpr RawPutResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawPutResponse::RawPutResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawPutResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawPutResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawPutResponseDefaultTypeInternal() {} union { - RawBatchPutResponse _instance; + RawPutResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchPutResponseDefaultTypeInternal _RawBatchPutResponse_default_instance_; -PROTOBUF_CONSTEXPR RawDeleteRequest::RawDeleteRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_.for_cas_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawDeleteRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawDeleteRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawDeleteRequestDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawPutResponseDefaultTypeInternal _RawPutResponse_default_instance_; + +inline constexpr RawGetResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr}, + not_found_{false} {} + +template +PROTOBUF_CONSTEXPR RawGetResponse::RawGetResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawGetResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawGetResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawGetResponseDefaultTypeInternal() {} union { - RawDeleteRequest _instance; + RawGetResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteRequestDefaultTypeInternal _RawDeleteRequest_default_instance_; -PROTOBUF_CONSTEXPR RawDeleteResponse::RawDeleteResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawGetResponseDefaultTypeInternal _RawGetResponse_default_instance_; + +inline constexpr RawDeleteResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawDeleteResponse::RawDeleteResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct RawDeleteResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawDeleteResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR RawDeleteResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RawDeleteResponseDefaultTypeInternal() {} union { RawDeleteResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteResponseDefaultTypeInternal _RawDeleteResponse_default_instance_; -PROTOBUF_CONSTEXPR RawBatchDeleteRequest::RawBatchDeleteRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.keys_)*/{} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawBatchDeleteRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawBatchDeleteRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawBatchDeleteRequestDefaultTypeInternal() {} - union { - RawBatchDeleteRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchDeleteRequestDefaultTypeInternal _RawBatchDeleteRequest_default_instance_; -PROTOBUF_CONSTEXPR RawBatchDeleteResponse::RawBatchDeleteResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawBatchDeleteResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawBatchDeleteResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawBatchDeleteResponseDefaultTypeInternal() {} - union { - RawBatchDeleteResponse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchDeleteResponseDefaultTypeInternal _RawBatchDeleteResponse_default_instance_; -PROTOBUF_CONSTEXPR RawDeleteRangeRequest::RawDeleteRangeRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.start_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.end_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawDeleteRangeRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawDeleteRangeRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawDeleteRangeRequestDefaultTypeInternal() {} - union { - RawDeleteRangeRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteRangeRequestDefaultTypeInternal _RawDeleteRangeRequest_default_instance_; -PROTOBUF_CONSTEXPR RawDeleteRangeResponse::RawDeleteRangeResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteResponseDefaultTypeInternal _RawDeleteResponse_default_instance_; + +inline constexpr RawDeleteRangeResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawDeleteRangeResponse::RawDeleteRangeResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct RawDeleteRangeResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawDeleteRangeResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR RawDeleteRangeResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RawDeleteRangeResponseDefaultTypeInternal() {} union { RawDeleteRangeResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteRangeResponseDefaultTypeInternal _RawDeleteRangeResponse_default_instance_; -PROTOBUF_CONSTEXPR RawCASRequest::RawCASRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.previous_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_.ttl_)*/uint64_t{0u} - , /*decltype(_impl_.previous_not_exist_)*/false - , /*decltype(_impl_.delete__)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawCASRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawCASRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawCASRequestDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawDeleteRangeResponseDefaultTypeInternal _RawDeleteRangeResponse_default_instance_; + +inline constexpr RawCoprocessorResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawCoprocessorResponse::RawCoprocessorResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawCoprocessorResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawCoprocessorResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawCoprocessorResponseDefaultTypeInternal() {} union { - RawCASRequest _instance; + RawCoprocessorResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCASRequestDefaultTypeInternal _RawCASRequest_default_instance_; -PROTOBUF_CONSTEXPR RawCASResponse::RawCASResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.previous_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_.succeed_)*/false - , /*decltype(_impl_.previous_not_exist_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCoprocessorResponseDefaultTypeInternal _RawCoprocessorResponse_default_instance_; + +inline constexpr RawCASResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + previous_value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr}, + succeed_{false}, + previous_not_exist_{false} {} + +template +PROTOBUF_CONSTEXPR RawCASResponse::RawCASResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct RawCASResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawCASResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR RawCASResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RawCASResponseDefaultTypeInternal() {} union { RawCASResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCASResponseDefaultTypeInternal _RawCASResponse_default_instance_; -PROTOBUF_CONSTEXPR RawScanRequest::RawScanRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.start_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.cf_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.end_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_.limit_)*/0u - , /*decltype(_impl_.key_only_)*/false - , /*decltype(_impl_.reverse_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawScanRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawScanRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawScanRequestDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCASResponseDefaultTypeInternal _RawCASResponse_default_instance_; + +inline constexpr RawBatchPutResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawBatchPutResponse::RawBatchPutResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawBatchPutResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawBatchPutResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawBatchPutResponseDefaultTypeInternal() {} union { - RawScanRequest _instance; + RawBatchPutResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawScanRequestDefaultTypeInternal _RawScanRequest_default_instance_; -PROTOBUF_CONSTEXPR RawScanResponse::RawScanResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.kvs_)*/{} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawScanResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawScanResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawScanResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchPutResponseDefaultTypeInternal _RawBatchPutResponse_default_instance_; + +inline constexpr RawBatchDeleteResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawBatchDeleteResponse::RawBatchDeleteResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawBatchDeleteResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawBatchDeleteResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawBatchDeleteResponseDefaultTypeInternal() {} union { - RawScanResponse _instance; + RawBatchDeleteResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawScanResponseDefaultTypeInternal _RawScanResponse_default_instance_; -PROTOBUF_CONSTEXPR KeyRange::KeyRange( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.start_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.end_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct KeyRangeDefaultTypeInternal { - PROTOBUF_CONSTEXPR KeyRangeDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~KeyRangeDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchDeleteResponseDefaultTypeInternal _RawBatchDeleteResponse_default_instance_; + +inline constexpr KvPair::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR KvPair::KvPair(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct KvPairDefaultTypeInternal { + PROTOBUF_CONSTEXPR KvPairDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~KvPairDefaultTypeInternal() {} union { - KeyRange _instance; + KvPair _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyRangeDefaultTypeInternal _KeyRange_default_instance_; -PROTOBUF_CONSTEXPR RawCoprocessorRequest::RawCoprocessorRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.ranges_)*/{} - , /*decltype(_impl_.copr_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.copr_version_req_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.context_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawCoprocessorRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawCoprocessorRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawCoprocessorRequestDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KvPairDefaultTypeInternal _KvPair_default_instance_; + +inline constexpr RawScanResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + kvs_{}, + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawScanResponse::RawScanResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawScanResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawScanResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawScanResponseDefaultTypeInternal() {} union { - RawCoprocessorRequest _instance; + RawScanResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCoprocessorRequestDefaultTypeInternal _RawCoprocessorRequest_default_instance_; -PROTOBUF_CONSTEXPR RawCoprocessorResponse::RawCoprocessorResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_error_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RawCoprocessorResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR RawCoprocessorResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RawCoprocessorResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawScanResponseDefaultTypeInternal _RawScanResponse_default_instance_; + +inline constexpr RawBatchPutRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + pairs_{}, + cf_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + context_{nullptr}, + ttl_{::uint64_t{0u}}, + for_cas_{false} {} + +template +PROTOBUF_CONSTEXPR RawBatchPutRequest::RawBatchPutRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawBatchPutRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawBatchPutRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawBatchPutRequestDefaultTypeInternal() {} union { - RawCoprocessorResponse _instance; + RawBatchPutRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchPutRequestDefaultTypeInternal _RawBatchPutRequest_default_instance_; + +inline constexpr RawBatchGetResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + pairs_{}, + region_error_{nullptr} {} + +template +PROTOBUF_CONSTEXPR RawBatchGetResponse::RawBatchGetResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RawBatchGetResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawBatchGetResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RawBatchGetResponseDefaultTypeInternal() {} + union { + RawBatchGetResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawCoprocessorResponseDefaultTypeInternal _RawCoprocessorResponse_default_instance_; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawBatchGetResponseDefaultTypeInternal _RawBatchGetResponse_default_instance_; } // namespace kvrpcpb static ::_pb::Metadata file_level_metadata_kvrpcpb_2eproto[23]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_kvrpcpb_2eproto[2]; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_kvrpcpb_2eproto = nullptr; - -const uint32_t TableStruct_kvrpcpb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.region_id_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.region_epoch_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.peer_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.read_quorum_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.term_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.priority_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.isolation_level_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.not_fill_cache_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.sync_log_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.stale_read_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.resource_group_tag_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.replica_read_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.resolved_locks_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.max_execution_duration_ms_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.resource_group_name_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.source_stmt_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.request_source_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _impl_.error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _impl_.value_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _impl_.cf_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.value_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.not_found_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _impl_.keys_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _impl_.cf_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetResponse, _impl_.pairs_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.value_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.cf_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.ttl_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.for_cas_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutResponse, _impl_.error_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.pairs_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.cf_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.ttl_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.for_cas_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutResponse, _impl_.error_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.cf_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.for_cas_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteResponse, _impl_.error_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _impl_.keys_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _impl_.cf_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteResponse, _impl_.error_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.start_key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.end_key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.cf_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeResponse, _impl_.error_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.value_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.previous_not_exist_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.previous_value_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.cf_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.ttl_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.delete__), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.succeed_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.previous_not_exist_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.previous_value_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.start_key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.limit_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.key_only_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.cf_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.reverse_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.end_key_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanResponse, _impl_.kvs_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::KeyRange, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::KeyRange, _impl_.start_key_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::KeyRange, _impl_.end_key_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.context_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.copr_name_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.copr_version_req_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.ranges_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.data_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _impl_.region_error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _impl_.error_), - PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _impl_.data_), +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_kvrpcpb_2eproto = nullptr; +const ::uint32_t TableStruct_kvrpcpb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( + protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.region_id_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.region_epoch_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.peer_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.read_quorum_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.term_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.priority_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.isolation_level_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.not_fill_cache_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.sync_log_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.stale_read_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.resource_group_tag_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.replica_read_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.resolved_locks_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.max_execution_duration_ms_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.resource_group_name_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.source_stmt_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::Context, _impl_.request_source_), + ~0u, + 0, + 1, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _impl_.error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KvPair, _impl_.value_), + 0, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetRequest, _impl_.cf_), + 0, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawGetResponse, _impl_.not_found_), + 0, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _impl_.keys_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetRequest, _impl_.cf_), + 0, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchGetResponse, _impl_.pairs_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.cf_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.ttl_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutRequest, _impl_.for_cas_), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawPutResponse, _impl_.error_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.pairs_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.cf_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.ttl_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutRequest, _impl_.for_cas_), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchPutResponse, _impl_.error_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.cf_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRequest, _impl_.for_cas_), + 0, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteResponse, _impl_.error_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _impl_.keys_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteRequest, _impl_.cf_), + 0, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawBatchDeleteResponse, _impl_.error_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.start_key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.end_key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeRequest, _impl_.cf_), + 0, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawDeleteRangeResponse, _impl_.error_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.previous_not_exist_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.previous_value_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.cf_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.ttl_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASRequest, _impl_.delete__), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.succeed_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.previous_not_exist_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCASResponse, _impl_.previous_value_), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.start_key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.limit_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.key_only_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.cf_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.reverse_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanRequest, _impl_.end_key_), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawScanResponse, _impl_.kvs_), + 0, + ~0u, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KeyRange, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KeyRange, _impl_.start_key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::KeyRange, _impl_.end_key_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.context_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.copr_name_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.copr_version_req_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.ranges_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorRequest, _impl_.data_), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _impl_.region_error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _impl_.error_), + PROTOBUF_FIELD_OFFSET(::kvrpcpb::RawCoprocessorResponse, _impl_.data_), + 0, + ~0u, + ~0u, }; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::kvrpcpb::Context)}, - { 23, -1, -1, sizeof(::kvrpcpb::KvPair)}, - { 32, -1, -1, sizeof(::kvrpcpb::RawGetRequest)}, - { 41, -1, -1, sizeof(::kvrpcpb::RawGetResponse)}, - { 51, -1, -1, sizeof(::kvrpcpb::RawBatchGetRequest)}, - { 60, -1, -1, sizeof(::kvrpcpb::RawBatchGetResponse)}, - { 68, -1, -1, sizeof(::kvrpcpb::RawPutRequest)}, - { 80, -1, -1, sizeof(::kvrpcpb::RawPutResponse)}, - { 88, -1, -1, sizeof(::kvrpcpb::RawBatchPutRequest)}, - { 99, -1, -1, sizeof(::kvrpcpb::RawBatchPutResponse)}, - { 107, -1, -1, sizeof(::kvrpcpb::RawDeleteRequest)}, - { 117, -1, -1, sizeof(::kvrpcpb::RawDeleteResponse)}, - { 125, -1, -1, sizeof(::kvrpcpb::RawBatchDeleteRequest)}, - { 134, -1, -1, sizeof(::kvrpcpb::RawBatchDeleteResponse)}, - { 142, -1, -1, sizeof(::kvrpcpb::RawDeleteRangeRequest)}, - { 152, -1, -1, sizeof(::kvrpcpb::RawDeleteRangeResponse)}, - { 160, -1, -1, sizeof(::kvrpcpb::RawCASRequest)}, - { 174, -1, -1, sizeof(::kvrpcpb::RawCASResponse)}, - { 185, -1, -1, sizeof(::kvrpcpb::RawScanRequest)}, - { 198, -1, -1, sizeof(::kvrpcpb::RawScanResponse)}, - { 206, -1, -1, sizeof(::kvrpcpb::KeyRange)}, - { 214, -1, -1, sizeof(::kvrpcpb::RawCoprocessorRequest)}, - { 225, -1, -1, sizeof(::kvrpcpb::RawCoprocessorResponse)}, + +static const ::_pbi::MigrationSchema + schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + {0, 25, -1, sizeof(::kvrpcpb::Context)}, + {42, 53, -1, sizeof(::kvrpcpb::KvPair)}, + {56, 67, -1, sizeof(::kvrpcpb::RawGetRequest)}, + {70, 82, -1, sizeof(::kvrpcpb::RawGetResponse)}, + {86, 97, -1, sizeof(::kvrpcpb::RawBatchGetRequest)}, + {100, 110, -1, sizeof(::kvrpcpb::RawBatchGetResponse)}, + {112, 126, -1, sizeof(::kvrpcpb::RawPutRequest)}, + {132, 142, -1, sizeof(::kvrpcpb::RawPutResponse)}, + {144, 157, -1, sizeof(::kvrpcpb::RawBatchPutRequest)}, + {162, 172, -1, sizeof(::kvrpcpb::RawBatchPutResponse)}, + {174, 186, -1, sizeof(::kvrpcpb::RawDeleteRequest)}, + {190, 200, -1, sizeof(::kvrpcpb::RawDeleteResponse)}, + {202, 213, -1, sizeof(::kvrpcpb::RawBatchDeleteRequest)}, + {216, 226, -1, sizeof(::kvrpcpb::RawBatchDeleteResponse)}, + {228, 240, -1, sizeof(::kvrpcpb::RawDeleteRangeRequest)}, + {244, 254, -1, sizeof(::kvrpcpb::RawDeleteRangeResponse)}, + {256, 272, -1, sizeof(::kvrpcpb::RawCASRequest)}, + {280, 293, -1, sizeof(::kvrpcpb::RawCASResponse)}, + {298, 313, -1, sizeof(::kvrpcpb::RawScanRequest)}, + {320, 330, -1, sizeof(::kvrpcpb::RawScanResponse)}, + {332, -1, -1, sizeof(::kvrpcpb::KeyRange)}, + {342, 355, -1, sizeof(::kvrpcpb::RawCoprocessorRequest)}, + {360, 371, -1, sizeof(::kvrpcpb::RawCoprocessorResponse)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::kvrpcpb::_Context_default_instance_._instance, - &::kvrpcpb::_KvPair_default_instance_._instance, - &::kvrpcpb::_RawGetRequest_default_instance_._instance, - &::kvrpcpb::_RawGetResponse_default_instance_._instance, - &::kvrpcpb::_RawBatchGetRequest_default_instance_._instance, - &::kvrpcpb::_RawBatchGetResponse_default_instance_._instance, - &::kvrpcpb::_RawPutRequest_default_instance_._instance, - &::kvrpcpb::_RawPutResponse_default_instance_._instance, - &::kvrpcpb::_RawBatchPutRequest_default_instance_._instance, - &::kvrpcpb::_RawBatchPutResponse_default_instance_._instance, - &::kvrpcpb::_RawDeleteRequest_default_instance_._instance, - &::kvrpcpb::_RawDeleteResponse_default_instance_._instance, - &::kvrpcpb::_RawBatchDeleteRequest_default_instance_._instance, - &::kvrpcpb::_RawBatchDeleteResponse_default_instance_._instance, - &::kvrpcpb::_RawDeleteRangeRequest_default_instance_._instance, - &::kvrpcpb::_RawDeleteRangeResponse_default_instance_._instance, - &::kvrpcpb::_RawCASRequest_default_instance_._instance, - &::kvrpcpb::_RawCASResponse_default_instance_._instance, - &::kvrpcpb::_RawScanRequest_default_instance_._instance, - &::kvrpcpb::_RawScanResponse_default_instance_._instance, - &::kvrpcpb::_KeyRange_default_instance_._instance, - &::kvrpcpb::_RawCoprocessorRequest_default_instance_._instance, - &::kvrpcpb::_RawCoprocessorResponse_default_instance_._instance, + &::kvrpcpb::_Context_default_instance_._instance, + &::kvrpcpb::_KvPair_default_instance_._instance, + &::kvrpcpb::_RawGetRequest_default_instance_._instance, + &::kvrpcpb::_RawGetResponse_default_instance_._instance, + &::kvrpcpb::_RawBatchGetRequest_default_instance_._instance, + &::kvrpcpb::_RawBatchGetResponse_default_instance_._instance, + &::kvrpcpb::_RawPutRequest_default_instance_._instance, + &::kvrpcpb::_RawPutResponse_default_instance_._instance, + &::kvrpcpb::_RawBatchPutRequest_default_instance_._instance, + &::kvrpcpb::_RawBatchPutResponse_default_instance_._instance, + &::kvrpcpb::_RawDeleteRequest_default_instance_._instance, + &::kvrpcpb::_RawDeleteResponse_default_instance_._instance, + &::kvrpcpb::_RawBatchDeleteRequest_default_instance_._instance, + &::kvrpcpb::_RawBatchDeleteResponse_default_instance_._instance, + &::kvrpcpb::_RawDeleteRangeRequest_default_instance_._instance, + &::kvrpcpb::_RawDeleteRangeResponse_default_instance_._instance, + &::kvrpcpb::_RawCASRequest_default_instance_._instance, + &::kvrpcpb::_RawCASResponse_default_instance_._instance, + &::kvrpcpb::_RawScanRequest_default_instance_._instance, + &::kvrpcpb::_RawScanResponse_default_instance_._instance, + &::kvrpcpb::_KeyRange_default_instance_._instance, + &::kvrpcpb::_RawCoprocessorRequest_default_instance_._instance, + &::kvrpcpb::_RawCoprocessorResponse_default_instance_._instance, }; - -const char descriptor_table_protodef_kvrpcpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\rkvrpcpb.proto\022\007kvrpcpb\032\014metapb.proto\032\r" - "errorpb.proto\"\324\003\n\007Context\022\021\n\tregion_id\030\001" - " \001(\004\022)\n\014region_epoch\030\002 \001(\0132\023.metapb.Regi" - "onEpoch\022\032\n\004peer\030\003 \001(\0132\014.metapb.Peer\022\023\n\013r" - "ead_quorum\030\004 \001(\010\022\014\n\004term\030\005 \001(\004\022%\n\010priori" - "ty\030\006 \001(\0162\023.kvrpcpb.CommandPri\0220\n\017isolati" - "on_level\030\007 \001(\0162\027.kvrpcpb.IsolationLevel\022" - "\026\n\016not_fill_cache\030\010 \001(\010\022\020\n\010sync_log\030\t \001(" - "\010\022\022\n\nstale_read\030\n \001(\010\022\032\n\022resource_group_" - "tag\030\013 \001(\004\022\024\n\014replica_read\030\014 \001(\010\022\026\n\016resol" - "ved_locks\030\r \003(\004\022!\n\031max_execution_duratio" - "n_ms\030\016 \001(\004\022\033\n\023resource_group_name\030\017 \001(\t\022" - "\023\n\013source_stmt\030\020 \001(\014\022\026\n\016request_source\030\021" - " \001(\004\"C\n\006KvPair\022\035\n\005error\030\001 \001(\0132\016.errorpb." - "Error\022\013\n\003key\030\002 \001(\014\022\r\n\005value\030\003 \001(\014\"K\n\rRaw" - "GetRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Co" - "ntext\022\013\n\003key\030\002 \001(\014\022\n\n\002cf\030\003 \001(\t\"g\n\016RawGet" - "Response\022$\n\014region_error\030\001 \001(\0132\016.errorpb" - ".Error\022\r\n\005error\030\002 \001(\t\022\r\n\005value\030\003 \001(\014\022\021\n\t" - "not_found\030\004 \001(\010\"Q\n\022RawBatchGetRequest\022!\n" - "\007context\030\001 \001(\0132\020.kvrpcpb.Context\022\014\n\004keys" - "\030\002 \003(\014\022\n\n\002cf\030\003 \001(\t\"[\n\023RawBatchGetRespons" - "e\022$\n\014region_error\030\001 \001(\0132\016.errorpb.Error\022" - "\036\n\005pairs\030\002 \003(\0132\017.kvrpcpb.KvPair\"x\n\rRawPu" - "tRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Cont" - "ext\022\013\n\003key\030\002 \001(\014\022\r\n\005value\030\003 \001(\014\022\n\n\002cf\030\004 " - "\001(\t\022\013\n\003ttl\030\005 \001(\004\022\017\n\007for_cas\030\006 \001(\010\"E\n\016Raw" - "PutResponse\022$\n\014region_error\030\001 \001(\0132\016.erro" - "rpb.Error\022\r\n\005error\030\002 \001(\t\"\201\001\n\022RawBatchPut" - "Request\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Conte" - "xt\022\036\n\005pairs\030\002 \003(\0132\017.kvrpcpb.KvPair\022\n\n\002cf" - "\030\003 \001(\t\022\013\n\003ttl\030\004 \001(\004\022\017\n\007for_cas\030\005 \001(\010\"J\n\023" - "RawBatchPutResponse\022$\n\014region_error\030\001 \001(" - "\0132\016.errorpb.Error\022\r\n\005error\030\002 \001(\t\"_\n\020RawD" - "eleteRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb." - "Context\022\013\n\003key\030\002 \001(\014\022\n\n\002cf\030\003 \001(\t\022\017\n\007for_" - "cas\030\004 \001(\010\"H\n\021RawDeleteResponse\022$\n\014region" - "_error\030\001 \001(\0132\016.errorpb.Error\022\r\n\005error\030\002 " - "\001(\t\"T\n\025RawBatchDeleteRequest\022!\n\007context\030" - "\001 \001(\0132\020.kvrpcpb.Context\022\014\n\004keys\030\002 \003(\014\022\n\n" - "\002cf\030\003 \001(\t\"M\n\026RawBatchDeleteResponse\022$\n\014r" - "egion_error\030\001 \001(\0132\016.errorpb.Error\022\r\n\005err" - "or\030\002 \001(\t\"j\n\025RawDeleteRangeRequest\022!\n\007con" - "text\030\001 \001(\0132\020.kvrpcpb.Context\022\021\n\tstart_ke" - "y\030\002 \001(\014\022\017\n\007end_key\030\003 \001(\014\022\n\n\002cf\030\004 \001(\t\"M\n\026" - "RawDeleteRangeResponse\022$\n\014region_error\030\001" - " \001(\0132\016.errorpb.Error\022\r\n\005error\030\002 \001(\t\"\253\001\n\r" - "RawCASRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb" - ".Context\022\013\n\003key\030\002 \001(\014\022\r\n\005value\030\003 \001(\014\022\032\n\022" - "previous_not_exist\030\004 \001(\010\022\026\n\016previous_val" - "ue\030\005 \001(\014\022\n\n\002cf\030\006 \001(\t\022\013\n\003ttl\030\007 \001(\004\022\016\n\006del" - "ete\030\010 \001(\010\"\212\001\n\016RawCASResponse\022$\n\014region_e" - "rror\030\001 \001(\0132\016.errorpb.Error\022\r\n\005error\030\002 \001(" - "\t\022\017\n\007succeed\030\003 \001(\010\022\032\n\022previous_not_exist" - "\030\004 \001(\010\022\026\n\016previous_value\030\005 \001(\014\"\225\001\n\016RawSc" - "anRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Con" - "text\022\021\n\tstart_key\030\002 \001(\014\022\r\n\005limit\030\003 \001(\r\022\020" - "\n\010key_only\030\004 \001(\010\022\n\n\002cf\030\005 \001(\t\022\017\n\007reverse\030" - "\006 \001(\010\022\017\n\007end_key\030\007 \001(\014\"U\n\017RawScanRespons" - "e\022$\n\014region_error\030\001 \001(\0132\016.errorpb.Error\022" - "\034\n\003kvs\030\002 \003(\0132\017.kvrpcpb.KvPair\".\n\010KeyRang" - "e\022\021\n\tstart_key\030\001 \001(\014\022\017\n\007end_key\030\002 \001(\014\"\230\001" - "\n\025RawCoprocessorRequest\022!\n\007context\030\001 \001(\013" - "2\020.kvrpcpb.Context\022\021\n\tcopr_name\030\002 \001(\t\022\030\n" - "\020copr_version_req\030\003 \001(\t\022!\n\006ranges\030\004 \003(\0132" - "\021.kvrpcpb.KeyRange\022\014\n\004data\030\005 \001(\014\"[\n\026RawC" - "oprocessorResponse\022$\n\014region_error\030\001 \001(\013" - "2\016.errorpb.Error\022\r\n\005error\030\002 \001(\t\022\014\n\004data\030" - "\003 \001(\014*+\n\nCommandPri\022\n\n\006Normal\020\000\022\007\n\003Low\020\001" - "\022\010\n\004High\020\002*/\n\016IsolationLevel\022\006\n\002SI\020\000\022\006\n\002" - "RC\020\001\022\r\n\tRCCheckTS\020\002B\022\n\020org.tikv.kvprotob" - "\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_kvrpcpb_2eproto_deps[2] = { - &::descriptor_table_errorpb_2eproto, - &::descriptor_table_metapb_2eproto, +const char descriptor_table_protodef_kvrpcpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + "\n\rkvrpcpb.proto\022\007kvrpcpb\032\014metapb.proto\032\r" + "errorpb.proto\"\324\003\n\007Context\022\021\n\tregion_id\030\001" + " \001(\004\022)\n\014region_epoch\030\002 \001(\0132\023.metapb.Regi" + "onEpoch\022\032\n\004peer\030\003 \001(\0132\014.metapb.Peer\022\023\n\013r" + "ead_quorum\030\004 \001(\010\022\014\n\004term\030\005 \001(\004\022%\n\010priori" + "ty\030\006 \001(\0162\023.kvrpcpb.CommandPri\0220\n\017isolati" + "on_level\030\007 \001(\0162\027.kvrpcpb.IsolationLevel\022" + "\026\n\016not_fill_cache\030\010 \001(\010\022\020\n\010sync_log\030\t \001(" + "\010\022\022\n\nstale_read\030\n \001(\010\022\032\n\022resource_group_" + "tag\030\013 \001(\004\022\024\n\014replica_read\030\014 \001(\010\022\026\n\016resol" + "ved_locks\030\r \003(\004\022!\n\031max_execution_duratio" + "n_ms\030\016 \001(\004\022\033\n\023resource_group_name\030\017 \001(\t\022" + "\023\n\013source_stmt\030\020 \001(\014\022\026\n\016request_source\030\021" + " \001(\004\"C\n\006KvPair\022\035\n\005error\030\001 \001(\0132\016.errorpb." + "Error\022\013\n\003key\030\002 \001(\014\022\r\n\005value\030\003 \001(\014\"K\n\rRaw" + "GetRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Co" + "ntext\022\013\n\003key\030\002 \001(\014\022\n\n\002cf\030\003 \001(\t\"g\n\016RawGet" + "Response\022$\n\014region_error\030\001 \001(\0132\016.errorpb" + ".Error\022\r\n\005error\030\002 \001(\t\022\r\n\005value\030\003 \001(\014\022\021\n\t" + "not_found\030\004 \001(\010\"Q\n\022RawBatchGetRequest\022!\n" + "\007context\030\001 \001(\0132\020.kvrpcpb.Context\022\014\n\004keys" + "\030\002 \003(\014\022\n\n\002cf\030\003 \001(\t\"[\n\023RawBatchGetRespons" + "e\022$\n\014region_error\030\001 \001(\0132\016.errorpb.Error\022" + "\036\n\005pairs\030\002 \003(\0132\017.kvrpcpb.KvPair\"x\n\rRawPu" + "tRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Cont" + "ext\022\013\n\003key\030\002 \001(\014\022\r\n\005value\030\003 \001(\014\022\n\n\002cf\030\004 " + "\001(\t\022\013\n\003ttl\030\005 \001(\004\022\017\n\007for_cas\030\006 \001(\010\"E\n\016Raw" + "PutResponse\022$\n\014region_error\030\001 \001(\0132\016.erro" + "rpb.Error\022\r\n\005error\030\002 \001(\t\"\201\001\n\022RawBatchPut" + "Request\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Conte" + "xt\022\036\n\005pairs\030\002 \003(\0132\017.kvrpcpb.KvPair\022\n\n\002cf" + "\030\003 \001(\t\022\013\n\003ttl\030\004 \001(\004\022\017\n\007for_cas\030\005 \001(\010\"J\n\023" + "RawBatchPutResponse\022$\n\014region_error\030\001 \001(" + "\0132\016.errorpb.Error\022\r\n\005error\030\002 \001(\t\"_\n\020RawD" + "eleteRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb." + "Context\022\013\n\003key\030\002 \001(\014\022\n\n\002cf\030\003 \001(\t\022\017\n\007for_" + "cas\030\004 \001(\010\"H\n\021RawDeleteResponse\022$\n\014region" + "_error\030\001 \001(\0132\016.errorpb.Error\022\r\n\005error\030\002 " + "\001(\t\"T\n\025RawBatchDeleteRequest\022!\n\007context\030" + "\001 \001(\0132\020.kvrpcpb.Context\022\014\n\004keys\030\002 \003(\014\022\n\n" + "\002cf\030\003 \001(\t\"M\n\026RawBatchDeleteResponse\022$\n\014r" + "egion_error\030\001 \001(\0132\016.errorpb.Error\022\r\n\005err" + "or\030\002 \001(\t\"j\n\025RawDeleteRangeRequest\022!\n\007con" + "text\030\001 \001(\0132\020.kvrpcpb.Context\022\021\n\tstart_ke" + "y\030\002 \001(\014\022\017\n\007end_key\030\003 \001(\014\022\n\n\002cf\030\004 \001(\t\"M\n\026" + "RawDeleteRangeResponse\022$\n\014region_error\030\001" + " \001(\0132\016.errorpb.Error\022\r\n\005error\030\002 \001(\t\"\253\001\n\r" + "RawCASRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb" + ".Context\022\013\n\003key\030\002 \001(\014\022\r\n\005value\030\003 \001(\014\022\032\n\022" + "previous_not_exist\030\004 \001(\010\022\026\n\016previous_val" + "ue\030\005 \001(\014\022\n\n\002cf\030\006 \001(\t\022\013\n\003ttl\030\007 \001(\004\022\016\n\006del" + "ete\030\010 \001(\010\"\212\001\n\016RawCASResponse\022$\n\014region_e" + "rror\030\001 \001(\0132\016.errorpb.Error\022\r\n\005error\030\002 \001(" + "\t\022\017\n\007succeed\030\003 \001(\010\022\032\n\022previous_not_exist" + "\030\004 \001(\010\022\026\n\016previous_value\030\005 \001(\014\"\225\001\n\016RawSc" + "anRequest\022!\n\007context\030\001 \001(\0132\020.kvrpcpb.Con" + "text\022\021\n\tstart_key\030\002 \001(\014\022\r\n\005limit\030\003 \001(\r\022\020" + "\n\010key_only\030\004 \001(\010\022\n\n\002cf\030\005 \001(\t\022\017\n\007reverse\030" + "\006 \001(\010\022\017\n\007end_key\030\007 \001(\014\"U\n\017RawScanRespons" + "e\022$\n\014region_error\030\001 \001(\0132\016.errorpb.Error\022" + "\034\n\003kvs\030\002 \003(\0132\017.kvrpcpb.KvPair\".\n\010KeyRang" + "e\022\021\n\tstart_key\030\001 \001(\014\022\017\n\007end_key\030\002 \001(\014\"\230\001" + "\n\025RawCoprocessorRequest\022!\n\007context\030\001 \001(\013" + "2\020.kvrpcpb.Context\022\021\n\tcopr_name\030\002 \001(\t\022\030\n" + "\020copr_version_req\030\003 \001(\t\022!\n\006ranges\030\004 \003(\0132" + "\021.kvrpcpb.KeyRange\022\014\n\004data\030\005 \001(\014\"[\n\026RawC" + "oprocessorResponse\022$\n\014region_error\030\001 \001(\013" + "2\016.errorpb.Error\022\r\n\005error\030\002 \001(\t\022\014\n\004data\030" + "\003 \001(\014*+\n\nCommandPri\022\n\n\006Normal\020\000\022\007\n\003Low\020\001" + "\022\010\n\004High\020\002*/\n\016IsolationLevel\022\006\n\002SI\020\000\022\006\n\002" + "RC\020\001\022\r\n\tRCCheckTS\020\002B\022\n\020org.tikv.kvprotob" + "\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_kvrpcpb_2eproto_deps[2] = + { + &::descriptor_table_errorpb_2eproto, + &::descriptor_table_metapb_2eproto, }; -static ::_pbi::once_flag descriptor_table_kvrpcpb_2eproto_once; +static ::absl::once_flag descriptor_table_kvrpcpb_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_kvrpcpb_2eproto = { - false, false, 2847, descriptor_table_protodef_kvrpcpb_2eproto, + false, + false, + 2847, + descriptor_table_protodef_kvrpcpb_2eproto, "kvrpcpb.proto", - &descriptor_table_kvrpcpb_2eproto_once, descriptor_table_kvrpcpb_2eproto_deps, 2, 23, - schemas, file_default_instances, TableStruct_kvrpcpb_2eproto::offsets, - file_level_metadata_kvrpcpb_2eproto, file_level_enum_descriptors_kvrpcpb_2eproto, + &descriptor_table_kvrpcpb_2eproto_once, + descriptor_table_kvrpcpb_2eproto_deps, + 2, + 23, + schemas, + file_default_instances, + TableStruct_kvrpcpb_2eproto::offsets, + file_level_metadata_kvrpcpb_2eproto, + file_level_enum_descriptors_kvrpcpb_2eproto, file_level_service_descriptors_kvrpcpb_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_kvrpcpb_2eproto_getter() { return &descriptor_table_kvrpcpb_2eproto; } - // Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_kvrpcpb_2eproto(&descriptor_table_kvrpcpb_2eproto); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_kvrpcpb_2eproto(&descriptor_table_kvrpcpb_2eproto); namespace kvrpcpb { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CommandPri_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_kvrpcpb_2eproto); +const ::google::protobuf::EnumDescriptor* CommandPri_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_kvrpcpb_2eproto); return file_level_enum_descriptors_kvrpcpb_2eproto[0]; } +PROTOBUF_CONSTINIT const uint32_t CommandPri_internal_data_[] = { + 196608u, 0u, }; bool CommandPri_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } + return 0 <= value && value <= 2; } - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IsolationLevel_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_kvrpcpb_2eproto); +const ::google::protobuf::EnumDescriptor* IsolationLevel_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_kvrpcpb_2eproto); return file_level_enum_descriptors_kvrpcpb_2eproto[1]; } +PROTOBUF_CONSTINIT const uint32_t IsolationLevel_internal_data_[] = { + 196608u, 0u, }; bool IsolationLevel_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } + return 0 <= value && value <= 2; } - - // =================================================================== class Context::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Context, _impl_._has_bits_); static const ::metapb::RegionEpoch& region_epoch(const Context* msg); + static void set_has_region_epoch(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } static const ::metapb::Peer& peer(const Context* msg); + static void set_has_peer(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } }; -const ::metapb::RegionEpoch& -Context::_Internal::region_epoch(const Context* msg) { +const ::metapb::RegionEpoch& Context::_Internal::region_epoch(const Context* msg) { return *msg->_impl_.region_epoch_; } -const ::metapb::Peer& -Context::_Internal::peer(const Context* msg) { +const ::metapb::Peer& Context::_Internal::peer(const Context* msg) { return *msg->_impl_.peer_; } void Context::clear_region_epoch() { - if (GetArenaForAllocation() == nullptr && _impl_.region_epoch_ != nullptr) { - delete _impl_.region_epoch_; - } - _impl_.region_epoch_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_epoch_ != nullptr) _impl_.region_epoch_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } void Context::clear_peer() { - if (GetArenaForAllocation() == nullptr && _impl_.peer_ != nullptr) { - delete _impl_.peer_; - } - _impl_.peer_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.peer_ != nullptr) _impl_.peer_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; } -Context::Context(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Context::Context(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.Context) } -Context::Context(const Context& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Context* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.resolved_locks_){from._impl_.resolved_locks_} - , /*decltype(_impl_._resolved_locks_cached_byte_size_)*/{0} - , decltype(_impl_.resource_group_name_){} - , decltype(_impl_.source_stmt_){} - , decltype(_impl_.region_epoch_){nullptr} - , decltype(_impl_.peer_){nullptr} - , decltype(_impl_.region_id_){} - , decltype(_impl_.term_){} - , decltype(_impl_.priority_){} - , decltype(_impl_.isolation_level_){} - , decltype(_impl_.read_quorum_){} - , decltype(_impl_.not_fill_cache_){} - , decltype(_impl_.sync_log_){} - , decltype(_impl_.stale_read_){} - , decltype(_impl_.replica_read_){} - , decltype(_impl_.resource_group_tag_){} - , decltype(_impl_.max_execution_duration_ms_){} - , decltype(_impl_.request_source_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.resource_group_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.resource_group_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_resource_group_name().empty()) { - _this->_impl_.resource_group_name_.Set(from._internal_resource_group_name(), - _this->GetArenaForAllocation()); - } - _impl_.source_stmt_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.source_stmt_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_source_stmt().empty()) { - _this->_impl_.source_stmt_.Set(from._internal_source_stmt(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_epoch()) { - _this->_impl_.region_epoch_ = new ::metapb::RegionEpoch(*from._impl_.region_epoch_); - } - if (from._internal_has_peer()) { - _this->_impl_.peer_ = new ::metapb::Peer(*from._impl_.peer_); - } - ::memcpy(&_impl_.region_id_, &from._impl_.region_id_, - static_cast(reinterpret_cast(&_impl_.request_source_) - - reinterpret_cast(&_impl_.region_id_)) + sizeof(_impl_.request_source_)); +inline PROTOBUF_NDEBUG_INLINE Context::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + resolved_locks_{visibility, arena, from.resolved_locks_}, + _resolved_locks_cached_byte_size_{0}, + resource_group_name_(arena, from.resource_group_name_), + source_stmt_(arena, from.source_stmt_) {} + +Context::Context( + ::google::protobuf::Arena* arena, + const Context& from) + : ::google::protobuf::Message(arena) { + Context* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_epoch_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::metapb::RegionEpoch>(arena, *from._impl_.region_epoch_) + : nullptr; + _impl_.peer_ = (cached_has_bits & 0x00000002u) + ? CreateMaybeMessage<::metapb::Peer>(arena, *from._impl_.peer_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, region_id_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, region_id_), + offsetof(Impl_, request_source_) - + offsetof(Impl_, region_id_) + + sizeof(Impl_::request_source_)); + // @@protoc_insertion_point(copy_constructor:kvrpcpb.Context) } - -inline void Context::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.resolved_locks_){arena} - , /*decltype(_impl_._resolved_locks_cached_byte_size_)*/{0} - , decltype(_impl_.resource_group_name_){} - , decltype(_impl_.source_stmt_){} - , decltype(_impl_.region_epoch_){nullptr} - , decltype(_impl_.peer_){nullptr} - , decltype(_impl_.region_id_){uint64_t{0u}} - , decltype(_impl_.term_){uint64_t{0u}} - , decltype(_impl_.priority_){0} - , decltype(_impl_.isolation_level_){0} - , decltype(_impl_.read_quorum_){false} - , decltype(_impl_.not_fill_cache_){false} - , decltype(_impl_.sync_log_){false} - , decltype(_impl_.stale_read_){false} - , decltype(_impl_.replica_read_){false} - , decltype(_impl_.resource_group_tag_){uint64_t{0u}} - , decltype(_impl_.max_execution_duration_ms_){uint64_t{0u}} - , decltype(_impl_.request_source_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.resource_group_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.resource_group_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.source_stmt_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.source_stmt_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE Context::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + resolved_locks_{visibility, arena}, + _resolved_locks_cached_byte_size_{0}, + resource_group_name_(arena), + source_stmt_(arena) {} + +inline void Context::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, region_epoch_), + 0, + offsetof(Impl_, request_source_) - + offsetof(Impl_, region_epoch_) + + sizeof(Impl_::request_source_)); } - Context::~Context() { // @@protoc_insertion_point(destructor:kvrpcpb.Context) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Context::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.resolved_locks_.~RepeatedField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.resource_group_name_.Destroy(); _impl_.source_stmt_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_epoch_; - if (this != internal_default_instance()) delete _impl_.peer_; -} - -void Context::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.region_epoch_; + delete _impl_.peer_; + _impl_.~Impl_(); } -void Context::Clear() { +PROTOBUF_NOINLINE void Context::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.Context) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.resolved_locks_.Clear(); _impl_.resource_group_name_.ClearToEmpty(); _impl_.source_stmt_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_epoch_ != nullptr) { - delete _impl_.region_epoch_; - } - _impl_.region_epoch_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.peer_ != nullptr) { - delete _impl_.peer_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_epoch_ != nullptr); + _impl_.region_epoch_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.peer_ != nullptr); + _impl_.peer_->Clear(); + } } - _impl_.peer_ = nullptr; - ::memset(&_impl_.region_id_, 0, static_cast( + ::memset(&_impl_.region_id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.request_source_) - reinterpret_cast(&_impl_.region_id_)) + sizeof(_impl_.request_source_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Context::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 region_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.RegionEpoch region_epoch = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_region_epoch(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.Peer peer = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_peer(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool read_quorum = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.read_quorum_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 term = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .kvrpcpb.CommandPri priority = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_priority(static_cast<::kvrpcpb::CommandPri>(val)); - } else - goto handle_unusual; - continue; - // .kvrpcpb.IsolationLevel isolation_level = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_isolation_level(static_cast<::kvrpcpb::IsolationLevel>(val)); - } else - goto handle_unusual; - continue; - // bool not_fill_cache = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.not_fill_cache_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool sync_log = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _impl_.sync_log_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool stale_read = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { - _impl_.stale_read_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 resource_group_tag = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { - _impl_.resource_group_tag_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool replica_read = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { - _impl_.replica_read_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated uint64 resolved_locks = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_resolved_locks(), ptr, ctx); - CHK_(ptr); - } else if (static_cast(tag) == 104) { - _internal_add_resolved_locks(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 max_execution_duration_ms = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { - _impl_.max_execution_duration_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string resource_group_name = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 122)) { - auto str = _internal_mutable_resource_group_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.Context.resource_group_name")); - } else - goto handle_unusual; - continue; - // bytes source_stmt = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { - auto str = _internal_mutable_source_stmt(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 request_source = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { - _impl_.request_source_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Context::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Context::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<5, 17, 2, 59, 2> Context::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Context, _impl_._has_bits_), + 0, // no _extensions_ + 17, 248, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294836224, // skipmap + offsetof(decltype(_table_), field_entries), + 17, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Context_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 region_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Context, _impl_.region_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.region_id_)}}, + // .metapb.RegionEpoch region_epoch = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.region_epoch_)}}, + // .metapb.Peer peer = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 1, PROTOBUF_FIELD_OFFSET(Context, _impl_.peer_)}}, + // bool read_quorum = 4; + {::_pbi::TcParser::SingularVarintNoZag1(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.read_quorum_)}}, + // uint64 term = 5; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Context, _impl_.term_), 63>(), + {40, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.term_)}}, + // .kvrpcpb.CommandPri priority = 6; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Context, _impl_.priority_), 63>(), + {48, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.priority_)}}, + // .kvrpcpb.IsolationLevel isolation_level = 7; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Context, _impl_.isolation_level_), 63>(), + {56, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.isolation_level_)}}, + // bool not_fill_cache = 8; + {::_pbi::TcParser::SingularVarintNoZag1(), + {64, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.not_fill_cache_)}}, + // bool sync_log = 9; + {::_pbi::TcParser::SingularVarintNoZag1(), + {72, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.sync_log_)}}, + // bool stale_read = 10; + {::_pbi::TcParser::SingularVarintNoZag1(), + {80, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.stale_read_)}}, + // uint64 resource_group_tag = 11; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Context, _impl_.resource_group_tag_), 63>(), + {88, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.resource_group_tag_)}}, + // bool replica_read = 12; + {::_pbi::TcParser::SingularVarintNoZag1(), + {96, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.replica_read_)}}, + // repeated uint64 resolved_locks = 13; + {::_pbi::TcParser::FastV64P1, + {106, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.resolved_locks_)}}, + // uint64 max_execution_duration_ms = 14; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Context, _impl_.max_execution_duration_ms_), 63>(), + {112, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.max_execution_duration_ms_)}}, + // string resource_group_name = 15; + {::_pbi::TcParser::FastUS1, + {122, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.resource_group_name_)}}, + // bytes source_stmt = 16; + {::_pbi::TcParser::FastBS2, + {386, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.source_stmt_)}}, + // uint64 request_source = 17; + {::_pbi::TcParser::FastV64S2, + {392, 63, 0, PROTOBUF_FIELD_OFFSET(Context, _impl_.request_source_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 region_id = 1; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.region_id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .metapb.RegionEpoch region_epoch = 2; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.region_epoch_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .metapb.Peer peer = 3; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.peer_), _Internal::kHasBitsOffset + 1, 1, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool read_quorum = 4; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.read_quorum_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // uint64 term = 5; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.term_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .kvrpcpb.CommandPri priority = 6; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.priority_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // .kvrpcpb.IsolationLevel isolation_level = 7; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.isolation_level_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // bool not_fill_cache = 8; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.not_fill_cache_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // bool sync_log = 9; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.sync_log_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // bool stale_read = 10; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.stale_read_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // uint64 resource_group_tag = 11; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.resource_group_tag_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // bool replica_read = 12; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.replica_read_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // repeated uint64 resolved_locks = 13; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.resolved_locks_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // uint64 max_execution_duration_ms = 14; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.max_execution_duration_ms_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // string resource_group_name = 15; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.resource_group_name_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes source_stmt = 16; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.source_stmt_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // uint64 request_source = 17; + {PROTOBUF_FIELD_OFFSET(Context, _impl_.request_source_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, {{ + {::_pbi::TcParser::GetTable<::metapb::RegionEpoch>()}, + {::_pbi::TcParser::GetTable<::metapb::Peer>()}, + }}, {{ + "\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\23\0\0\0\0\0\0\0\0" + "kvrpcpb.Context" + "resource_group_name" + }}, +}; + +::uint8_t* Context::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.Context) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 region_id = 1; if (this->_internal_region_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_region_id(), target); } + cached_has_bits = _impl_._has_bits_[0]; // .metapb.RegionEpoch region_epoch = 2; - if (this->_internal_has_region_epoch()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::region_epoch(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, _Internal::region_epoch(this), _Internal::region_epoch(this).GetCachedSize(), target, stream); } // .metapb.Peer peer = 3; - if (this->_internal_has_peer()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::peer(this), + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, _Internal::peer(this), _Internal::peer(this).GetCachedSize(), target, stream); } // bool read_quorum = 4; if (this->_internal_read_quorum() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_read_quorum(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_read_quorum(), target); } // uint64 term = 5; if (this->_internal_term() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_term(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 5, this->_internal_term(), target); } // .kvrpcpb.CommandPri priority = 6; if (this->_internal_priority() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 6, this->_internal_priority(), target); + 6, this->_internal_priority(), target); } // .kvrpcpb.IsolationLevel isolation_level = 7; if (this->_internal_isolation_level() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 7, this->_internal_isolation_level(), target); + 7, this->_internal_isolation_level(), target); } // bool not_fill_cache = 8; if (this->_internal_not_fill_cache() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_not_fill_cache(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 8, this->_internal_not_fill_cache(), target); } // bool sync_log = 9; if (this->_internal_sync_log() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_sync_log(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 9, this->_internal_sync_log(), target); } // bool stale_read = 10; if (this->_internal_stale_read() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_stale_read(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 10, this->_internal_stale_read(), target); } // uint64 resource_group_tag = 11; if (this->_internal_resource_group_tag() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(11, this->_internal_resource_group_tag(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 11, this->_internal_resource_group_tag(), target); } // bool replica_read = 12; if (this->_internal_replica_read() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_replica_read(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 12, this->_internal_replica_read(), target); } // repeated uint64 resolved_locks = 13; { - int byte_size = _impl_._resolved_locks_cached_byte_size_.load(std::memory_order_relaxed); + int byte_size = _impl_._resolved_locks_cached_byte_size_.Get(); if (byte_size > 0) { target = stream->WriteUInt64Packed( 13, _internal_resolved_locks(), byte_size, target); @@ -1246,185 +1571,191 @@ uint8_t* Context::_InternalSerialize( // uint64 max_execution_duration_ms = 14; if (this->_internal_max_execution_duration_ms() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(14, this->_internal_max_execution_duration_ms(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 14, this->_internal_max_execution_duration_ms(), target); } // string resource_group_name = 15; if (!this->_internal_resource_group_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_resource_group_name().data(), static_cast(this->_internal_resource_group_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.Context.resource_group_name"); - target = stream->WriteStringMaybeAliased( - 15, this->_internal_resource_group_name(), target); + const std::string& _s = this->_internal_resource_group_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.Context.resource_group_name"); + target = stream->WriteStringMaybeAliased(15, _s, target); } // bytes source_stmt = 16; if (!this->_internal_source_stmt().empty()) { - target = stream->WriteBytesMaybeAliased( - 16, this->_internal_source_stmt(), target); + const std::string& _s = this->_internal_source_stmt(); + target = stream->WriteBytesMaybeAliased(16, _s, target); } // uint64 request_source = 17; if (this->_internal_request_source() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(17, this->_internal_request_source(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 17, this->_internal_request_source(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.Context) return target; } -size_t Context::ByteSizeLong() const { +::size_t Context::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.Context) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated uint64 resolved_locks = 13; { - size_t data_size = ::_pbi::WireFormatLite:: - UInt64Size(this->_impl_.resolved_locks_); - if (data_size > 0) { - total_size += 1 + - ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); - } - int cached_size = ::_pbi::ToCachedSize(data_size); - _impl_._resolved_locks_cached_byte_size_.store(cached_size, - std::memory_order_relaxed); - total_size += data_size; + std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( + this->_internal_resolved_locks()) + ; + _impl_._resolved_locks_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; } - // string resource_group_name = 15; if (!this->_internal_resource_group_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_resource_group_name()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_resource_group_name()); } // bytes source_stmt = 16; if (!this->_internal_source_stmt().empty()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_source_stmt()); + total_size += 2 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_source_stmt()); } - // .metapb.RegionEpoch region_epoch = 2; - if (this->_internal_has_region_epoch()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_epoch_); - } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // .metapb.RegionEpoch region_epoch = 2; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_epoch_); + } - // .metapb.Peer peer = 3; - if (this->_internal_has_peer()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.peer_); - } + // .metapb.Peer peer = 3; + if (cached_has_bits & 0x00000002u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.peer_); + } + } // uint64 region_id = 1; if (this->_internal_region_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_region_id()); } // uint64 term = 5; if (this->_internal_term() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_term()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_term()); } // .kvrpcpb.CommandPri priority = 6; if (this->_internal_priority() != 0) { total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_priority()); + ::_pbi::WireFormatLite::EnumSize(this->_internal_priority()); } // .kvrpcpb.IsolationLevel isolation_level = 7; if (this->_internal_isolation_level() != 0) { total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_isolation_level()); + ::_pbi::WireFormatLite::EnumSize(this->_internal_isolation_level()); } // bool read_quorum = 4; if (this->_internal_read_quorum() != 0) { - total_size += 1 + 1; + total_size += 2; } // bool not_fill_cache = 8; if (this->_internal_not_fill_cache() != 0) { - total_size += 1 + 1; + total_size += 2; } // bool sync_log = 9; if (this->_internal_sync_log() != 0) { - total_size += 1 + 1; + total_size += 2; } // bool stale_read = 10; if (this->_internal_stale_read() != 0) { - total_size += 1 + 1; + total_size += 2; } // bool replica_read = 12; if (this->_internal_replica_read() != 0) { - total_size += 1 + 1; + total_size += 2; } // uint64 resource_group_tag = 11; if (this->_internal_resource_group_tag() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_resource_group_tag()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_resource_group_tag()); } // uint64 max_execution_duration_ms = 14; if (this->_internal_max_execution_duration_ms() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_max_execution_duration_ms()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_max_execution_duration_ms()); } // uint64 request_source = 17; if (this->_internal_request_source() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt64Size( - this->_internal_request_source()); + total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( + this->_internal_request_source()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Context::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Context::MergeImpl +const ::google::protobuf::Message::ClassData Context::_class_data_ = { + Context::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Context::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Context::GetClassData() const { + return &_class_data_; +} -void Context::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Context::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.Context) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.resolved_locks_.MergeFrom(from._impl_.resolved_locks_); + _this->_internal_mutable_resolved_locks()->MergeFrom(from._internal_resolved_locks()); if (!from._internal_resource_group_name().empty()) { _this->_internal_set_resource_group_name(from._internal_resource_group_name()); } if (!from._internal_source_stmt().empty()) { _this->_internal_set_source_stmt(from._internal_source_stmt()); } - if (from._internal_has_region_epoch()) { - _this->_internal_mutable_region_epoch()->::metapb::RegionEpoch::MergeFrom( - from._internal_region_epoch()); - } - if (from._internal_has_peer()) { - _this->_internal_mutable_peer()->::metapb::Peer::MergeFrom( - from._internal_peer()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_region_epoch()->::metapb::RegionEpoch::MergeFrom( + from._internal_region_epoch()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_peer()->::metapb::Peer::MergeFrom( + from._internal_peer()); + } } if (from._internal_region_id() != 0) { _this->_internal_set_region_id(from._internal_region_id()); @@ -1462,7 +1793,7 @@ void Context::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOB if (from._internal_request_source() != 0) { _this->_internal_set_request_source(from._internal_request_source()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Context::CopyFrom(const Context& from) { @@ -1472,25 +1803,23 @@ void Context::CopyFrom(const Context& from) { MergeFrom(from); } -bool Context::IsInitialized() const { +PROTOBUF_NOINLINE bool Context::IsInitialized() const { return true; } -void Context::InternalSwap(Context* other) { +::_pbi::CachedSize* Context::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Context::InternalSwap(Context* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.resolved_locks_.InternalSwap(&other->_impl_.resolved_locks_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.resource_group_name_, lhs_arena, - &other->_impl_.resource_group_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.source_stmt_, lhs_arena, - &other->_impl_.source_stmt_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.resource_group_name_, &other->_impl_.resource_group_name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.source_stmt_, &other->_impl_.source_stmt_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(Context, _impl_.request_source_) + sizeof(Context::_impl_.request_source_) - PROTOBUF_FIELD_OFFSET(Context, _impl_.region_epoch_)>( @@ -1498,255 +1827,233 @@ void Context::InternalSwap(Context* other) { reinterpret_cast(&other->_impl_.region_epoch_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Context::GetMetadata() const { +::google::protobuf::Metadata Context::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[0]); } - // =================================================================== class KvPair::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(KvPair, _impl_._has_bits_); static const ::errorpb::Error& error(const KvPair* msg); + static void set_has_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -KvPair::_Internal::error(const KvPair* msg) { +const ::errorpb::Error& KvPair::_Internal::error(const KvPair* msg) { return *msg->_impl_.error_; } void KvPair::clear_error() { - if (GetArenaForAllocation() == nullptr && _impl_.error_ != nullptr) { - delete _impl_.error_; - } - _impl_.error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.error_ != nullptr) _impl_.error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -KvPair::KvPair(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +KvPair::KvPair(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.KvPair) } -KvPair::KvPair(const KvPair& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - KvPair* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , decltype(_impl_.error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_error()) { - _this->_impl_.error_ = new ::errorpb::Error(*from._impl_.error_); - } +inline PROTOBUF_NDEBUG_INLINE KvPair::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + key_(arena, from.key_), + value_(arena, from.value_) {} + +KvPair::KvPair( + ::google::protobuf::Arena* arena, + const KvPair& from) + : ::google::protobuf::Message(arena) { + KvPair* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.error_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.KvPair) } +inline PROTOBUF_NDEBUG_INLINE KvPair::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + key_(arena), + value_(arena) {} -inline void KvPair::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , decltype(_impl_.error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KvPair::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.error_ = {}; } - KvPair::~KvPair() { // @@protoc_insertion_point(destructor:kvrpcpb.KvPair) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void KvPair::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.key_.Destroy(); _impl_.value_.Destroy(); - if (this != internal_default_instance()) delete _impl_.error_; + delete _impl_.error_; + _impl_.~Impl_(); } -void KvPair::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void KvPair::Clear() { +PROTOBUF_NOINLINE void KvPair::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.KvPair) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.key_.ClearToEmpty(); _impl_.value_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.error_ != nullptr) { - delete _impl_.error_; - } - _impl_.error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* KvPair::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes value = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.error_ != nullptr); + _impl_.error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* KvPair::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* KvPair::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 0, 2> KvPair::_table_ = { + { + PROTOBUF_FIELD_OFFSET(KvPair, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_KvPair_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .errorpb.Error error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(KvPair, _impl_.error_)}}, + // bytes key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(KvPair, _impl_.key_)}}, + // bytes value = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(KvPair, _impl_.value_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error error = 1; + {PROTOBUF_FIELD_OFFSET(KvPair, _impl_.error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes key = 2; + {PROTOBUF_FIELD_OFFSET(KvPair, _impl_.key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes value = 3; + {PROTOBUF_FIELD_OFFSET(KvPair, _impl_.value_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + }}, +}; + +::uint8_t* KvPair::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.KvPair) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error error = 1; - if (this->_internal_has_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::error(this), _Internal::error(this).GetCachedSize(), target, stream); } // bytes key = 2; if (!this->_internal_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_key(), target); + const std::string& _s = this->_internal_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // bytes value = 3; if (!this->_internal_value().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_value(), target); + const std::string& _s = this->_internal_value(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.KvPair) return target; } -size_t KvPair::ByteSizeLong() const { +::size_t KvPair::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.KvPair) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes key = 2; if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_key()); } // bytes value = 3; if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_value()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_value()); } // .errorpb.Error error = 1; - if (this->_internal_has_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KvPair::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - KvPair::MergeImpl +const ::google::protobuf::Message::ClassData KvPair::_class_data_ = { + KvPair::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KvPair::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* KvPair::GetClassData() const { + return &_class_data_; +} -void KvPair::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void KvPair::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.KvPair) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_key().empty()) { @@ -1755,11 +2062,11 @@ void KvPair::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBU if (!from._internal_value().empty()) { _this->_internal_set_value(from._internal_value()); } - if (from._internal_has_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_error()->::errorpb::Error::MergeFrom( from._internal_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void KvPair::CopyFrom(const KvPair& from) { @@ -1769,274 +2076,251 @@ void KvPair::CopyFrom(const KvPair& from) { MergeFrom(from); } -bool KvPair::IsInitialized() const { +PROTOBUF_NOINLINE bool KvPair::IsInitialized() const { return true; } -void KvPair::InternalSwap(KvPair* other) { +::_pbi::CachedSize* KvPair::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void KvPair::InternalSwap(KvPair* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); swap(_impl_.error_, other->_impl_.error_); } -::PROTOBUF_NAMESPACE_ID::Metadata KvPair::GetMetadata() const { +::google::protobuf::Metadata KvPair::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[1]); } - // =================================================================== class RawGetRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawGetRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawGetRequest::_Internal::context(const RawGetRequest* msg) { +const ::kvrpcpb::Context& RawGetRequest::_Internal::context(const RawGetRequest* msg) { return *msg->_impl_.context_; } -RawGetRequest::RawGetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawGetRequest::RawGetRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawGetRequest) } -RawGetRequest::RawGetRequest(const RawGetRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawGetRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } +inline PROTOBUF_NDEBUG_INLINE RawGetRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + key_(arena, from.key_), + cf_(arena, from.cf_) {} + +RawGetRequest::RawGetRequest( + ::google::protobuf::Arena* arena, + const RawGetRequest& from) + : ::google::protobuf::Message(arena) { + RawGetRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawGetRequest) } +inline PROTOBUF_NDEBUG_INLINE RawGetRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + key_(arena), + cf_(arena) {} -inline void RawGetRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawGetRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.context_ = {}; } - RawGetRequest::~RawGetRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawGetRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawGetRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.key_.Destroy(); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; + delete _impl_.context_; + _impl_.~Impl_(); } -void RawGetRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RawGetRequest::Clear() { +PROTOBUF_NOINLINE void RawGetRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawGetRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.key_.ClearToEmpty(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawGetRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string cf = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawGetRequest.cf")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawGetRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawGetRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 32, 2> RawGetRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawGetRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_.context_)}}, + // bytes key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_.key_)}}, + // string cf = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_.cf_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes key = 2; + {PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_.key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // string cf = 3; + {PROTOBUF_FIELD_OFFSET(RawGetRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\25\0\0\2\0\0\0\0" + "kvrpcpb.RawGetRequest" + "cf" + }}, +}; + +::uint8_t* RawGetRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawGetRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // bytes key = 2; if (!this->_internal_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_key(), target); + const std::string& _s = this->_internal_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // string cf = 3; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawGetRequest.cf"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawGetRequest.cf"); + target = stream->WriteStringMaybeAliased(3, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawGetRequest) return target; } -size_t RawGetRequest::ByteSizeLong() const { +::size_t RawGetRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawGetRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes key = 2; if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_key()); } // string cf = 3; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawGetRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawGetRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawGetRequest::_class_data_ = { + RawGetRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawGetRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawGetRequest::GetClassData() const { + return &_class_data_; +} -void RawGetRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawGetRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawGetRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_key().empty()) { @@ -2045,11 +2329,11 @@ void RawGetRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawGetRequest::CopyFrom(const RawGetRequest& from) { @@ -2059,303 +2343,280 @@ void RawGetRequest::CopyFrom(const RawGetRequest& from) { MergeFrom(from); } -bool RawGetRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawGetRequest::IsInitialized() const { return true; } -void RawGetRequest::InternalSwap(RawGetRequest* other) { +::_pbi::CachedSize* RawGetRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawGetRequest::InternalSwap(RawGetRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); swap(_impl_.context_, other->_impl_.context_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawGetRequest::GetMetadata() const { +::google::protobuf::Metadata RawGetRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[2]); } - // =================================================================== class RawGetResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawGetResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawGetResponse::_Internal::region_error(const RawGetResponse* msg) { +const ::errorpb::Error& RawGetResponse::_Internal::region_error(const RawGetResponse* msg) { return *msg->_impl_.region_error_; } void RawGetResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawGetResponse::RawGetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawGetResponse::RawGetResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawGetResponse) } -RawGetResponse::RawGetResponse(const RawGetResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawGetResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.value_){} - , decltype(_impl_.region_error_){nullptr} - , decltype(_impl_.not_found_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } - _this->_impl_.not_found_ = from._impl_.not_found_; +inline PROTOBUF_NDEBUG_INLINE RawGetResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_), + value_(arena, from.value_) {} + +RawGetResponse::RawGetResponse( + ::google::protobuf::Arena* arena, + const RawGetResponse& from) + : ::google::protobuf::Message(arena) { + RawGetResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + _impl_.not_found_ = from._impl_.not_found_; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawGetResponse) } - -inline void RawGetResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.value_){} - , decltype(_impl_.region_error_){nullptr} - , decltype(_impl_.not_found_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE RawGetResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena), + value_(arena) {} + +inline void RawGetResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, region_error_), + 0, + offsetof(Impl_, not_found_) - + offsetof(Impl_, region_error_) + + sizeof(Impl_::not_found_)); } - RawGetResponse::~RawGetResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawGetResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawGetResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.error_.Destroy(); _impl_.value_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; -} - -void RawGetResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawGetResponse::Clear() { +PROTOBUF_NOINLINE void RawGetResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawGetResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); _impl_.value_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); } - _impl_.region_error_ = nullptr; _impl_.not_found_ = false; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawGetResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawGetResponse.error")); - } else - goto handle_unusual; - continue; - // bytes value = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool not_found = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.not_found_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawGetResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawGetResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 1, 36, 2> RawGetResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawGetResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // bool not_found = 4; + {::_pbi::TcParser::SingularVarintNoZag1(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.not_found_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.region_error_)}}, + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.error_)}}, + // bytes value = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.value_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes value = 3; + {PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.value_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bool not_found = 4; + {PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.not_found_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\26\0\5\0\0\0\0\0" + "kvrpcpb.RawGetResponse" + "error" + }}, +}; + +::uint8_t* RawGetResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawGetResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawGetResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawGetResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } // bytes value = 3; if (!this->_internal_value().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_value(), target); + const std::string& _s = this->_internal_value(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } // bool not_found = 4; if (this->_internal_not_found() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_not_found(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_not_found(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawGetResponse) return target; } -size_t RawGetResponse::ByteSizeLong() const { +::size_t RawGetResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawGetResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // bytes value = 3; if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_value()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_value()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } // bool not_found = 4; if (this->_internal_not_found() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawGetResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawGetResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawGetResponse::_class_data_ = { + RawGetResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawGetResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawGetResponse::GetClassData() const { + return &_class_data_; +} -void RawGetResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawGetResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawGetResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { @@ -2364,14 +2625,14 @@ void RawGetResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : if (!from._internal_value().empty()) { _this->_internal_set_value(from._internal_value()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } if (from._internal_not_found() != 0) { _this->_internal_set_not_found(from._internal_not_found()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawGetResponse::CopyFrom(const RawGetResponse& from) { @@ -2381,24 +2642,22 @@ void RawGetResponse::CopyFrom(const RawGetResponse& from) { MergeFrom(from); } -bool RawGetResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawGetResponse::IsInitialized() const { return true; } -void RawGetResponse::InternalSwap(RawGetResponse* other) { +::_pbi::CachedSize* RawGetResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawGetResponse::InternalSwap(RawGetResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.not_found_) + sizeof(RawGetResponse::_impl_.not_found_) - PROTOBUF_FIELD_OFFSET(RawGetResponse, _impl_.region_error_)>( @@ -2406,259 +2665,243 @@ void RawGetResponse::InternalSwap(RawGetResponse* other) { reinterpret_cast(&other->_impl_.region_error_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RawGetResponse::GetMetadata() const { +::google::protobuf::Metadata RawGetResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[3]); } - // =================================================================== class RawBatchGetRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawBatchGetRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawBatchGetRequest::_Internal::context(const RawBatchGetRequest* msg) { +const ::kvrpcpb::Context& RawBatchGetRequest::_Internal::context(const RawBatchGetRequest* msg) { return *msg->_impl_.context_; } -RawBatchGetRequest::RawBatchGetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawBatchGetRequest::RawBatchGetRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawBatchGetRequest) } -RawBatchGetRequest::RawBatchGetRequest(const RawBatchGetRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawBatchGetRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.keys_){from._impl_.keys_} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } +inline PROTOBUF_NDEBUG_INLINE RawBatchGetRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + keys_{visibility, arena, from.keys_}, + cf_(arena, from.cf_) {} + +RawBatchGetRequest::RawBatchGetRequest( + ::google::protobuf::Arena* arena, + const RawBatchGetRequest& from) + : ::google::protobuf::Message(arena) { + RawBatchGetRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawBatchGetRequest) } +inline PROTOBUF_NDEBUG_INLINE RawBatchGetRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + keys_{visibility, arena}, + cf_(arena) {} -inline void RawBatchGetRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.keys_){arena} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchGetRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.context_ = {}; } - RawBatchGetRequest::~RawBatchGetRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawBatchGetRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawBatchGetRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.keys_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; -} - -void RawBatchGetRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.context_; + _impl_.~Impl_(); } -void RawBatchGetRequest::Clear() { +PROTOBUF_NOINLINE void RawBatchGetRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawBatchGetRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.keys_.Clear(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawBatchGetRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated bytes keys = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_keys(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // string cf = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawBatchGetRequest.cf")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawBatchGetRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawBatchGetRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 37, 2> RawBatchGetRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawBatchGetRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_.context_)}}, + // repeated bytes keys = 2; + {::_pbi::TcParser::FastBR1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_.keys_)}}, + // string cf = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_.cf_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated bytes keys = 2; + {PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_.keys_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // string cf = 3; + {PROTOBUF_FIELD_OFFSET(RawBatchGetRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\32\0\0\2\0\0\0\0" + "kvrpcpb.RawBatchGetRequest" + "cf" + }}, +}; + +::uint8_t* RawBatchGetRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawBatchGetRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // repeated bytes keys = 2; - for (int i = 0, n = this->_internal_keys_size(); i < n; i++) { - const auto& s = this->_internal_keys(i); + for (int i = 0, n = this->_internal_keys_size(); i < n; ++i) { + const auto& s = this->_internal_keys().Get(i); target = stream->WriteBytes(2, s, target); } // string cf = 3; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawBatchGetRequest.cf"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawBatchGetRequest.cf"); + target = stream->WriteStringMaybeAliased(3, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawBatchGetRequest) return target; } -size_t RawBatchGetRequest::ByteSizeLong() const { +::size_t RawBatchGetRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawBatchGetRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated bytes keys = 2; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.keys_.size()); - for (int i = 0, n = _impl_.keys_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - _impl_.keys_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_keys().size()); + for (int i = 0, n = _internal_keys().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + _internal_keys().Get(i)); } - // string cf = 3; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawBatchGetRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawBatchGetRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawBatchGetRequest::_class_data_ = { + RawBatchGetRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawBatchGetRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawBatchGetRequest::GetClassData() const { + return &_class_data_; +} -void RawBatchGetRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawBatchGetRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawBatchGetRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.keys_.MergeFrom(from._impl_.keys_); + _this->_internal_mutable_keys()->MergeFrom(from._internal_keys()); if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawBatchGetRequest::CopyFrom(const RawBatchGetRequest& from) { @@ -2668,236 +2911,239 @@ void RawBatchGetRequest::CopyFrom(const RawBatchGetRequest& from) { MergeFrom(from); } -bool RawBatchGetRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawBatchGetRequest::IsInitialized() const { return true; } -void RawBatchGetRequest::InternalSwap(RawBatchGetRequest* other) { +::_pbi::CachedSize* RawBatchGetRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawBatchGetRequest::InternalSwap(RawBatchGetRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.keys_.InternalSwap(&other->_impl_.keys_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); swap(_impl_.context_, other->_impl_.context_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawBatchGetRequest::GetMetadata() const { +::google::protobuf::Metadata RawBatchGetRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[4]); } - // =================================================================== class RawBatchGetResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawBatchGetResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawBatchGetResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawBatchGetResponse::_Internal::region_error(const RawBatchGetResponse* msg) { +const ::errorpb::Error& RawBatchGetResponse::_Internal::region_error(const RawBatchGetResponse* msg) { return *msg->_impl_.region_error_; } void RawBatchGetResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawBatchGetResponse::RawBatchGetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawBatchGetResponse::RawBatchGetResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawBatchGetResponse) } -RawBatchGetResponse::RawBatchGetResponse(const RawBatchGetResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawBatchGetResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.pairs_){from._impl_.pairs_} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE RawBatchGetResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + pairs_{visibility, arena, from.pairs_} {} + +RawBatchGetResponse::RawBatchGetResponse( + ::google::protobuf::Arena* arena, + const RawBatchGetResponse& from) + : ::google::protobuf::Message(arena) { + RawBatchGetResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawBatchGetResponse) } +inline PROTOBUF_NDEBUG_INLINE RawBatchGetResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + pairs_{visibility, arena} {} -inline void RawBatchGetResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.pairs_){arena} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void RawBatchGetResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawBatchGetResponse::~RawBatchGetResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawBatchGetResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawBatchGetResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.pairs_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.region_error_; + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawBatchGetResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RawBatchGetResponse::Clear() { +PROTOBUF_NOINLINE void RawBatchGetResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawBatchGetResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.pairs_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawBatchGetResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .kvrpcpb.KvPair pairs = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_pairs(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawBatchGetResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawBatchGetResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> RawBatchGetResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawBatchGetResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawBatchGetResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // repeated .kvrpcpb.KvPair pairs = 2; + {::_pbi::TcParser::FastMtR1, + {18, 63, 1, PROTOBUF_FIELD_OFFSET(RawBatchGetResponse, _impl_.pairs_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawBatchGetResponse, _impl_.region_error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawBatchGetResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .kvrpcpb.KvPair pairs = 2; + {PROTOBUF_FIELD_OFFSET(RawBatchGetResponse, _impl_.pairs_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + {::_pbi::TcParser::GetTable<::kvrpcpb::KvPair>()}, + }}, {{ + }}, +}; + +::uint8_t* RawBatchGetResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawBatchGetResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // repeated .kvrpcpb.KvPair pairs = 2; for (unsigned i = 0, n = static_cast(this->_internal_pairs_size()); i < n; i++) { - const auto& repfield = this->_internal_pairs(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_pairs().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawBatchGetResponse) return target; } -size_t RawBatchGetResponse::ByteSizeLong() const { +::size_t RawBatchGetResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawBatchGetResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .kvrpcpb.KvPair pairs = 2; total_size += 1UL * this->_internal_pairs_size(); - for (const auto& msg : this->_impl_.pairs_) { + for (const auto& msg : this->_internal_pairs()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawBatchGetResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawBatchGetResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawBatchGetResponse::_class_data_ = { + RawBatchGetResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawBatchGetResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawBatchGetResponse::GetClassData() const { + return &_class_data_; +} -void RawBatchGetResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawBatchGetResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawBatchGetResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.pairs_.MergeFrom(from._impl_.pairs_); - if (from._internal_has_region_error()) { + _this->_internal_mutable_pairs()->MergeFrom( + from._internal_pairs()); + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawBatchGetResponse::CopyFrom(const RawBatchGetResponse& from) { @@ -2907,351 +3153,323 @@ void RawBatchGetResponse::CopyFrom(const RawBatchGetResponse& from) { MergeFrom(from); } -bool RawBatchGetResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawBatchGetResponse::IsInitialized() const { return true; } -void RawBatchGetResponse::InternalSwap(RawBatchGetResponse* other) { +::_pbi::CachedSize* RawBatchGetResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawBatchGetResponse::InternalSwap(RawBatchGetResponse* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.pairs_.InternalSwap(&other->_impl_.pairs_); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawBatchGetResponse::GetMetadata() const { +::google::protobuf::Metadata RawBatchGetResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[5]); } - // =================================================================== class RawPutRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawPutRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawPutRequest::_Internal::context(const RawPutRequest* msg) { +const ::kvrpcpb::Context& RawPutRequest::_Internal::context(const RawPutRequest* msg) { return *msg->_impl_.context_; } -RawPutRequest::RawPutRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawPutRequest::RawPutRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawPutRequest) } -RawPutRequest::RawPutRequest(const RawPutRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawPutRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.ttl_){} - , decltype(_impl_.for_cas_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } - ::memcpy(&_impl_.ttl_, &from._impl_.ttl_, - static_cast(reinterpret_cast(&_impl_.for_cas_) - - reinterpret_cast(&_impl_.ttl_)) + sizeof(_impl_.for_cas_)); +inline PROTOBUF_NDEBUG_INLINE RawPutRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + key_(arena, from.key_), + value_(arena, from.value_), + cf_(arena, from.cf_) {} + +RawPutRequest::RawPutRequest( + ::google::protobuf::Arena* arena, + const RawPutRequest& from) + : ::google::protobuf::Message(arena) { + RawPutRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, ttl_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, ttl_), + offsetof(Impl_, for_cas_) - + offsetof(Impl_, ttl_) + + sizeof(Impl_::for_cas_)); + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawPutRequest) } - -inline void RawPutRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.ttl_){uint64_t{0u}} - , decltype(_impl_.for_cas_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE RawPutRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + key_(arena), + value_(arena), + cf_(arena) {} + +inline void RawPutRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, context_), + 0, + offsetof(Impl_, for_cas_) - + offsetof(Impl_, context_) + + sizeof(Impl_::for_cas_)); } - RawPutRequest::~RawPutRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawPutRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawPutRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.key_.Destroy(); _impl_.value_.Destroy(); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; -} - -void RawPutRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.context_; + _impl_.~Impl_(); } -void RawPutRequest::Clear() { +PROTOBUF_NOINLINE void RawPutRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawPutRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.key_.ClearToEmpty(); _impl_.value_.ClearToEmpty(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); } - _impl_.context_ = nullptr; - ::memset(&_impl_.ttl_, 0, static_cast( + ::memset(&_impl_.ttl_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.for_cas_) - reinterpret_cast(&_impl_.ttl_)) + sizeof(_impl_.for_cas_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawPutRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes value = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string cf = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawPutRequest.cf")); - } else - goto handle_unusual; - continue; - // uint64 ttl = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.ttl_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool for_cas = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.for_cas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawPutRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawPutRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 6, 1, 32, 2> RawPutRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_._has_bits_), + 0, // no _extensions_ + 6, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967232, // skipmap + offsetof(decltype(_table_), field_entries), + 6, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawPutRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.context_)}}, + // bytes key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.key_)}}, + // bytes value = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.value_)}}, + // string cf = 4; + {::_pbi::TcParser::FastUS1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.cf_)}}, + // uint64 ttl = 5; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RawPutRequest, _impl_.ttl_), 63>(), + {40, 63, 0, PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.ttl_)}}, + // bool for_cas = 6; + {::_pbi::TcParser::SingularVarintNoZag1(), + {48, 63, 0, PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.for_cas_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes key = 2; + {PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes value = 3; + {PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.value_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // string cf = 4; + {PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 ttl = 5; + {PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.ttl_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // bool for_cas = 6; + {PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.for_cas_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\25\0\0\0\2\0\0\0" + "kvrpcpb.RawPutRequest" + "cf" + }}, +}; + +::uint8_t* RawPutRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawPutRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // bytes key = 2; if (!this->_internal_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_key(), target); + const std::string& _s = this->_internal_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // bytes value = 3; if (!this->_internal_value().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_value(), target); + const std::string& _s = this->_internal_value(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } // string cf = 4; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawPutRequest.cf"); - target = stream->WriteStringMaybeAliased( - 4, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawPutRequest.cf"); + target = stream->WriteStringMaybeAliased(4, _s, target); } // uint64 ttl = 5; if (this->_internal_ttl() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_ttl(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 5, this->_internal_ttl(), target); } // bool for_cas = 6; if (this->_internal_for_cas() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_for_cas(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 6, this->_internal_for_cas(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawPutRequest) return target; } -size_t RawPutRequest::ByteSizeLong() const { +::size_t RawPutRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawPutRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes key = 2; if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_key()); } // bytes value = 3; if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_value()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_value()); } // string cf = 4; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } // uint64 ttl = 5; if (this->_internal_ttl() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_ttl()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_ttl()); } // bool for_cas = 6; if (this->_internal_for_cas() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawPutRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawPutRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawPutRequest::_class_data_ = { + RawPutRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawPutRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawPutRequest::GetClassData() const { + return &_class_data_; +} -void RawPutRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawPutRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawPutRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_key().empty()) { @@ -3263,7 +3481,7 @@ void RawPutRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } @@ -3273,7 +3491,7 @@ void RawPutRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_for_cas() != 0) { _this->_internal_set_for_cas(from._internal_for_cas()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawPutRequest::CopyFrom(const RawPutRequest& from) { @@ -3283,28 +3501,23 @@ void RawPutRequest::CopyFrom(const RawPutRequest& from) { MergeFrom(from); } -bool RawPutRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawPutRequest::IsInitialized() const { return true; } -void RawPutRequest::InternalSwap(RawPutRequest* other) { +::_pbi::CachedSize* RawPutRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawPutRequest::InternalSwap(RawPutRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.for_cas_) + sizeof(RawPutRequest::_impl_.for_cas_) - PROTOBUF_FIELD_OFFSET(RawPutRequest, _impl_.context_)>( @@ -3312,232 +3525,225 @@ void RawPutRequest::InternalSwap(RawPutRequest* other) { reinterpret_cast(&other->_impl_.context_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RawPutRequest::GetMetadata() const { +::google::protobuf::Metadata RawPutRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[6]); } - // =================================================================== class RawPutResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawPutResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawPutResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawPutResponse::_Internal::region_error(const RawPutResponse* msg) { +const ::errorpb::Error& RawPutResponse::_Internal::region_error(const RawPutResponse* msg) { return *msg->_impl_.region_error_; } void RawPutResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawPutResponse::RawPutResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawPutResponse::RawPutResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawPutResponse) } -RawPutResponse::RawPutResponse(const RawPutResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawPutResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } +inline PROTOBUF_NDEBUG_INLINE RawPutResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_) {} + +RawPutResponse::RawPutResponse( + ::google::protobuf::Arena* arena, + const RawPutResponse& from) + : ::google::protobuf::Message(arena) { + RawPutResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawPutResponse) } +inline PROTOBUF_NDEBUG_INLINE RawPutResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena) {} -inline void RawPutResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawPutResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawPutResponse::~RawPutResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawPutResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawPutResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.error_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; -} - -void RawPutResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawPutResponse::Clear() { +PROTOBUF_NOINLINE void RawPutResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawPutResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawPutResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawPutResponse.error")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawPutResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawPutResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 36, 2> RawPutResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawPutResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawPutResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawPutResponse, _impl_.error_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawPutResponse, _impl_.region_error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawPutResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawPutResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\26\0\5\0\0\0\0\0" + "kvrpcpb.RawPutResponse" + "error" + }}, +}; + +::uint8_t* RawPutResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawPutResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawPutResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawPutResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawPutResponse) return target; } -size_t RawPutResponse::ByteSizeLong() const { +::size_t RawPutResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawPutResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawPutResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawPutResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawPutResponse::_class_data_ = { + RawPutResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawPutResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawPutResponse::GetClassData() const { + return &_class_data_; +} -void RawPutResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawPutResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawPutResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { _this->_internal_set_error(from._internal_error()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawPutResponse::CopyFrom(const RawPutResponse& from) { @@ -3547,319 +3753,314 @@ void RawPutResponse::CopyFrom(const RawPutResponse& from) { MergeFrom(from); } -bool RawPutResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawPutResponse::IsInitialized() const { return true; } -void RawPutResponse::InternalSwap(RawPutResponse* other) { +::_pbi::CachedSize* RawPutResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawPutResponse::InternalSwap(RawPutResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawPutResponse::GetMetadata() const { +::google::protobuf::Metadata RawPutResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[7]); } - // =================================================================== class RawBatchPutRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawBatchPutRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawBatchPutRequest::_Internal::context(const RawBatchPutRequest* msg) { +const ::kvrpcpb::Context& RawBatchPutRequest::_Internal::context(const RawBatchPutRequest* msg) { return *msg->_impl_.context_; } -RawBatchPutRequest::RawBatchPutRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawBatchPutRequest::RawBatchPutRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawBatchPutRequest) } -RawBatchPutRequest::RawBatchPutRequest(const RawBatchPutRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawBatchPutRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.pairs_){from._impl_.pairs_} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.ttl_){} - , decltype(_impl_.for_cas_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } - ::memcpy(&_impl_.ttl_, &from._impl_.ttl_, - static_cast(reinterpret_cast(&_impl_.for_cas_) - - reinterpret_cast(&_impl_.ttl_)) + sizeof(_impl_.for_cas_)); +inline PROTOBUF_NDEBUG_INLINE RawBatchPutRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + pairs_{visibility, arena, from.pairs_}, + cf_(arena, from.cf_) {} + +RawBatchPutRequest::RawBatchPutRequest( + ::google::protobuf::Arena* arena, + const RawBatchPutRequest& from) + : ::google::protobuf::Message(arena) { + RawBatchPutRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, ttl_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, ttl_), + offsetof(Impl_, for_cas_) - + offsetof(Impl_, ttl_) + + sizeof(Impl_::for_cas_)); + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawBatchPutRequest) } - -inline void RawBatchPutRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.pairs_){arena} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.ttl_){uint64_t{0u}} - , decltype(_impl_.for_cas_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE RawBatchPutRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + pairs_{visibility, arena}, + cf_(arena) {} + +inline void RawBatchPutRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, context_), + 0, + offsetof(Impl_, for_cas_) - + offsetof(Impl_, context_) + + sizeof(Impl_::for_cas_)); } - RawBatchPutRequest::~RawBatchPutRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawBatchPutRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawBatchPutRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.pairs_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; -} - -void RawBatchPutRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.context_; + _impl_.~Impl_(); } -void RawBatchPutRequest::Clear() { +PROTOBUF_NOINLINE void RawBatchPutRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawBatchPutRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.pairs_.Clear(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); } - _impl_.context_ = nullptr; - ::memset(&_impl_.ttl_, 0, static_cast( + ::memset(&_impl_.ttl_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.for_cas_) - reinterpret_cast(&_impl_.ttl_)) + sizeof(_impl_.for_cas_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawBatchPutRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .kvrpcpb.KvPair pairs = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_pairs(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // string cf = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawBatchPutRequest.cf")); - } else - goto handle_unusual; - continue; - // uint64 ttl = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.ttl_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool for_cas = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.for_cas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawBatchPutRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawBatchPutRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 2, 37, 2> RawBatchPutRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawBatchPutRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.context_)}}, + // repeated .kvrpcpb.KvPair pairs = 2; + {::_pbi::TcParser::FastMtR1, + {18, 63, 1, PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.pairs_)}}, + // string cf = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.cf_)}}, + // uint64 ttl = 4; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RawBatchPutRequest, _impl_.ttl_), 63>(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.ttl_)}}, + // bool for_cas = 5; + {::_pbi::TcParser::SingularVarintNoZag1(), + {40, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.for_cas_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .kvrpcpb.KvPair pairs = 2; + {PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.pairs_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // string cf = 3; + {PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 ttl = 4; + {PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.ttl_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // bool for_cas = 5; + {PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.for_cas_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + {::_pbi::TcParser::GetTable<::kvrpcpb::KvPair>()}, + }}, {{ + "\32\0\0\2\0\0\0\0" + "kvrpcpb.RawBatchPutRequest" + "cf" + }}, +}; + +::uint8_t* RawBatchPutRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawBatchPutRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // repeated .kvrpcpb.KvPair pairs = 2; for (unsigned i = 0, n = static_cast(this->_internal_pairs_size()); i < n; i++) { - const auto& repfield = this->_internal_pairs(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_pairs().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); } // string cf = 3; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawBatchPutRequest.cf"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawBatchPutRequest.cf"); + target = stream->WriteStringMaybeAliased(3, _s, target); } // uint64 ttl = 4; if (this->_internal_ttl() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_ttl(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 4, this->_internal_ttl(), target); } // bool for_cas = 5; if (this->_internal_for_cas() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_for_cas(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this->_internal_for_cas(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawBatchPutRequest) return target; } -size_t RawBatchPutRequest::ByteSizeLong() const { +::size_t RawBatchPutRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawBatchPutRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .kvrpcpb.KvPair pairs = 2; total_size += 1UL * this->_internal_pairs_size(); - for (const auto& msg : this->_impl_.pairs_) { + for (const auto& msg : this->_internal_pairs()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // string cf = 3; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } // uint64 ttl = 4; if (this->_internal_ttl() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_ttl()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_ttl()); } // bool for_cas = 5; if (this->_internal_for_cas() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawBatchPutRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawBatchPutRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawBatchPutRequest::_class_data_ = { + RawBatchPutRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawBatchPutRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawBatchPutRequest::GetClassData() const { + return &_class_data_; +} -void RawBatchPutRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawBatchPutRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawBatchPutRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.pairs_.MergeFrom(from._impl_.pairs_); + _this->_internal_mutable_pairs()->MergeFrom( + from._internal_pairs()); if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } @@ -3869,7 +4070,7 @@ void RawBatchPutRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, con if (from._internal_for_cas() != 0) { _this->_internal_set_for_cas(from._internal_for_cas()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawBatchPutRequest::CopyFrom(const RawBatchPutRequest& from) { @@ -3879,21 +4080,22 @@ void RawBatchPutRequest::CopyFrom(const RawBatchPutRequest& from) { MergeFrom(from); } -bool RawBatchPutRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawBatchPutRequest::IsInitialized() const { return true; } -void RawBatchPutRequest::InternalSwap(RawBatchPutRequest* other) { +::_pbi::CachedSize* RawBatchPutRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawBatchPutRequest::InternalSwap(RawBatchPutRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.pairs_.InternalSwap(&other->_impl_.pairs_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.for_cas_) + sizeof(RawBatchPutRequest::_impl_.for_cas_) - PROTOBUF_FIELD_OFFSET(RawBatchPutRequest, _impl_.context_)>( @@ -3901,232 +4103,225 @@ void RawBatchPutRequest::InternalSwap(RawBatchPutRequest* other) { reinterpret_cast(&other->_impl_.context_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RawBatchPutRequest::GetMetadata() const { +::google::protobuf::Metadata RawBatchPutRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[8]); } - // =================================================================== class RawBatchPutResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawBatchPutResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawBatchPutResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawBatchPutResponse::_Internal::region_error(const RawBatchPutResponse* msg) { +const ::errorpb::Error& RawBatchPutResponse::_Internal::region_error(const RawBatchPutResponse* msg) { return *msg->_impl_.region_error_; } void RawBatchPutResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawBatchPutResponse::RawBatchPutResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawBatchPutResponse::RawBatchPutResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawBatchPutResponse) } -RawBatchPutResponse::RawBatchPutResponse(const RawBatchPutResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawBatchPutResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } +inline PROTOBUF_NDEBUG_INLINE RawBatchPutResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_) {} + +RawBatchPutResponse::RawBatchPutResponse( + ::google::protobuf::Arena* arena, + const RawBatchPutResponse& from) + : ::google::protobuf::Message(arena) { + RawBatchPutResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawBatchPutResponse) } +inline PROTOBUF_NDEBUG_INLINE RawBatchPutResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena) {} -inline void RawBatchPutResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchPutResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawBatchPutResponse::~RawBatchPutResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawBatchPutResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawBatchPutResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.error_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; -} - -void RawBatchPutResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawBatchPutResponse::Clear() { +PROTOBUF_NOINLINE void RawBatchPutResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawBatchPutResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawBatchPutResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawBatchPutResponse.error")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawBatchPutResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawBatchPutResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 41, 2> RawBatchPutResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawBatchPutResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawBatchPutResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchPutResponse, _impl_.error_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawBatchPutResponse, _impl_.region_error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawBatchPutResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawBatchPutResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\33\0\5\0\0\0\0\0" + "kvrpcpb.RawBatchPutResponse" + "error" + }}, +}; + +::uint8_t* RawBatchPutResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawBatchPutResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawBatchPutResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawBatchPutResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawBatchPutResponse) return target; } -size_t RawBatchPutResponse::ByteSizeLong() const { +::size_t RawBatchPutResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawBatchPutResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawBatchPutResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawBatchPutResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawBatchPutResponse::_class_data_ = { + RawBatchPutResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawBatchPutResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawBatchPutResponse::GetClassData() const { + return &_class_data_; +} -void RawBatchPutResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawBatchPutResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawBatchPutResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { _this->_internal_set_error(from._internal_error()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawBatchPutResponse::CopyFrom(const RawBatchPutResponse& from) { @@ -4136,293 +4331,274 @@ void RawBatchPutResponse::CopyFrom(const RawBatchPutResponse& from) { MergeFrom(from); } -bool RawBatchPutResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawBatchPutResponse::IsInitialized() const { return true; } -void RawBatchPutResponse::InternalSwap(RawBatchPutResponse* other) { +::_pbi::CachedSize* RawBatchPutResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawBatchPutResponse::InternalSwap(RawBatchPutResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawBatchPutResponse::GetMetadata() const { +::google::protobuf::Metadata RawBatchPutResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[9]); } - // =================================================================== class RawDeleteRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawDeleteRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawDeleteRequest::_Internal::context(const RawDeleteRequest* msg) { +const ::kvrpcpb::Context& RawDeleteRequest::_Internal::context(const RawDeleteRequest* msg) { return *msg->_impl_.context_; } -RawDeleteRequest::RawDeleteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawDeleteRequest::RawDeleteRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawDeleteRequest) } -RawDeleteRequest::RawDeleteRequest(const RawDeleteRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawDeleteRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.for_cas_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } - _this->_impl_.for_cas_ = from._impl_.for_cas_; +inline PROTOBUF_NDEBUG_INLINE RawDeleteRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + key_(arena, from.key_), + cf_(arena, from.cf_) {} + +RawDeleteRequest::RawDeleteRequest( + ::google::protobuf::Arena* arena, + const RawDeleteRequest& from) + : ::google::protobuf::Message(arena) { + RawDeleteRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + _impl_.for_cas_ = from._impl_.for_cas_; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawDeleteRequest) } - -inline void RawDeleteRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.for_cas_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE RawDeleteRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + key_(arena), + cf_(arena) {} + +inline void RawDeleteRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, context_), + 0, + offsetof(Impl_, for_cas_) - + offsetof(Impl_, context_) + + sizeof(Impl_::for_cas_)); } - RawDeleteRequest::~RawDeleteRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawDeleteRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawDeleteRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.key_.Destroy(); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; + delete _impl_.context_; + _impl_.~Impl_(); } -void RawDeleteRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RawDeleteRequest::Clear() { +PROTOBUF_NOINLINE void RawDeleteRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawDeleteRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.key_.ClearToEmpty(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); } - _impl_.context_ = nullptr; _impl_.for_cas_ = false; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawDeleteRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string cf = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawDeleteRequest.cf")); - } else - goto handle_unusual; - continue; - // bool for_cas = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.for_cas_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawDeleteRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawDeleteRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 1, 35, 2> RawDeleteRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawDeleteRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // bool for_cas = 4; + {::_pbi::TcParser::SingularVarintNoZag1(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.for_cas_)}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.context_)}}, + // bytes key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.key_)}}, + // string cf = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.cf_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes key = 2; + {PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // string cf = 3; + {PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bool for_cas = 4; + {PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.for_cas_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\30\0\0\2\0\0\0\0" + "kvrpcpb.RawDeleteRequest" + "cf" + }}, +}; + +::uint8_t* RawDeleteRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawDeleteRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // bytes key = 2; if (!this->_internal_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_key(), target); + const std::string& _s = this->_internal_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // string cf = 3; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawDeleteRequest.cf"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawDeleteRequest.cf"); + target = stream->WriteStringMaybeAliased(3, _s, target); } // bool for_cas = 4; if (this->_internal_for_cas() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_for_cas(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_for_cas(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawDeleteRequest) return target; } -size_t RawDeleteRequest::ByteSizeLong() const { +::size_t RawDeleteRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawDeleteRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes key = 2; if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_key()); } // string cf = 3; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } // bool for_cas = 4; if (this->_internal_for_cas() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawDeleteRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawDeleteRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawDeleteRequest::_class_data_ = { + RawDeleteRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawDeleteRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawDeleteRequest::GetClassData() const { + return &_class_data_; +} -void RawDeleteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawDeleteRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawDeleteRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_key().empty()) { @@ -4431,14 +4607,14 @@ void RawDeleteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } if (from._internal_for_cas() != 0) { _this->_internal_set_for_cas(from._internal_for_cas()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawDeleteRequest::CopyFrom(const RawDeleteRequest& from) { @@ -4448,24 +4624,22 @@ void RawDeleteRequest::CopyFrom(const RawDeleteRequest& from) { MergeFrom(from); } -bool RawDeleteRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawDeleteRequest::IsInitialized() const { return true; } -void RawDeleteRequest::InternalSwap(RawDeleteRequest* other) { +::_pbi::CachedSize* RawDeleteRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawDeleteRequest::InternalSwap(RawDeleteRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.for_cas_) + sizeof(RawDeleteRequest::_impl_.for_cas_) - PROTOBUF_FIELD_OFFSET(RawDeleteRequest, _impl_.context_)>( @@ -4473,232 +4647,225 @@ void RawDeleteRequest::InternalSwap(RawDeleteRequest* other) { reinterpret_cast(&other->_impl_.context_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RawDeleteRequest::GetMetadata() const { +::google::protobuf::Metadata RawDeleteRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[10]); } - // =================================================================== class RawDeleteResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawDeleteResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawDeleteResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawDeleteResponse::_Internal::region_error(const RawDeleteResponse* msg) { +const ::errorpb::Error& RawDeleteResponse::_Internal::region_error(const RawDeleteResponse* msg) { return *msg->_impl_.region_error_; } void RawDeleteResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawDeleteResponse::RawDeleteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawDeleteResponse::RawDeleteResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawDeleteResponse) } -RawDeleteResponse::RawDeleteResponse(const RawDeleteResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawDeleteResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } +inline PROTOBUF_NDEBUG_INLINE RawDeleteResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_) {} + +RawDeleteResponse::RawDeleteResponse( + ::google::protobuf::Arena* arena, + const RawDeleteResponse& from) + : ::google::protobuf::Message(arena) { + RawDeleteResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawDeleteResponse) } +inline PROTOBUF_NDEBUG_INLINE RawDeleteResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena) {} -inline void RawDeleteResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawDeleteResponse::~RawDeleteResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawDeleteResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawDeleteResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.error_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawDeleteResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RawDeleteResponse::Clear() { +PROTOBUF_NOINLINE void RawDeleteResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawDeleteResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawDeleteResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawDeleteResponse.error")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawDeleteResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawDeleteResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 39, 2> RawDeleteResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawDeleteResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawDeleteResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteResponse, _impl_.error_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawDeleteResponse, _impl_.region_error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawDeleteResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawDeleteResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\31\0\5\0\0\0\0\0" + "kvrpcpb.RawDeleteResponse" + "error" + }}, +}; + +::uint8_t* RawDeleteResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawDeleteResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawDeleteResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawDeleteResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawDeleteResponse) return target; } -size_t RawDeleteResponse::ByteSizeLong() const { +::size_t RawDeleteResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawDeleteResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawDeleteResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawDeleteResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawDeleteResponse::_class_data_ = { + RawDeleteResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawDeleteResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawDeleteResponse::GetClassData() const { + return &_class_data_; +} -void RawDeleteResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawDeleteResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawDeleteResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { _this->_internal_set_error(from._internal_error()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawDeleteResponse::CopyFrom(const RawDeleteResponse& from) { @@ -4708,275 +4875,260 @@ void RawDeleteResponse::CopyFrom(const RawDeleteResponse& from) { MergeFrom(from); } -bool RawDeleteResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawDeleteResponse::IsInitialized() const { return true; } -void RawDeleteResponse::InternalSwap(RawDeleteResponse* other) { +::_pbi::CachedSize* RawDeleteResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawDeleteResponse::InternalSwap(RawDeleteResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawDeleteResponse::GetMetadata() const { +::google::protobuf::Metadata RawDeleteResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[11]); } - // =================================================================== class RawBatchDeleteRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawBatchDeleteRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawBatchDeleteRequest::_Internal::context(const RawBatchDeleteRequest* msg) { +const ::kvrpcpb::Context& RawBatchDeleteRequest::_Internal::context(const RawBatchDeleteRequest* msg) { return *msg->_impl_.context_; } -RawBatchDeleteRequest::RawBatchDeleteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawBatchDeleteRequest::RawBatchDeleteRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawBatchDeleteRequest) } -RawBatchDeleteRequest::RawBatchDeleteRequest(const RawBatchDeleteRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawBatchDeleteRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.keys_){from._impl_.keys_} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } +inline PROTOBUF_NDEBUG_INLINE RawBatchDeleteRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + keys_{visibility, arena, from.keys_}, + cf_(arena, from.cf_) {} + +RawBatchDeleteRequest::RawBatchDeleteRequest( + ::google::protobuf::Arena* arena, + const RawBatchDeleteRequest& from) + : ::google::protobuf::Message(arena) { + RawBatchDeleteRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawBatchDeleteRequest) } +inline PROTOBUF_NDEBUG_INLINE RawBatchDeleteRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + keys_{visibility, arena}, + cf_(arena) {} -inline void RawBatchDeleteRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.keys_){arena} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchDeleteRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.context_ = {}; } - RawBatchDeleteRequest::~RawBatchDeleteRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawBatchDeleteRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawBatchDeleteRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.keys_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; -} - -void RawBatchDeleteRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.context_; + _impl_.~Impl_(); } -void RawBatchDeleteRequest::Clear() { +PROTOBUF_NOINLINE void RawBatchDeleteRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawBatchDeleteRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.keys_.Clear(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawBatchDeleteRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated bytes keys = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_keys(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // string cf = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawBatchDeleteRequest.cf")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawBatchDeleteRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawBatchDeleteRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 40, 2> RawBatchDeleteRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawBatchDeleteRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_.context_)}}, + // repeated bytes keys = 2; + {::_pbi::TcParser::FastBR1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_.keys_)}}, + // string cf = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_.cf_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated bytes keys = 2; + {PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_.keys_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // string cf = 3; + {PROTOBUF_FIELD_OFFSET(RawBatchDeleteRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\35\0\0\2\0\0\0\0" + "kvrpcpb.RawBatchDeleteRequest" + "cf" + }}, +}; + +::uint8_t* RawBatchDeleteRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawBatchDeleteRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // repeated bytes keys = 2; - for (int i = 0, n = this->_internal_keys_size(); i < n; i++) { - const auto& s = this->_internal_keys(i); + for (int i = 0, n = this->_internal_keys_size(); i < n; ++i) { + const auto& s = this->_internal_keys().Get(i); target = stream->WriteBytes(2, s, target); } // string cf = 3; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawBatchDeleteRequest.cf"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawBatchDeleteRequest.cf"); + target = stream->WriteStringMaybeAliased(3, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawBatchDeleteRequest) return target; } -size_t RawBatchDeleteRequest::ByteSizeLong() const { +::size_t RawBatchDeleteRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawBatchDeleteRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated bytes keys = 2; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.keys_.size()); - for (int i = 0, n = _impl_.keys_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - _impl_.keys_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_keys().size()); + for (int i = 0, n = _internal_keys().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + _internal_keys().Get(i)); } - // string cf = 3; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawBatchDeleteRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawBatchDeleteRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawBatchDeleteRequest::_class_data_ = { + RawBatchDeleteRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawBatchDeleteRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawBatchDeleteRequest::GetClassData() const { + return &_class_data_; +} -void RawBatchDeleteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawBatchDeleteRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawBatchDeleteRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.keys_.MergeFrom(from._impl_.keys_); + _this->_internal_mutable_keys()->MergeFrom(from._internal_keys()); if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawBatchDeleteRequest::CopyFrom(const RawBatchDeleteRequest& from) { @@ -4986,249 +5138,243 @@ void RawBatchDeleteRequest::CopyFrom(const RawBatchDeleteRequest& from) { MergeFrom(from); } -bool RawBatchDeleteRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawBatchDeleteRequest::IsInitialized() const { return true; } -void RawBatchDeleteRequest::InternalSwap(RawBatchDeleteRequest* other) { +::_pbi::CachedSize* RawBatchDeleteRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawBatchDeleteRequest::InternalSwap(RawBatchDeleteRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.keys_.InternalSwap(&other->_impl_.keys_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); swap(_impl_.context_, other->_impl_.context_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawBatchDeleteRequest::GetMetadata() const { +::google::protobuf::Metadata RawBatchDeleteRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[12]); } - // =================================================================== class RawBatchDeleteResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawBatchDeleteResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawBatchDeleteResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawBatchDeleteResponse::_Internal::region_error(const RawBatchDeleteResponse* msg) { +const ::errorpb::Error& RawBatchDeleteResponse::_Internal::region_error(const RawBatchDeleteResponse* msg) { return *msg->_impl_.region_error_; } void RawBatchDeleteResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawBatchDeleteResponse::RawBatchDeleteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawBatchDeleteResponse::RawBatchDeleteResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawBatchDeleteResponse) } -RawBatchDeleteResponse::RawBatchDeleteResponse(const RawBatchDeleteResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawBatchDeleteResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } +inline PROTOBUF_NDEBUG_INLINE RawBatchDeleteResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_) {} + +RawBatchDeleteResponse::RawBatchDeleteResponse( + ::google::protobuf::Arena* arena, + const RawBatchDeleteResponse& from) + : ::google::protobuf::Message(arena) { + RawBatchDeleteResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawBatchDeleteResponse) } +inline PROTOBUF_NDEBUG_INLINE RawBatchDeleteResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena) {} -inline void RawBatchDeleteResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchDeleteResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawBatchDeleteResponse::~RawBatchDeleteResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawBatchDeleteResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawBatchDeleteResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.error_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawBatchDeleteResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RawBatchDeleteResponse::Clear() { +PROTOBUF_NOINLINE void RawBatchDeleteResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawBatchDeleteResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawBatchDeleteResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawBatchDeleteResponse.error")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawBatchDeleteResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawBatchDeleteResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 44, 2> RawBatchDeleteResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawBatchDeleteResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawBatchDeleteResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawBatchDeleteResponse, _impl_.error_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawBatchDeleteResponse, _impl_.region_error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawBatchDeleteResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawBatchDeleteResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\36\0\5\0\0\0\0\0" + "kvrpcpb.RawBatchDeleteResponse" + "error" + }}, +}; + +::uint8_t* RawBatchDeleteResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawBatchDeleteResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawBatchDeleteResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawBatchDeleteResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawBatchDeleteResponse) return target; } -size_t RawBatchDeleteResponse::ByteSizeLong() const { +::size_t RawBatchDeleteResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawBatchDeleteResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawBatchDeleteResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawBatchDeleteResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawBatchDeleteResponse::_class_data_ = { + RawBatchDeleteResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawBatchDeleteResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawBatchDeleteResponse::GetClassData() const { + return &_class_data_; +} -void RawBatchDeleteResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawBatchDeleteResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawBatchDeleteResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { _this->_internal_set_error(from._internal_error()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawBatchDeleteResponse::CopyFrom(const RawBatchDeleteResponse& from) { @@ -5238,308 +5384,271 @@ void RawBatchDeleteResponse::CopyFrom(const RawBatchDeleteResponse& from) { MergeFrom(from); } -bool RawBatchDeleteResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawBatchDeleteResponse::IsInitialized() const { return true; } -void RawBatchDeleteResponse::InternalSwap(RawBatchDeleteResponse* other) { +::_pbi::CachedSize* RawBatchDeleteResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawBatchDeleteResponse::InternalSwap(RawBatchDeleteResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawBatchDeleteResponse::GetMetadata() const { +::google::protobuf::Metadata RawBatchDeleteResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[13]); } - // =================================================================== class RawDeleteRangeRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawDeleteRangeRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawDeleteRangeRequest::_Internal::context(const RawDeleteRangeRequest* msg) { +const ::kvrpcpb::Context& RawDeleteRangeRequest::_Internal::context(const RawDeleteRangeRequest* msg) { return *msg->_impl_.context_; } -RawDeleteRangeRequest::RawDeleteRangeRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawDeleteRangeRequest::RawDeleteRangeRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawDeleteRangeRequest) } -RawDeleteRangeRequest::RawDeleteRangeRequest(const RawDeleteRangeRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawDeleteRangeRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_start_key().empty()) { - _this->_impl_.start_key_.Set(from._internal_start_key(), - _this->GetArenaForAllocation()); - } - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_end_key().empty()) { - _this->_impl_.end_key_.Set(from._internal_end_key(), - _this->GetArenaForAllocation()); - } - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } +inline PROTOBUF_NDEBUG_INLINE RawDeleteRangeRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + start_key_(arena, from.start_key_), + end_key_(arena, from.end_key_), + cf_(arena, from.cf_) {} + +RawDeleteRangeRequest::RawDeleteRangeRequest( + ::google::protobuf::Arena* arena, + const RawDeleteRangeRequest& from) + : ::google::protobuf::Message(arena) { + RawDeleteRangeRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawDeleteRangeRequest) } +inline PROTOBUF_NDEBUG_INLINE RawDeleteRangeRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + start_key_(arena), + end_key_(arena), + cf_(arena) {} -inline void RawDeleteRangeRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRangeRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.context_ = {}; } - RawDeleteRangeRequest::~RawDeleteRangeRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawDeleteRangeRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawDeleteRangeRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.start_key_.Destroy(); _impl_.end_key_.Destroy(); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; -} - -void RawDeleteRangeRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.context_; + _impl_.~Impl_(); } -void RawDeleteRangeRequest::Clear() { +PROTOBUF_NOINLINE void RawDeleteRangeRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawDeleteRangeRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.start_key_.ClearToEmpty(); _impl_.end_key_.ClearToEmpty(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawDeleteRangeRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes start_key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_start_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes end_key = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_end_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string cf = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawDeleteRangeRequest.cf")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawDeleteRangeRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawDeleteRangeRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 1, 40, 2> RawDeleteRangeRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawDeleteRangeRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string cf = 4; + {::_pbi::TcParser::FastUS1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.cf_)}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.context_)}}, + // bytes start_key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.start_key_)}}, + // bytes end_key = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.end_key_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes start_key = 2; + {PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.start_key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes end_key = 3; + {PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.end_key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // string cf = 4; + {PROTOBUF_FIELD_OFFSET(RawDeleteRangeRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\35\0\0\0\2\0\0\0" + "kvrpcpb.RawDeleteRangeRequest" + "cf" + }}, +}; + +::uint8_t* RawDeleteRangeRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawDeleteRangeRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // bytes start_key = 2; if (!this->_internal_start_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_start_key(), target); + const std::string& _s = this->_internal_start_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // bytes end_key = 3; if (!this->_internal_end_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_end_key(), target); + const std::string& _s = this->_internal_end_key(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } // string cf = 4; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawDeleteRangeRequest.cf"); - target = stream->WriteStringMaybeAliased( - 4, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawDeleteRangeRequest.cf"); + target = stream->WriteStringMaybeAliased(4, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawDeleteRangeRequest) return target; } -size_t RawDeleteRangeRequest::ByteSizeLong() const { +::size_t RawDeleteRangeRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawDeleteRangeRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes start_key = 2; if (!this->_internal_start_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_start_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_start_key()); } // bytes end_key = 3; if (!this->_internal_end_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_end_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_end_key()); } // string cf = 4; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawDeleteRangeRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawDeleteRangeRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawDeleteRangeRequest::_class_data_ = { + RawDeleteRangeRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawDeleteRangeRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawDeleteRangeRequest::GetClassData() const { + return &_class_data_; +} -void RawDeleteRangeRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawDeleteRangeRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawDeleteRangeRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_start_key().empty()) { @@ -5551,11 +5660,11 @@ void RawDeleteRangeRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawDeleteRangeRequest::CopyFrom(const RawDeleteRangeRequest& from) { @@ -5565,256 +5674,244 @@ void RawDeleteRangeRequest::CopyFrom(const RawDeleteRangeRequest& from) { MergeFrom(from); } -bool RawDeleteRangeRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawDeleteRangeRequest::IsInitialized() const { return true; } -void RawDeleteRangeRequest::InternalSwap(RawDeleteRangeRequest* other) { +::_pbi::CachedSize* RawDeleteRangeRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawDeleteRangeRequest::InternalSwap(RawDeleteRangeRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.start_key_, lhs_arena, - &other->_impl_.start_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.end_key_, lhs_arena, - &other->_impl_.end_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.start_key_, &other->_impl_.start_key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.end_key_, &other->_impl_.end_key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); swap(_impl_.context_, other->_impl_.context_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawDeleteRangeRequest::GetMetadata() const { +::google::protobuf::Metadata RawDeleteRangeRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[14]); } - // =================================================================== class RawDeleteRangeResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawDeleteRangeResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawDeleteRangeResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawDeleteRangeResponse::_Internal::region_error(const RawDeleteRangeResponse* msg) { +const ::errorpb::Error& RawDeleteRangeResponse::_Internal::region_error(const RawDeleteRangeResponse* msg) { return *msg->_impl_.region_error_; } void RawDeleteRangeResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawDeleteRangeResponse::RawDeleteRangeResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawDeleteRangeResponse::RawDeleteRangeResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawDeleteRangeResponse) } -RawDeleteRangeResponse::RawDeleteRangeResponse(const RawDeleteRangeResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawDeleteRangeResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } +inline PROTOBUF_NDEBUG_INLINE RawDeleteRangeResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_) {} + +RawDeleteRangeResponse::RawDeleteRangeResponse( + ::google::protobuf::Arena* arena, + const RawDeleteRangeResponse& from) + : ::google::protobuf::Message(arena) { + RawDeleteRangeResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawDeleteRangeResponse) } +inline PROTOBUF_NDEBUG_INLINE RawDeleteRangeResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena) {} -inline void RawDeleteRangeResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRangeResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawDeleteRangeResponse::~RawDeleteRangeResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawDeleteRangeResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawDeleteRangeResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.error_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; -} - -void RawDeleteRangeResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.error_.Destroy(); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawDeleteRangeResponse::Clear() { +PROTOBUF_NOINLINE void RawDeleteRangeResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawDeleteRangeResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawDeleteRangeResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawDeleteRangeResponse.error")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawDeleteRangeResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawDeleteRangeResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 44, 2> RawDeleteRangeResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawDeleteRangeResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawDeleteRangeResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRangeResponse, _impl_.error_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawDeleteRangeResponse, _impl_.region_error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawDeleteRangeResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawDeleteRangeResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\36\0\5\0\0\0\0\0" + "kvrpcpb.RawDeleteRangeResponse" + "error" + }}, +}; + +::uint8_t* RawDeleteRangeResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawDeleteRangeResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawDeleteRangeResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawDeleteRangeResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawDeleteRangeResponse) return target; } -size_t RawDeleteRangeResponse::ByteSizeLong() const { +::size_t RawDeleteRangeResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawDeleteRangeResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawDeleteRangeResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawDeleteRangeResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawDeleteRangeResponse::_class_data_ = { + RawDeleteRangeResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawDeleteRangeResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawDeleteRangeResponse::GetClassData() const { + return &_class_data_; +} -void RawDeleteRangeResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawDeleteRangeResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawDeleteRangeResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { _this->_internal_set_error(from._internal_error()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawDeleteRangeResponse::CopyFrom(const RawDeleteRangeResponse& from) { @@ -5824,159 +5921,119 @@ void RawDeleteRangeResponse::CopyFrom(const RawDeleteRangeResponse& from) { MergeFrom(from); } -bool RawDeleteRangeResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawDeleteRangeResponse::IsInitialized() const { return true; } -void RawDeleteRangeResponse::InternalSwap(RawDeleteRangeResponse* other) { +::_pbi::CachedSize* RawDeleteRangeResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawDeleteRangeResponse::InternalSwap(RawDeleteRangeResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawDeleteRangeResponse::GetMetadata() const { +::google::protobuf::Metadata RawDeleteRangeResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[15]); } - // =================================================================== class RawCASRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawCASRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawCASRequest::_Internal::context(const RawCASRequest* msg) { +const ::kvrpcpb::Context& RawCASRequest::_Internal::context(const RawCASRequest* msg) { return *msg->_impl_.context_; } -RawCASRequest::RawCASRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawCASRequest::RawCASRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawCASRequest) } -RawCASRequest::RawCASRequest(const RawCASRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawCASRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , decltype(_impl_.previous_value_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.ttl_){} - , decltype(_impl_.previous_not_exist_){} - , decltype(_impl_.delete__){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } - _impl_.previous_value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.previous_value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_previous_value().empty()) { - _this->_impl_.previous_value_.Set(from._internal_previous_value(), - _this->GetArenaForAllocation()); - } - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } - ::memcpy(&_impl_.ttl_, &from._impl_.ttl_, - static_cast(reinterpret_cast(&_impl_.delete__) - - reinterpret_cast(&_impl_.ttl_)) + sizeof(_impl_.delete__)); +inline PROTOBUF_NDEBUG_INLINE RawCASRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + key_(arena, from.key_), + value_(arena, from.value_), + previous_value_(arena, from.previous_value_), + cf_(arena, from.cf_) {} + +RawCASRequest::RawCASRequest( + ::google::protobuf::Arena* arena, + const RawCASRequest& from) + : ::google::protobuf::Message(arena) { + RawCASRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, ttl_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, ttl_), + offsetof(Impl_, delete__) - + offsetof(Impl_, ttl_) + + sizeof(Impl_::delete__)); + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawCASRequest) } - -inline void RawCASRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , decltype(_impl_.previous_value_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.ttl_){uint64_t{0u}} - , decltype(_impl_.previous_not_exist_){false} - , decltype(_impl_.delete__){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.previous_value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.previous_value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE RawCASRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + key_(arena), + value_(arena), + previous_value_(arena), + cf_(arena) {} + +inline void RawCASRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, context_), + 0, + offsetof(Impl_, delete__) - + offsetof(Impl_, context_) + + sizeof(Impl_::delete__)); } - RawCASRequest::~RawCASRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawCASRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawCASRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.key_.Destroy(); _impl_.value_.Destroy(); _impl_.previous_value_.Destroy(); _impl_.cf_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; -} - -void RawCASRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.context_; + _impl_.~Impl_(); } -void RawCASRequest::Clear() { +PROTOBUF_NOINLINE void RawCASRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawCASRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5984,255 +6041,243 @@ void RawCASRequest::Clear() { _impl_.value_.ClearToEmpty(); _impl_.previous_value_.ClearToEmpty(); _impl_.cf_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); } - _impl_.context_ = nullptr; - ::memset(&_impl_.ttl_, 0, static_cast( + ::memset(&_impl_.ttl_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.delete__) - reinterpret_cast(&_impl_.ttl_)) + sizeof(_impl_.delete__)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawCASRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes value = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool previous_not_exist = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.previous_not_exist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes previous_value = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_previous_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string cf = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawCASRequest.cf")); - } else - goto handle_unusual; - continue; - // uint64 ttl = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.ttl_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool delete = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.delete__ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawCASRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawCASRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 8, 1, 40, 2> RawCASRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_._has_bits_), + 0, // no _extensions_ + 8, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967040, // skipmap + offsetof(decltype(_table_), field_entries), + 8, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawCASRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // bool delete = 8; + {::_pbi::TcParser::SingularVarintNoZag1(), + {64, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.delete__)}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.context_)}}, + // bytes key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.key_)}}, + // bytes value = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.value_)}}, + // bool previous_not_exist = 4; + {::_pbi::TcParser::SingularVarintNoZag1(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.previous_not_exist_)}}, + // bytes previous_value = 5; + {::_pbi::TcParser::FastBS1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.previous_value_)}}, + // string cf = 6; + {::_pbi::TcParser::FastUS1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.cf_)}}, + // uint64 ttl = 7; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RawCASRequest, _impl_.ttl_), 63>(), + {56, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.ttl_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes key = 2; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes value = 3; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.value_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bool previous_not_exist = 4; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.previous_not_exist_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // bytes previous_value = 5; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.previous_value_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // string cf = 6; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 ttl = 7; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.ttl_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // bool delete = 8; + {PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.delete__), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\25\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0" + "kvrpcpb.RawCASRequest" + "cf" + }}, +}; + +::uint8_t* RawCASRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawCASRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // bytes key = 2; if (!this->_internal_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_key(), target); + const std::string& _s = this->_internal_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // bytes value = 3; if (!this->_internal_value().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_value(), target); + const std::string& _s = this->_internal_value(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } // bool previous_not_exist = 4; if (this->_internal_previous_not_exist() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_previous_not_exist(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_previous_not_exist(), target); } // bytes previous_value = 5; if (!this->_internal_previous_value().empty()) { - target = stream->WriteBytesMaybeAliased( - 5, this->_internal_previous_value(), target); + const std::string& _s = this->_internal_previous_value(); + target = stream->WriteBytesMaybeAliased(5, _s, target); } // string cf = 6; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawCASRequest.cf"); - target = stream->WriteStringMaybeAliased( - 6, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawCASRequest.cf"); + target = stream->WriteStringMaybeAliased(6, _s, target); } // uint64 ttl = 7; if (this->_internal_ttl() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_ttl(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 7, this->_internal_ttl(), target); } // bool delete = 8; if (this->_internal_delete_() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_delete_(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 8, this->_internal_delete_(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawCASRequest) return target; } -size_t RawCASRequest::ByteSizeLong() const { +::size_t RawCASRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawCASRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes key = 2; if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_key()); } // bytes value = 3; if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_value()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_value()); } // bytes previous_value = 5; if (!this->_internal_previous_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_previous_value()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_previous_value()); } // string cf = 6; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } // uint64 ttl = 7; if (this->_internal_ttl() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_ttl()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_ttl()); } // bool previous_not_exist = 4; if (this->_internal_previous_not_exist() != 0) { - total_size += 1 + 1; + total_size += 2; } // bool delete = 8; if (this->_internal_delete_() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawCASRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawCASRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawCASRequest::_class_data_ = { + RawCASRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawCASRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawCASRequest::GetClassData() const { + return &_class_data_; +} -void RawCASRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawCASRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawCASRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_key().empty()) { @@ -6247,7 +6292,7 @@ void RawCASRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (!from._internal_cf().empty()) { _this->_internal_set_cf(from._internal_cf()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } @@ -6260,7 +6305,7 @@ void RawCASRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_delete_() != 0) { _this->_internal_set_delete_(from._internal_delete_()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawCASRequest::CopyFrom(const RawCASRequest& from) { @@ -6270,32 +6315,24 @@ void RawCASRequest::CopyFrom(const RawCASRequest& from) { MergeFrom(from); } -bool RawCASRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawCASRequest::IsInitialized() const { return true; } -void RawCASRequest::InternalSwap(RawCASRequest* other) { +::_pbi::CachedSize* RawCASRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawCASRequest::InternalSwap(RawCASRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.previous_value_, lhs_arena, - &other->_impl_.previous_value_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.previous_value_, &other->_impl_.previous_value_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.delete__) + sizeof(RawCASRequest::_impl_.delete__) - PROTOBUF_FIELD_OFFSET(RawCASRequest, _impl_.context_)>( @@ -6303,308 +6340,291 @@ void RawCASRequest::InternalSwap(RawCASRequest* other) { reinterpret_cast(&other->_impl_.context_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RawCASRequest::GetMetadata() const { +::google::protobuf::Metadata RawCASRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[16]); } - // =================================================================== class RawCASResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawCASResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawCASResponse::_Internal::region_error(const RawCASResponse* msg) { +const ::errorpb::Error& RawCASResponse::_Internal::region_error(const RawCASResponse* msg) { return *msg->_impl_.region_error_; } void RawCASResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawCASResponse::RawCASResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawCASResponse::RawCASResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawCASResponse) } -RawCASResponse::RawCASResponse(const RawCASResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawCASResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.previous_value_){} - , decltype(_impl_.region_error_){nullptr} - , decltype(_impl_.succeed_){} - , decltype(_impl_.previous_not_exist_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - _impl_.previous_value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.previous_value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_previous_value().empty()) { - _this->_impl_.previous_value_.Set(from._internal_previous_value(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } - ::memcpy(&_impl_.succeed_, &from._impl_.succeed_, - static_cast(reinterpret_cast(&_impl_.previous_not_exist_) - - reinterpret_cast(&_impl_.succeed_)) + sizeof(_impl_.previous_not_exist_)); +inline PROTOBUF_NDEBUG_INLINE RawCASResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_), + previous_value_(arena, from.previous_value_) {} + +RawCASResponse::RawCASResponse( + ::google::protobuf::Arena* arena, + const RawCASResponse& from) + : ::google::protobuf::Message(arena) { + RawCASResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, succeed_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, succeed_), + offsetof(Impl_, previous_not_exist_) - + offsetof(Impl_, succeed_) + + sizeof(Impl_::previous_not_exist_)); + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawCASResponse) } - -inline void RawCASResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.previous_value_){} - , decltype(_impl_.region_error_){nullptr} - , decltype(_impl_.succeed_){false} - , decltype(_impl_.previous_not_exist_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.previous_value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.previous_value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE RawCASResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena), + previous_value_(arena) {} + +inline void RawCASResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, region_error_), + 0, + offsetof(Impl_, previous_not_exist_) - + offsetof(Impl_, region_error_) + + sizeof(Impl_::previous_not_exist_)); } - RawCASResponse::~RawCASResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawCASResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawCASResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.error_.Destroy(); _impl_.previous_value_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; -} - -void RawCASResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawCASResponse::Clear() { +PROTOBUF_NOINLINE void RawCASResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawCASResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); _impl_.previous_value_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); } - _impl_.region_error_ = nullptr; - ::memset(&_impl_.succeed_, 0, static_cast( + ::memset(&_impl_.succeed_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.previous_not_exist_) - reinterpret_cast(&_impl_.succeed_)) + sizeof(_impl_.previous_not_exist_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawCASResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawCASResponse.error")); - } else - goto handle_unusual; - continue; - // bool succeed = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.succeed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool previous_not_exist = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.previous_not_exist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes previous_value = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_previous_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawCASResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawCASResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 1, 36, 2> RawCASResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawCASResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.region_error_)}}, + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.error_)}}, + // bool succeed = 3; + {::_pbi::TcParser::SingularVarintNoZag1(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.succeed_)}}, + // bool previous_not_exist = 4; + {::_pbi::TcParser::SingularVarintNoZag1(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.previous_not_exist_)}}, + // bytes previous_value = 5; + {::_pbi::TcParser::FastBS1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.previous_value_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bool succeed = 3; + {PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.succeed_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // bool previous_not_exist = 4; + {PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.previous_not_exist_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // bytes previous_value = 5; + {PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.previous_value_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\26\0\5\0\0\0\0\0" + "kvrpcpb.RawCASResponse" + "error" + }}, +}; + +::uint8_t* RawCASResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawCASResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawCASResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawCASResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } // bool succeed = 3; if (this->_internal_succeed() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_succeed(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 3, this->_internal_succeed(), target); } // bool previous_not_exist = 4; if (this->_internal_previous_not_exist() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_previous_not_exist(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_previous_not_exist(), target); } // bytes previous_value = 5; if (!this->_internal_previous_value().empty()) { - target = stream->WriteBytesMaybeAliased( - 5, this->_internal_previous_value(), target); + const std::string& _s = this->_internal_previous_value(); + target = stream->WriteBytesMaybeAliased(5, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawCASResponse) return target; } -size_t RawCASResponse::ByteSizeLong() const { +::size_t RawCASResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawCASResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // bytes previous_value = 5; if (!this->_internal_previous_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_previous_value()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_previous_value()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } // bool succeed = 3; if (this->_internal_succeed() != 0) { - total_size += 1 + 1; + total_size += 2; } // bool previous_not_exist = 4; if (this->_internal_previous_not_exist() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawCASResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawCASResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawCASResponse::_class_data_ = { + RawCASResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawCASResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawCASResponse::GetClassData() const { + return &_class_data_; +} -void RawCASResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawCASResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawCASResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { @@ -6613,7 +6633,7 @@ void RawCASResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : if (!from._internal_previous_value().empty()) { _this->_internal_set_previous_value(from._internal_previous_value()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } @@ -6623,7 +6643,7 @@ void RawCASResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : if (from._internal_previous_not_exist() != 0) { _this->_internal_set_previous_not_exist(from._internal_previous_not_exist()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawCASResponse::CopyFrom(const RawCASResponse& from) { @@ -6633,24 +6653,22 @@ void RawCASResponse::CopyFrom(const RawCASResponse& from) { MergeFrom(from); } -bool RawCASResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawCASResponse::IsInitialized() const { return true; } -void RawCASResponse::InternalSwap(RawCASResponse* other) { +::_pbi::CachedSize* RawCASResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawCASResponse::InternalSwap(RawCASResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.previous_value_, lhs_arena, - &other->_impl_.previous_value_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.previous_value_, &other->_impl_.previous_value_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.previous_not_exist_) + sizeof(RawCASResponse::_impl_.previous_not_exist_) - PROTOBUF_FIELD_OFFSET(RawCASResponse, _impl_.region_error_)>( @@ -6658,361 +6676,325 @@ void RawCASResponse::InternalSwap(RawCASResponse* other) { reinterpret_cast(&other->_impl_.region_error_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RawCASResponse::GetMetadata() const { +::google::protobuf::Metadata RawCASResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[17]); } - // =================================================================== class RawScanRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawScanRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawScanRequest::_Internal::context(const RawScanRequest* msg) { +const ::kvrpcpb::Context& RawScanRequest::_Internal::context(const RawScanRequest* msg) { return *msg->_impl_.context_; } -RawScanRequest::RawScanRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawScanRequest::RawScanRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawScanRequest) } -RawScanRequest::RawScanRequest(const RawScanRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawScanRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.start_key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.limit_){} - , decltype(_impl_.key_only_){} - , decltype(_impl_.reverse_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_start_key().empty()) { - _this->_impl_.start_key_.Set(from._internal_start_key(), - _this->GetArenaForAllocation()); - } - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_cf().empty()) { - _this->_impl_.cf_.Set(from._internal_cf(), - _this->GetArenaForAllocation()); - } - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_end_key().empty()) { - _this->_impl_.end_key_.Set(from._internal_end_key(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } - ::memcpy(&_impl_.limit_, &from._impl_.limit_, - static_cast(reinterpret_cast(&_impl_.reverse_) - - reinterpret_cast(&_impl_.limit_)) + sizeof(_impl_.reverse_)); +inline PROTOBUF_NDEBUG_INLINE RawScanRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + start_key_(arena, from.start_key_), + cf_(arena, from.cf_), + end_key_(arena, from.end_key_) {} + +RawScanRequest::RawScanRequest( + ::google::protobuf::Arena* arena, + const RawScanRequest& from) + : ::google::protobuf::Message(arena) { + RawScanRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, limit_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, limit_), + offsetof(Impl_, reverse_) - + offsetof(Impl_, limit_) + + sizeof(Impl_::reverse_)); + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawScanRequest) } - -inline void RawScanRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.start_key_){} - , decltype(_impl_.cf_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.context_){nullptr} - , decltype(_impl_.limit_){0u} - , decltype(_impl_.key_only_){false} - , decltype(_impl_.reverse_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.cf_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE RawScanRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + start_key_(arena), + cf_(arena), + end_key_(arena) {} + +inline void RawScanRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, context_), + 0, + offsetof(Impl_, reverse_) - + offsetof(Impl_, context_) + + sizeof(Impl_::reverse_)); } - RawScanRequest::~RawScanRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawScanRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawScanRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.start_key_.Destroy(); _impl_.cf_.Destroy(); _impl_.end_key_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; -} - -void RawScanRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.context_; + _impl_.~Impl_(); } -void RawScanRequest::Clear() { +PROTOBUF_NOINLINE void RawScanRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawScanRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.start_key_.ClearToEmpty(); _impl_.cf_.ClearToEmpty(); _impl_.end_key_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); } - _impl_.context_ = nullptr; - ::memset(&_impl_.limit_, 0, static_cast( + ::memset(&_impl_.limit_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.reverse_) - reinterpret_cast(&_impl_.limit_)) + sizeof(_impl_.reverse_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawScanRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes start_key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_start_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 limit = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool key_only = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.key_only_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string cf = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_cf(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawScanRequest.cf")); - } else - goto handle_unusual; - continue; - // bool reverse = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.reverse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes end_key = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { - auto str = _internal_mutable_end_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawScanRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawScanRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 1, 33, 2> RawScanRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawScanRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.context_)}}, + // bytes start_key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.start_key_)}}, + // uint32 limit = 3; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(RawScanRequest, _impl_.limit_), 63>(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.limit_)}}, + // bool key_only = 4; + {::_pbi::TcParser::SingularVarintNoZag1(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.key_only_)}}, + // string cf = 5; + {::_pbi::TcParser::FastUS1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.cf_)}}, + // bool reverse = 6; + {::_pbi::TcParser::SingularVarintNoZag1(), + {48, 63, 0, PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.reverse_)}}, + // bytes end_key = 7; + {::_pbi::TcParser::FastBS1, + {58, 63, 0, PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.end_key_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes start_key = 2; + {PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.start_key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // uint32 limit = 3; + {PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.limit_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt32)}, + // bool key_only = 4; + {PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.key_only_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // string cf = 5; + {PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.cf_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bool reverse = 6; + {PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.reverse_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // bytes end_key = 7; + {PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.end_key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + }}, {{ + "\26\0\0\0\0\2\0\0" + "kvrpcpb.RawScanRequest" + "cf" + }}, +}; + +::uint8_t* RawScanRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawScanRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // bytes start_key = 2; if (!this->_internal_start_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_start_key(), target); + const std::string& _s = this->_internal_start_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // uint32 limit = 3; if (this->_internal_limit() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_limit(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 3, this->_internal_limit(), target); } // bool key_only = 4; if (this->_internal_key_only() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_key_only(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_key_only(), target); } // string cf = 5; if (!this->_internal_cf().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_cf().data(), static_cast(this->_internal_cf().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawScanRequest.cf"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_cf(), target); + const std::string& _s = this->_internal_cf(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawScanRequest.cf"); + target = stream->WriteStringMaybeAliased(5, _s, target); } // bool reverse = 6; if (this->_internal_reverse() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_reverse(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 6, this->_internal_reverse(), target); } // bytes end_key = 7; if (!this->_internal_end_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 7, this->_internal_end_key(), target); + const std::string& _s = this->_internal_end_key(); + target = stream->WriteBytesMaybeAliased(7, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawScanRequest) return target; } -size_t RawScanRequest::ByteSizeLong() const { +::size_t RawScanRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawScanRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes start_key = 2; if (!this->_internal_start_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_start_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_start_key()); } // string cf = 5; if (!this->_internal_cf().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_cf()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_cf()); } // bytes end_key = 7; if (!this->_internal_end_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_end_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_end_key()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } // uint32 limit = 3; if (this->_internal_limit() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_limit()); + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( + this->_internal_limit()); } // bool key_only = 4; if (this->_internal_key_only() != 0) { - total_size += 1 + 1; + total_size += 2; } // bool reverse = 6; if (this->_internal_reverse() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawScanRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawScanRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawScanRequest::_class_data_ = { + RawScanRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawScanRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawScanRequest::GetClassData() const { + return &_class_data_; +} -void RawScanRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawScanRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawScanRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_start_key().empty()) { @@ -7024,7 +7006,7 @@ void RawScanRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : if (!from._internal_end_key().empty()) { _this->_internal_set_end_key(from._internal_end_key()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } @@ -7037,7 +7019,7 @@ void RawScanRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : if (from._internal_reverse() != 0) { _this->_internal_set_reverse(from._internal_reverse()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawScanRequest::CopyFrom(const RawScanRequest& from) { @@ -7047,28 +7029,23 @@ void RawScanRequest::CopyFrom(const RawScanRequest& from) { MergeFrom(from); } -bool RawScanRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawScanRequest::IsInitialized() const { return true; } -void RawScanRequest::InternalSwap(RawScanRequest* other) { +::_pbi::CachedSize* RawScanRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawScanRequest::InternalSwap(RawScanRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.start_key_, lhs_arena, - &other->_impl_.start_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.cf_, lhs_arena, - &other->_impl_.cf_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.end_key_, lhs_arena, - &other->_impl_.end_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.start_key_, &other->_impl_.start_key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.cf_, &other->_impl_.cf_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.end_key_, &other->_impl_.end_key_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.reverse_) + sizeof(RawScanRequest::_impl_.reverse_) - PROTOBUF_FIELD_OFFSET(RawScanRequest, _impl_.context_)>( @@ -7076,219 +7053,221 @@ void RawScanRequest::InternalSwap(RawScanRequest* other) { reinterpret_cast(&other->_impl_.context_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RawScanRequest::GetMetadata() const { +::google::protobuf::Metadata RawScanRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[18]); } - // =================================================================== class RawScanResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawScanResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawScanResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawScanResponse::_Internal::region_error(const RawScanResponse* msg) { +const ::errorpb::Error& RawScanResponse::_Internal::region_error(const RawScanResponse* msg) { return *msg->_impl_.region_error_; } void RawScanResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawScanResponse::RawScanResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawScanResponse::RawScanResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawScanResponse) } -RawScanResponse::RawScanResponse(const RawScanResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawScanResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.kvs_){from._impl_.kvs_} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE RawScanResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + kvs_{visibility, arena, from.kvs_} {} + +RawScanResponse::RawScanResponse( + ::google::protobuf::Arena* arena, + const RawScanResponse& from) + : ::google::protobuf::Message(arena) { + RawScanResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawScanResponse) } +inline PROTOBUF_NDEBUG_INLINE RawScanResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + kvs_{visibility, arena} {} -inline void RawScanResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.kvs_){arena} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void RawScanResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawScanResponse::~RawScanResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawScanResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawScanResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.kvs_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.region_error_; + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawScanResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RawScanResponse::Clear() { +PROTOBUF_NOINLINE void RawScanResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawScanResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.kvs_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawScanResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .kvrpcpb.KvPair kvs = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_kvs(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawScanResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawScanResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> RawScanResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawScanResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawScanResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // repeated .kvrpcpb.KvPair kvs = 2; + {::_pbi::TcParser::FastMtR1, + {18, 63, 1, PROTOBUF_FIELD_OFFSET(RawScanResponse, _impl_.kvs_)}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawScanResponse, _impl_.region_error_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawScanResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .kvrpcpb.KvPair kvs = 2; + {PROTOBUF_FIELD_OFFSET(RawScanResponse, _impl_.kvs_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + {::_pbi::TcParser::GetTable<::kvrpcpb::KvPair>()}, + }}, {{ + }}, +}; + +::uint8_t* RawScanResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawScanResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // repeated .kvrpcpb.KvPair kvs = 2; for (unsigned i = 0, n = static_cast(this->_internal_kvs_size()); i < n; i++) { - const auto& repfield = this->_internal_kvs(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_kvs().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawScanResponse) return target; } -size_t RawScanResponse::ByteSizeLong() const { +::size_t RawScanResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawScanResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .kvrpcpb.KvPair kvs = 2; total_size += 1UL * this->_internal_kvs_size(); - for (const auto& msg : this->_impl_.kvs_) { + for (const auto& msg : this->_internal_kvs()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawScanResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawScanResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawScanResponse::_class_data_ = { + RawScanResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawScanResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawScanResponse::GetClassData() const { + return &_class_data_; +} -void RawScanResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawScanResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawScanResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.kvs_.MergeFrom(from._impl_.kvs_); - if (from._internal_has_region_error()) { + _this->_internal_mutable_kvs()->MergeFrom( + from._internal_kvs()); + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawScanResponse::CopyFrom(const RawScanResponse& from) { @@ -7298,223 +7277,198 @@ void RawScanResponse::CopyFrom(const RawScanResponse& from) { MergeFrom(from); } -bool RawScanResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawScanResponse::IsInitialized() const { return true; } -void RawScanResponse::InternalSwap(RawScanResponse* other) { +::_pbi::CachedSize* RawScanResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawScanResponse::InternalSwap(RawScanResponse* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.kvs_.InternalSwap(&other->_impl_.kvs_); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawScanResponse::GetMetadata() const { +::google::protobuf::Metadata RawScanResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[19]); } - // =================================================================== class KeyRange::_Internal { public: }; -KeyRange::KeyRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +KeyRange::KeyRange(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.KeyRange) } -KeyRange::KeyRange(const KeyRange& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - KeyRange* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_start_key().empty()) { - _this->_impl_.start_key_.Set(from._internal_start_key(), - _this->GetArenaForAllocation()); - } - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_end_key().empty()) { - _this->_impl_.end_key_.Set(from._internal_end_key(), - _this->GetArenaForAllocation()); - } +inline PROTOBUF_NDEBUG_INLINE KeyRange::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : start_key_(arena, from.start_key_), + end_key_(arena, from.end_key_), + _cached_size_{0} {} + +KeyRange::KeyRange( + ::google::protobuf::Arena* arena, + const KeyRange& from) + : ::google::protobuf::Message(arena) { + KeyRange* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + // @@protoc_insertion_point(copy_constructor:kvrpcpb.KeyRange) } +inline PROTOBUF_NDEBUG_INLINE KeyRange::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : start_key_(arena), + end_key_(arena), + _cached_size_{0} {} -inline void KeyRange::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KeyRange::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); } - KeyRange::~KeyRange() { // @@protoc_insertion_point(destructor:kvrpcpb.KeyRange) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void KeyRange::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.start_key_.Destroy(); _impl_.end_key_.Destroy(); + _impl_.~Impl_(); } -void KeyRange::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void KeyRange::Clear() { +PROTOBUF_NOINLINE void KeyRange::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.KeyRange) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.start_key_.ClearToEmpty(); _impl_.end_key_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* KeyRange::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // bytes start_key = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_start_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes end_key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_end_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* KeyRange::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* KeyRange::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> KeyRange::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_KeyRange_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // bytes end_key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(KeyRange, _impl_.end_key_)}}, + // bytes start_key = 1; + {::_pbi::TcParser::FastBS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(KeyRange, _impl_.start_key_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // bytes start_key = 1; + {PROTOBUF_FIELD_OFFSET(KeyRange, _impl_.start_key_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes end_key = 2; + {PROTOBUF_FIELD_OFFSET(KeyRange, _impl_.end_key_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* KeyRange::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.KeyRange) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // bytes start_key = 1; if (!this->_internal_start_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 1, this->_internal_start_key(), target); + const std::string& _s = this->_internal_start_key(); + target = stream->WriteBytesMaybeAliased(1, _s, target); } // bytes end_key = 2; if (!this->_internal_end_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_end_key(), target); + const std::string& _s = this->_internal_end_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.KeyRange) return target; } -size_t KeyRange::ByteSizeLong() const { +::size_t KeyRange::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.KeyRange) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes start_key = 1; if (!this->_internal_start_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_start_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_start_key()); } // bytes end_key = 2; if (!this->_internal_end_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_end_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_end_key()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData KeyRange::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - KeyRange::MergeImpl +const ::google::protobuf::Message::ClassData KeyRange::_class_data_ = { + KeyRange::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*KeyRange::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* KeyRange::GetClassData() const { + return &_class_data_; +} -void KeyRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void KeyRange::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.KeyRange) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_start_key().empty()) { @@ -7523,7 +7477,7 @@ void KeyRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTO if (!from._internal_end_key().empty()) { _this->_internal_set_end_key(from._internal_end_key()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void KeyRange::CopyFrom(const KeyRange& from) { @@ -7533,141 +7487,105 @@ void KeyRange::CopyFrom(const KeyRange& from) { MergeFrom(from); } -bool KeyRange::IsInitialized() const { +PROTOBUF_NOINLINE bool KeyRange::IsInitialized() const { return true; } -void KeyRange::InternalSwap(KeyRange* other) { +::_pbi::CachedSize* KeyRange::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void KeyRange::InternalSwap(KeyRange* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.start_key_, lhs_arena, - &other->_impl_.start_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.end_key_, lhs_arena, - &other->_impl_.end_key_, rhs_arena - ); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.start_key_, &other->_impl_.start_key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.end_key_, &other->_impl_.end_key_, arena); } -::PROTOBUF_NAMESPACE_ID::Metadata KeyRange::GetMetadata() const { +::google::protobuf::Metadata KeyRange::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[20]); } - // =================================================================== class RawCoprocessorRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_._has_bits_); static const ::kvrpcpb::Context& context(const RawCoprocessorRequest* msg); + static void set_has_context(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::kvrpcpb::Context& -RawCoprocessorRequest::_Internal::context(const RawCoprocessorRequest* msg) { +const ::kvrpcpb::Context& RawCoprocessorRequest::_Internal::context(const RawCoprocessorRequest* msg) { return *msg->_impl_.context_; } -RawCoprocessorRequest::RawCoprocessorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawCoprocessorRequest::RawCoprocessorRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawCoprocessorRequest) } -RawCoprocessorRequest::RawCoprocessorRequest(const RawCoprocessorRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawCoprocessorRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.ranges_){from._impl_.ranges_} - , decltype(_impl_.copr_name_){} - , decltype(_impl_.copr_version_req_){} - , decltype(_impl_.data_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.copr_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.copr_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_copr_name().empty()) { - _this->_impl_.copr_name_.Set(from._internal_copr_name(), - _this->GetArenaForAllocation()); - } - _impl_.copr_version_req_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.copr_version_req_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_copr_version_req().empty()) { - _this->_impl_.copr_version_req_.Set(from._internal_copr_version_req(), - _this->GetArenaForAllocation()); - } - _impl_.data_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_data().empty()) { - _this->_impl_.data_.Set(from._internal_data(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_context()) { - _this->_impl_.context_ = new ::kvrpcpb::Context(*from._impl_.context_); - } +inline PROTOBUF_NDEBUG_INLINE RawCoprocessorRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + ranges_{visibility, arena, from.ranges_}, + copr_name_(arena, from.copr_name_), + copr_version_req_(arena, from.copr_version_req_), + data_(arena, from.data_) {} + +RawCoprocessorRequest::RawCoprocessorRequest( + ::google::protobuf::Arena* arena, + const RawCoprocessorRequest& from) + : ::google::protobuf::Message(arena) { + RawCoprocessorRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.context_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::kvrpcpb::Context>(arena, *from._impl_.context_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawCoprocessorRequest) } +inline PROTOBUF_NDEBUG_INLINE RawCoprocessorRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + ranges_{visibility, arena}, + copr_name_(arena), + copr_version_req_(arena), + data_(arena) {} -inline void RawCoprocessorRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.ranges_){arena} - , decltype(_impl_.copr_name_){} - , decltype(_impl_.copr_version_req_){} - , decltype(_impl_.data_){} - , decltype(_impl_.context_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.copr_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.copr_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.copr_version_req_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.copr_version_req_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCoprocessorRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.context_ = {}; } - RawCoprocessorRequest::~RawCoprocessorRequest() { // @@protoc_insertion_point(destructor:kvrpcpb.RawCoprocessorRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawCoprocessorRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.ranges_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.copr_name_.Destroy(); _impl_.copr_version_req_.Destroy(); _impl_.data_.Destroy(); - if (this != internal_default_instance()) delete _impl_.context_; + delete _impl_.context_; + _impl_.~Impl_(); } -void RawCoprocessorRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RawCoprocessorRequest::Clear() { +PROTOBUF_NOINLINE void RawCoprocessorRequest::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawCoprocessorRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7675,209 +7593,198 @@ void RawCoprocessorRequest::Clear() { _impl_.copr_name_.ClearToEmpty(); _impl_.copr_version_req_.ClearToEmpty(); _impl_.data_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawCoprocessorRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .kvrpcpb.Context context = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_context(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string copr_name = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_copr_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawCoprocessorRequest.copr_name")); - } else - goto handle_unusual; - continue; - // string copr_version_req = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_copr_version_req(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawCoprocessorRequest.copr_version_req")); - } else - goto handle_unusual; - continue; - // repeated .kvrpcpb.KeyRange ranges = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_ranges(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else - goto handle_unusual; - continue; - // bytes data = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_data(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.context_ != nullptr); + _impl_.context_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawCoprocessorRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawCoprocessorRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 2, 63, 2> RawCoprocessorRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawCoprocessorRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .kvrpcpb.Context context = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.context_)}}, + // string copr_name = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.copr_name_)}}, + // string copr_version_req = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.copr_version_req_)}}, + // repeated .kvrpcpb.KeyRange ranges = 4; + {::_pbi::TcParser::FastMtR1, + {34, 63, 1, PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.ranges_)}}, + // bytes data = 5; + {::_pbi::TcParser::FastBS1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.data_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .kvrpcpb.Context context = 1; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.context_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string copr_name = 2; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.copr_name_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string copr_version_req = 3; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.copr_version_req_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // repeated .kvrpcpb.KeyRange ranges = 4; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.ranges_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes data = 5; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorRequest, _impl_.data_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::kvrpcpb::Context>()}, + {::_pbi::TcParser::GetTable<::kvrpcpb::KeyRange>()}, + }}, {{ + "\35\0\11\20\0\0\0\0" + "kvrpcpb.RawCoprocessorRequest" + "copr_name" + "copr_version_req" + }}, +}; + +::uint8_t* RawCoprocessorRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawCoprocessorRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::context(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::context(this), _Internal::context(this).GetCachedSize(), target, stream); } // string copr_name = 2; if (!this->_internal_copr_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_copr_name().data(), static_cast(this->_internal_copr_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawCoprocessorRequest.copr_name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_copr_name(), target); + const std::string& _s = this->_internal_copr_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawCoprocessorRequest.copr_name"); + target = stream->WriteStringMaybeAliased(2, _s, target); } // string copr_version_req = 3; if (!this->_internal_copr_version_req().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_copr_version_req().data(), static_cast(this->_internal_copr_version_req().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawCoprocessorRequest.copr_version_req"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_copr_version_req(), target); + const std::string& _s = this->_internal_copr_version_req(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawCoprocessorRequest.copr_version_req"); + target = stream->WriteStringMaybeAliased(3, _s, target); } // repeated .kvrpcpb.KeyRange ranges = 4; for (unsigned i = 0, n = static_cast(this->_internal_ranges_size()); i < n; i++) { - const auto& repfield = this->_internal_ranges(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_ranges().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); } // bytes data = 5; if (!this->_internal_data().empty()) { - target = stream->WriteBytesMaybeAliased( - 5, this->_internal_data(), target); + const std::string& _s = this->_internal_data(); + target = stream->WriteBytesMaybeAliased(5, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawCoprocessorRequest) return target; } -size_t RawCoprocessorRequest::ByteSizeLong() const { +::size_t RawCoprocessorRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawCoprocessorRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .kvrpcpb.KeyRange ranges = 4; total_size += 1UL * this->_internal_ranges_size(); - for (const auto& msg : this->_impl_.ranges_) { + for (const auto& msg : this->_internal_ranges()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // string copr_name = 2; if (!this->_internal_copr_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_copr_name()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_copr_name()); } // string copr_version_req = 3; if (!this->_internal_copr_version_req().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_copr_version_req()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_copr_version_req()); } // bytes data = 5; if (!this->_internal_data().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_data()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_data()); } // .kvrpcpb.Context context = 1; - if (this->_internal_has_context()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.context_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.context_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawCoprocessorRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawCoprocessorRequest::MergeImpl +const ::google::protobuf::Message::ClassData RawCoprocessorRequest::_class_data_ = { + RawCoprocessorRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawCoprocessorRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawCoprocessorRequest::GetClassData() const { + return &_class_data_; +} -void RawCoprocessorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawCoprocessorRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawCoprocessorRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.ranges_.MergeFrom(from._impl_.ranges_); + _this->_internal_mutable_ranges()->MergeFrom( + from._internal_ranges()); if (!from._internal_copr_name().empty()) { _this->_internal_set_copr_name(from._internal_copr_name()); } @@ -7887,11 +7794,11 @@ void RawCoprocessorRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, if (!from._internal_data().empty()) { _this->_internal_set_data(from._internal_data()); } - if (from._internal_has_context()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_context()->::kvrpcpb::Context::MergeFrom( from._internal_context()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawCoprocessorRequest::CopyFrom(const RawCoprocessorRequest& from) { @@ -7901,285 +7808,258 @@ void RawCoprocessorRequest::CopyFrom(const RawCoprocessorRequest& from) { MergeFrom(from); } -bool RawCoprocessorRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool RawCoprocessorRequest::IsInitialized() const { return true; } -void RawCoprocessorRequest::InternalSwap(RawCoprocessorRequest* other) { +::_pbi::CachedSize* RawCoprocessorRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawCoprocessorRequest::InternalSwap(RawCoprocessorRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.ranges_.InternalSwap(&other->_impl_.ranges_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.copr_name_, lhs_arena, - &other->_impl_.copr_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.copr_version_req_, lhs_arena, - &other->_impl_.copr_version_req_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.data_, lhs_arena, - &other->_impl_.data_, rhs_arena - ); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.copr_name_, &other->_impl_.copr_name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.copr_version_req_, &other->_impl_.copr_version_req_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); swap(_impl_.context_, other->_impl_.context_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawCoprocessorRequest::GetMetadata() const { +::google::protobuf::Metadata RawCoprocessorRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[21]); } - // =================================================================== class RawCoprocessorResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_._has_bits_); static const ::errorpb::Error& region_error(const RawCoprocessorResponse* msg); + static void set_has_region_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::errorpb::Error& -RawCoprocessorResponse::_Internal::region_error(const RawCoprocessorResponse* msg) { +const ::errorpb::Error& RawCoprocessorResponse::_Internal::region_error(const RawCoprocessorResponse* msg) { return *msg->_impl_.region_error_; } void RawCoprocessorResponse::clear_region_error() { - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_error_ != nullptr) _impl_.region_error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -RawCoprocessorResponse::RawCoprocessorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RawCoprocessorResponse::RawCoprocessorResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:kvrpcpb.RawCoprocessorResponse) } -RawCoprocessorResponse::RawCoprocessorResponse(const RawCoprocessorResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RawCoprocessorResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.data_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_error().empty()) { - _this->_impl_.error_.Set(from._internal_error(), - _this->GetArenaForAllocation()); - } - _impl_.data_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_data().empty()) { - _this->_impl_.data_.Set(from._internal_data(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_error()) { - _this->_impl_.region_error_ = new ::errorpb::Error(*from._impl_.region_error_); - } +inline PROTOBUF_NDEBUG_INLINE RawCoprocessorResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + error_(arena, from.error_), + data_(arena, from.data_) {} + +RawCoprocessorResponse::RawCoprocessorResponse( + ::google::protobuf::Arena* arena, + const RawCoprocessorResponse& from) + : ::google::protobuf::Message(arena) { + RawCoprocessorResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::errorpb::Error>(arena, *from._impl_.region_error_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:kvrpcpb.RawCoprocessorResponse) } +inline PROTOBUF_NDEBUG_INLINE RawCoprocessorResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + error_(arena), + data_(arena) {} -inline void RawCoprocessorResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){} - , decltype(_impl_.data_){} - , decltype(_impl_.region_error_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.error_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.error_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCoprocessorResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.region_error_ = {}; } - RawCoprocessorResponse::~RawCoprocessorResponse() { // @@protoc_insertion_point(destructor:kvrpcpb.RawCoprocessorResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RawCoprocessorResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.error_.Destroy(); _impl_.data_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_error_; -} - -void RawCoprocessorResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.region_error_; + _impl_.~Impl_(); } -void RawCoprocessorResponse::Clear() { +PROTOBUF_NOINLINE void RawCoprocessorResponse::Clear() { // @@protoc_insertion_point(message_clear_start:kvrpcpb.RawCoprocessorResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.error_.ClearToEmpty(); _impl_.data_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_error_ != nullptr) { - delete _impl_.region_error_; - } - _impl_.region_error_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RawCoprocessorResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .errorpb.Error region_error = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_region_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_error(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "kvrpcpb.RawCoprocessorResponse.error")); - } else - goto handle_unusual; - continue; - // bytes data = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_data(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_error_ != nullptr); + _impl_.region_error_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RawCoprocessorResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RawCoprocessorResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 1, 44, 2> RawCoprocessorResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_RawCoprocessorResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .errorpb.Error region_error = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_.region_error_)}}, + // string error = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_.error_)}}, + // bytes data = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_.data_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .errorpb.Error region_error = 1; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_.region_error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // string error = 2; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_.error_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // bytes data = 3; + {PROTOBUF_FIELD_OFFSET(RawCoprocessorResponse, _impl_.data_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::errorpb::Error>()}, + }}, {{ + "\36\0\5\0\0\0\0\0" + "kvrpcpb.RawCoprocessorResponse" + "error" + }}, +}; + +::uint8_t* RawCoprocessorResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:kvrpcpb.RawCoprocessorResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::region_error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::region_error(this), _Internal::region_error(this).GetCachedSize(), target, stream); } // string error = 2; if (!this->_internal_error().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_error().data(), static_cast(this->_internal_error().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "kvrpcpb.RawCoprocessorResponse.error"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_error(), target); + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "kvrpcpb.RawCoprocessorResponse.error"); + target = stream->WriteStringMaybeAliased(2, _s, target); } // bytes data = 3; if (!this->_internal_data().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_data(), target); + const std::string& _s = this->_internal_data(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:kvrpcpb.RawCoprocessorResponse) return target; } -size_t RawCoprocessorResponse::ByteSizeLong() const { +::size_t RawCoprocessorResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:kvrpcpb.RawCoprocessorResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error = 2; if (!this->_internal_error().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_error()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); } // bytes data = 3; if (!this->_internal_data().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_data()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_data()); } // .errorpb.Error region_error = 1; - if (this->_internal_has_region_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_error_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RawCoprocessorResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RawCoprocessorResponse::MergeImpl +const ::google::protobuf::Message::ClassData RawCoprocessorResponse::_class_data_ = { + RawCoprocessorResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RawCoprocessorResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RawCoprocessorResponse::GetClassData() const { + return &_class_data_; +} -void RawCoprocessorResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RawCoprocessorResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:kvrpcpb.RawCoprocessorResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_error().empty()) { @@ -8188,11 +8068,11 @@ void RawCoprocessorResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, if (!from._internal_data().empty()) { _this->_internal_set_data(from._internal_data()); } - if (from._internal_has_region_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_error()->::errorpb::Error::MergeFrom( from._internal_region_error()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RawCoprocessorResponse::CopyFrom(const RawCoprocessorResponse& from) { @@ -8202,128 +8082,34 @@ void RawCoprocessorResponse::CopyFrom(const RawCoprocessorResponse& from) { MergeFrom(from); } -bool RawCoprocessorResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool RawCoprocessorResponse::IsInitialized() const { return true; } -void RawCoprocessorResponse::InternalSwap(RawCoprocessorResponse* other) { +::_pbi::CachedSize* RawCoprocessorResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RawCoprocessorResponse::InternalSwap(RawCoprocessorResponse* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.error_, lhs_arena, - &other->_impl_.error_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.data_, lhs_arena, - &other->_impl_.data_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.error_, &other->_impl_.error_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.data_, &other->_impl_.data_, arena); swap(_impl_.region_error_, other->_impl_.region_error_); } -::PROTOBUF_NAMESPACE_ID::Metadata RawCoprocessorResponse::GetMetadata() const { +::google::protobuf::Metadata RawCoprocessorResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_kvrpcpb_2eproto_getter, &descriptor_table_kvrpcpb_2eproto_once, file_level_metadata_kvrpcpb_2eproto[22]); } - // @@protoc_insertion_point(namespace_scope) } // namespace kvrpcpb -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::kvrpcpb::Context* -Arena::CreateMaybeMessage< ::kvrpcpb::Context >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::Context >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::KvPair* -Arena::CreateMaybeMessage< ::kvrpcpb::KvPair >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::KvPair >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawGetRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawGetRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawGetRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawGetResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawGetResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawGetResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawBatchGetRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawBatchGetRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawBatchGetRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawBatchGetResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawBatchGetResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawBatchGetResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawPutRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawPutRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawPutRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawPutResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawPutResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawPutResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawBatchPutRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawBatchPutRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawBatchPutRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawBatchPutResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawBatchPutResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawBatchPutResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawDeleteRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawDeleteRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawDeleteRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawDeleteResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawDeleteResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawDeleteResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawBatchDeleteRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawBatchDeleteRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawBatchDeleteRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawBatchDeleteResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawBatchDeleteResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawBatchDeleteResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawDeleteRangeRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawDeleteRangeRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawDeleteRangeRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawDeleteRangeResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawDeleteRangeResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawDeleteRangeResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawCASRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawCASRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawCASRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawCASResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawCASResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawCASResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawScanRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawScanRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawScanRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawScanResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawScanResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawScanResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::KeyRange* -Arena::CreateMaybeMessage< ::kvrpcpb::KeyRange >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::KeyRange >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawCoprocessorRequest* -Arena::CreateMaybeMessage< ::kvrpcpb::RawCoprocessorRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawCoprocessorRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::kvrpcpb::RawCoprocessorResponse* -Arena::CreateMaybeMessage< ::kvrpcpb::RawCoprocessorResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::kvrpcpb::RawCoprocessorResponse >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include +#include "google/protobuf/port_undef.inc" diff --git a/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.h b/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.h index 908f1b607..da9d47169 100644 --- a/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.h +++ b/ThirdParty/kvproto/generated/kvproto/kvrpcpb.pb.h @@ -1,52 +1,63 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: kvrpcpb.proto +// Protobuf C++ Version: 4.25.3 -#ifndef GOOGLE_PROTOBUF_INCLUDED_kvrpcpb_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_kvrpcpb_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_kvrpcpb_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_kvrpcpb_2eproto_2epb_2eh #include #include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION < 4025000 +#error "This file was generated by a newer version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please update" +#error "your headers." +#endif // PROTOBUF_VERSION + +#if 4025003 < PROTOBUF_MIN_PROTOC_VERSION +#error "This file was generated by an older version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please" +#error "regenerate this file with a newer version of protoc." +#endif // PROTOBUF_MIN_PROTOC_VERSION +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" #include "metapb.pb.h" #include "errorpb.pb.h" // @@protoc_insertion_point(includes) -#include + +// Must be included last. +#include "google/protobuf/port_def.inc" + #define PROTOBUF_INTERNAL_EXPORT_kvrpcpb_2eproto -PROTOBUF_NAMESPACE_OPEN + +namespace google { +namespace protobuf { namespace internal { class AnyMetadata; } // namespace internal -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // Internal implementation detail -- do not use these members. struct TableStruct_kvrpcpb_2eproto { - static const uint32_t offsets[]; + static const ::uint32_t offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_kvrpcpb_2eproto; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_kvrpcpb_2eproto; namespace kvrpcpb { class Context; struct ContextDefaultTypeInternal; @@ -118,95 +129,295 @@ class RawScanResponse; struct RawScanResponseDefaultTypeInternal; extern RawScanResponseDefaultTypeInternal _RawScanResponse_default_instance_; } // namespace kvrpcpb -PROTOBUF_NAMESPACE_OPEN -template<> ::kvrpcpb::Context* Arena::CreateMaybeMessage<::kvrpcpb::Context>(Arena*); -template<> ::kvrpcpb::KeyRange* Arena::CreateMaybeMessage<::kvrpcpb::KeyRange>(Arena*); -template<> ::kvrpcpb::KvPair* Arena::CreateMaybeMessage<::kvrpcpb::KvPair>(Arena*); -template<> ::kvrpcpb::RawBatchDeleteRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawBatchDeleteRequest>(Arena*); -template<> ::kvrpcpb::RawBatchDeleteResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawBatchDeleteResponse>(Arena*); -template<> ::kvrpcpb::RawBatchGetRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawBatchGetRequest>(Arena*); -template<> ::kvrpcpb::RawBatchGetResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawBatchGetResponse>(Arena*); -template<> ::kvrpcpb::RawBatchPutRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawBatchPutRequest>(Arena*); -template<> ::kvrpcpb::RawBatchPutResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawBatchPutResponse>(Arena*); -template<> ::kvrpcpb::RawCASRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawCASRequest>(Arena*); -template<> ::kvrpcpb::RawCASResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawCASResponse>(Arena*); -template<> ::kvrpcpb::RawCoprocessorRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawCoprocessorRequest>(Arena*); -template<> ::kvrpcpb::RawCoprocessorResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawCoprocessorResponse>(Arena*); -template<> ::kvrpcpb::RawDeleteRangeRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawDeleteRangeRequest>(Arena*); -template<> ::kvrpcpb::RawDeleteRangeResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawDeleteRangeResponse>(Arena*); -template<> ::kvrpcpb::RawDeleteRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawDeleteRequest>(Arena*); -template<> ::kvrpcpb::RawDeleteResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawDeleteResponse>(Arena*); -template<> ::kvrpcpb::RawGetRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawGetRequest>(Arena*); -template<> ::kvrpcpb::RawGetResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawGetResponse>(Arena*); -template<> ::kvrpcpb::RawPutRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawPutRequest>(Arena*); -template<> ::kvrpcpb::RawPutResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawPutResponse>(Arena*); -template<> ::kvrpcpb::RawScanRequest* Arena::CreateMaybeMessage<::kvrpcpb::RawScanRequest>(Arena*); -template<> ::kvrpcpb::RawScanResponse* Arena::CreateMaybeMessage<::kvrpcpb::RawScanResponse>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace kvrpcpb { +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +namespace kvrpcpb { enum CommandPri : int { Normal = 0, Low = 1, High = 2, - CommandPri_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - CommandPri_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() + CommandPri_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + CommandPri_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), }; + bool CommandPri_IsValid(int value); -constexpr CommandPri CommandPri_MIN = Normal; -constexpr CommandPri CommandPri_MAX = High; -constexpr int CommandPri_ARRAYSIZE = CommandPri_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CommandPri_descriptor(); -template -inline const std::string& CommandPri_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function CommandPri_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - CommandPri_descriptor(), enum_t_value); -} -inline bool CommandPri_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CommandPri* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - CommandPri_descriptor(), name, value); +extern const uint32_t CommandPri_internal_data_[]; +constexpr CommandPri CommandPri_MIN = static_cast(0); +constexpr CommandPri CommandPri_MAX = static_cast(2); +constexpr int CommandPri_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +CommandPri_descriptor(); +template +const std::string& CommandPri_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to CommandPri_Name()."); + return CommandPri_Name(static_cast(value)); +} +template <> +inline const std::string& CommandPri_Name(CommandPri value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool CommandPri_Parse(absl::string_view name, CommandPri* value) { + return ::google::protobuf::internal::ParseNamedEnum( + CommandPri_descriptor(), name, value); } enum IsolationLevel : int { SI = 0, RC = 1, RCCheckTS = 2, - IsolationLevel_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - IsolationLevel_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() + IsolationLevel_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + IsolationLevel_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), }; + bool IsolationLevel_IsValid(int value); -constexpr IsolationLevel IsolationLevel_MIN = SI; -constexpr IsolationLevel IsolationLevel_MAX = RCCheckTS; -constexpr int IsolationLevel_ARRAYSIZE = IsolationLevel_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IsolationLevel_descriptor(); -template -inline const std::string& IsolationLevel_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function IsolationLevel_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - IsolationLevel_descriptor(), enum_t_value); -} -inline bool IsolationLevel_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, IsolationLevel* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - IsolationLevel_descriptor(), name, value); +extern const uint32_t IsolationLevel_internal_data_[]; +constexpr IsolationLevel IsolationLevel_MIN = static_cast(0); +constexpr IsolationLevel IsolationLevel_MAX = static_cast(2); +constexpr int IsolationLevel_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +IsolationLevel_descriptor(); +template +const std::string& IsolationLevel_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to IsolationLevel_Name()."); + return IsolationLevel_Name(static_cast(value)); +} +template <> +inline const std::string& IsolationLevel_Name(IsolationLevel value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool IsolationLevel_Parse(absl::string_view name, IsolationLevel* value) { + return ::google::protobuf::internal::ParseNamedEnum( + IsolationLevel_descriptor(), name, value); } + // =================================================================== + +// ------------------------------------------------------------------- + +class KeyRange final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.KeyRange) */ { + public: + inline KeyRange() : KeyRange(nullptr) {} + ~KeyRange() override; + template + explicit PROTOBUF_CONSTEXPR KeyRange(::google::protobuf::internal::ConstantInitialized); + + inline KeyRange(const KeyRange& from) + : KeyRange(nullptr, from) {} + KeyRange(KeyRange&& from) noexcept + : KeyRange() { + *this = ::std::move(from); + } + + inline KeyRange& operator=(const KeyRange& from) { + CopyFrom(from); + return *this; + } + inline KeyRange& operator=(KeyRange&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const KeyRange& default_instance() { + return *internal_default_instance(); + } + static inline const KeyRange* internal_default_instance() { + return reinterpret_cast( + &_KeyRange_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(KeyRange& a, KeyRange& b) { + a.Swap(&b); + } + inline void Swap(KeyRange* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(KeyRange* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KeyRange* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const KeyRange& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const KeyRange& from) { + KeyRange::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(KeyRange* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.KeyRange"; + } + protected: + explicit KeyRange(::google::protobuf::Arena* arena); + KeyRange(::google::protobuf::Arena* arena, const KeyRange& from); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStartKeyFieldNumber = 1, + kEndKeyFieldNumber = 2, + }; + // bytes start_key = 1; + void clear_start_key() ; + const std::string& start_key() const; + template + void set_start_key(Arg_&& arg, Args_... args); + std::string* mutable_start_key(); + PROTOBUF_NODISCARD std::string* release_start_key(); + void set_allocated_start_key(std::string* value); + + private: + const std::string& _internal_start_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key( + const std::string& value); + std::string* _internal_mutable_start_key(); + + public: + // bytes end_key = 2; + void clear_end_key() ; + const std::string& end_key() const; + template + void set_end_key(Arg_&& arg, Args_... args); + std::string* mutable_end_key(); + PROTOBUF_NODISCARD std::string* release_end_key(); + void set_allocated_end_key(std::string* value); + + private: + const std::string& _internal_end_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key( + const std::string& value); + std::string* _internal_mutable_end_key(); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.KeyRange) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr start_key_; + ::google::protobuf::internal::ArenaStringPtr end_key_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_kvrpcpb_2eproto; +};// ------------------------------------------------------------------- + class Context final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.Context) */ { + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.Context) */ { public: inline Context() : Context(nullptr) {} ~Context() override; - explicit PROTOBUF_CONSTEXPR Context(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + template + explicit PROTOBUF_CONSTEXPR Context(::google::protobuf::internal::ConstantInitialized); - Context(const Context& from); + inline Context(const Context& from) + : Context(nullptr, from) {} Context(Context&& from) noexcept : Context() { *this = ::std::move(from); @@ -218,9 +429,9 @@ class Context final : } inline Context& operator=(Context&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -230,13 +441,22 @@ class Context final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const Context& default_instance() { @@ -255,65 +475,65 @@ class Context final : inline void Swap(Context* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(Context* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Context* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + Context* New(::google::protobuf::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + using ::google::protobuf::Message::CopyFrom; void CopyFrom(const Context& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + using ::google::protobuf::Message::MergeFrom; void MergeFrom( const Context& from) { Context::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; void InternalSwap(Context* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "kvrpcpb.Context"; } protected: - explicit Context(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Context(::google::protobuf::Arena* arena); + Context(::google::protobuf::Arena* arena, const Context& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -342,212 +562,235 @@ class Context final : int resolved_locks_size() const; private: int _internal_resolved_locks_size() const; + public: - void clear_resolved_locks(); + void clear_resolved_locks() ; + ::uint64_t resolved_locks(int index) const; + void set_resolved_locks(int index, ::uint64_t value); + void add_resolved_locks(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& resolved_locks() const; + ::google::protobuf::RepeatedField<::uint64_t>* mutable_resolved_locks(); + private: - uint64_t _internal_resolved_locks(int index) const; - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& - _internal_resolved_locks() const; - void _internal_add_resolved_locks(uint64_t value); - ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* - _internal_mutable_resolved_locks(); - public: - uint64_t resolved_locks(int index) const; - void set_resolved_locks(int index, uint64_t value); - void add_resolved_locks(uint64_t value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& - resolved_locks() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* - mutable_resolved_locks(); + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_resolved_locks() const; + ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_resolved_locks(); + public: // string resource_group_name = 15; - void clear_resource_group_name(); + void clear_resource_group_name() ; const std::string& resource_group_name() const; - template - void set_resource_group_name(ArgT0&& arg0, ArgT... args); + template + void set_resource_group_name(Arg_&& arg, Args_... args); std::string* mutable_resource_group_name(); PROTOBUF_NODISCARD std::string* release_resource_group_name(); - void set_allocated_resource_group_name(std::string* resource_group_name); + void set_allocated_resource_group_name(std::string* value); + private: const std::string& _internal_resource_group_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_resource_group_name(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_resource_group_name( + const std::string& value); std::string* _internal_mutable_resource_group_name(); - public: + public: // bytes source_stmt = 16; - void clear_source_stmt(); + void clear_source_stmt() ; const std::string& source_stmt() const; - template - void set_source_stmt(ArgT0&& arg0, ArgT... args); + template + void set_source_stmt(Arg_&& arg, Args_... args); std::string* mutable_source_stmt(); PROTOBUF_NODISCARD std::string* release_source_stmt(); - void set_allocated_source_stmt(std::string* source_stmt); + void set_allocated_source_stmt(std::string* value); + private: const std::string& _internal_source_stmt() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_source_stmt(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_source_stmt( + const std::string& value); std::string* _internal_mutable_source_stmt(); - public: + public: // .metapb.RegionEpoch region_epoch = 2; bool has_region_epoch() const; - private: - bool _internal_has_region_epoch() const; - public: - void clear_region_epoch(); + void clear_region_epoch() ; const ::metapb::RegionEpoch& region_epoch() const; PROTOBUF_NODISCARD ::metapb::RegionEpoch* release_region_epoch(); ::metapb::RegionEpoch* mutable_region_epoch(); - void set_allocated_region_epoch(::metapb::RegionEpoch* region_epoch); + void set_allocated_region_epoch(::metapb::RegionEpoch* value); + void unsafe_arena_set_allocated_region_epoch(::metapb::RegionEpoch* value); + ::metapb::RegionEpoch* unsafe_arena_release_region_epoch(); + private: const ::metapb::RegionEpoch& _internal_region_epoch() const; ::metapb::RegionEpoch* _internal_mutable_region_epoch(); - public: - void unsafe_arena_set_allocated_region_epoch( - ::metapb::RegionEpoch* region_epoch); - ::metapb::RegionEpoch* unsafe_arena_release_region_epoch(); + public: // .metapb.Peer peer = 3; bool has_peer() const; - private: - bool _internal_has_peer() const; - public: - void clear_peer(); + void clear_peer() ; const ::metapb::Peer& peer() const; PROTOBUF_NODISCARD ::metapb::Peer* release_peer(); ::metapb::Peer* mutable_peer(); - void set_allocated_peer(::metapb::Peer* peer); + void set_allocated_peer(::metapb::Peer* value); + void unsafe_arena_set_allocated_peer(::metapb::Peer* value); + ::metapb::Peer* unsafe_arena_release_peer(); + private: const ::metapb::Peer& _internal_peer() const; ::metapb::Peer* _internal_mutable_peer(); - public: - void unsafe_arena_set_allocated_peer( - ::metapb::Peer* peer); - ::metapb::Peer* unsafe_arena_release_peer(); + public: // uint64 region_id = 1; - void clear_region_id(); - uint64_t region_id() const; - void set_region_id(uint64_t value); + void clear_region_id() ; + ::uint64_t region_id() const; + void set_region_id(::uint64_t value); + private: - uint64_t _internal_region_id() const; - void _internal_set_region_id(uint64_t value); - public: + ::uint64_t _internal_region_id() const; + void _internal_set_region_id(::uint64_t value); + public: // uint64 term = 5; - void clear_term(); - uint64_t term() const; - void set_term(uint64_t value); + void clear_term() ; + ::uint64_t term() const; + void set_term(::uint64_t value); + private: - uint64_t _internal_term() const; - void _internal_set_term(uint64_t value); - public: + ::uint64_t _internal_term() const; + void _internal_set_term(::uint64_t value); + public: // .kvrpcpb.CommandPri priority = 6; - void clear_priority(); + void clear_priority() ; ::kvrpcpb::CommandPri priority() const; void set_priority(::kvrpcpb::CommandPri value); + private: ::kvrpcpb::CommandPri _internal_priority() const; void _internal_set_priority(::kvrpcpb::CommandPri value); - public: + public: // .kvrpcpb.IsolationLevel isolation_level = 7; - void clear_isolation_level(); + void clear_isolation_level() ; ::kvrpcpb::IsolationLevel isolation_level() const; void set_isolation_level(::kvrpcpb::IsolationLevel value); + private: ::kvrpcpb::IsolationLevel _internal_isolation_level() const; void _internal_set_isolation_level(::kvrpcpb::IsolationLevel value); - public: + public: // bool read_quorum = 4; - void clear_read_quorum(); + void clear_read_quorum() ; bool read_quorum() const; void set_read_quorum(bool value); + private: bool _internal_read_quorum() const; void _internal_set_read_quorum(bool value); - public: + public: // bool not_fill_cache = 8; - void clear_not_fill_cache(); + void clear_not_fill_cache() ; bool not_fill_cache() const; void set_not_fill_cache(bool value); + private: bool _internal_not_fill_cache() const; void _internal_set_not_fill_cache(bool value); - public: + public: // bool sync_log = 9; - void clear_sync_log(); + void clear_sync_log() ; bool sync_log() const; void set_sync_log(bool value); + private: bool _internal_sync_log() const; void _internal_set_sync_log(bool value); - public: + public: // bool stale_read = 10; - void clear_stale_read(); + void clear_stale_read() ; bool stale_read() const; void set_stale_read(bool value); + private: bool _internal_stale_read() const; void _internal_set_stale_read(bool value); - public: + public: // bool replica_read = 12; - void clear_replica_read(); + void clear_replica_read() ; bool replica_read() const; void set_replica_read(bool value); + private: bool _internal_replica_read() const; void _internal_set_replica_read(bool value); - public: + public: // uint64 resource_group_tag = 11; - void clear_resource_group_tag(); - uint64_t resource_group_tag() const; - void set_resource_group_tag(uint64_t value); + void clear_resource_group_tag() ; + ::uint64_t resource_group_tag() const; + void set_resource_group_tag(::uint64_t value); + private: - uint64_t _internal_resource_group_tag() const; - void _internal_set_resource_group_tag(uint64_t value); - public: + ::uint64_t _internal_resource_group_tag() const; + void _internal_set_resource_group_tag(::uint64_t value); + public: // uint64 max_execution_duration_ms = 14; - void clear_max_execution_duration_ms(); - uint64_t max_execution_duration_ms() const; - void set_max_execution_duration_ms(uint64_t value); + void clear_max_execution_duration_ms() ; + ::uint64_t max_execution_duration_ms() const; + void set_max_execution_duration_ms(::uint64_t value); + private: - uint64_t _internal_max_execution_duration_ms() const; - void _internal_set_max_execution_duration_ms(uint64_t value); - public: + ::uint64_t _internal_max_execution_duration_ms() const; + void _internal_set_max_execution_duration_ms(::uint64_t value); + public: // uint64 request_source = 17; - void clear_request_source(); - uint64_t request_source() const; - void set_request_source(uint64_t value); + void clear_request_source() ; + ::uint64_t request_source() const; + void set_request_source(::uint64_t value); + private: - uint64_t _internal_request_source() const; - void _internal_set_request_source(uint64_t value); - public: + ::uint64_t _internal_request_source() const; + void _internal_set_request_source(::uint64_t value); + public: // @@protoc_insertion_point(class_scope:kvrpcpb.Context) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 5, 17, 2, + 59, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t > resolved_locks_; - mutable std::atomic _resolved_locks_cached_byte_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr resource_group_name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_stmt_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::uint64_t> resolved_locks_; + mutable ::google::protobuf::internal::CachedSize _resolved_locks_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr resource_group_name_; + ::google::protobuf::internal::ArenaStringPtr source_stmt_; ::metapb::RegionEpoch* region_epoch_; ::metapb::Peer* peer_; - uint64_t region_id_; - uint64_t term_; + ::uint64_t region_id_; + ::uint64_t term_; int priority_; int isolation_level_; bool read_quorum_; @@ -555,38 +798,39 @@ class Context final : bool sync_log_; bool stale_read_; bool replica_read_; - uint64_t resource_group_tag_; - uint64_t max_execution_duration_ms_; - uint64_t request_source_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::uint64_t resource_group_tag_; + ::uint64_t max_execution_duration_ms_; + ::uint64_t request_source_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class KvPair final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.KvPair) */ { +class RawScanRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawScanRequest) */ { public: - inline KvPair() : KvPair(nullptr) {} - ~KvPair() override; - explicit PROTOBUF_CONSTEXPR KvPair(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawScanRequest() : RawScanRequest(nullptr) {} + ~RawScanRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawScanRequest(::google::protobuf::internal::ConstantInitialized); - KvPair(const KvPair& from); - KvPair(KvPair&& from) noexcept - : KvPair() { + inline RawScanRequest(const RawScanRequest& from) + : RawScanRequest(nullptr, from) {} + RawScanRequest(RawScanRequest&& from) noexcept + : RawScanRequest() { *this = ::std::move(from); } - inline KvPair& operator=(const KvPair& from) { + inline RawScanRequest& operator=(const RawScanRequest& from) { CopyFrom(from); return *this; } - inline KvPair& operator=(KvPair&& from) noexcept { + inline RawScanRequest& operator=(RawScanRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -596,186 +840,268 @@ class KvPair final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const KvPair& default_instance() { + static const RawScanRequest& default_instance() { return *internal_default_instance(); } - static inline const KvPair* internal_default_instance() { - return reinterpret_cast( - &_KvPair_default_instance_); + static inline const RawScanRequest* internal_default_instance() { + return reinterpret_cast( + &_RawScanRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 18; - friend void swap(KvPair& a, KvPair& b) { + friend void swap(RawScanRequest& a, RawScanRequest& b) { a.Swap(&b); } - inline void Swap(KvPair* other) { + inline void Swap(RawScanRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(KvPair* other) { + void UnsafeArenaSwap(RawScanRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - KvPair* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawScanRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const KvPair& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const KvPair& from) { - KvPair::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawScanRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawScanRequest& from) { + RawScanRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(KvPair* other); + void InternalSwap(RawScanRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.KvPair"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawScanRequest"; } protected: - explicit KvPair(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawScanRequest(::google::protobuf::Arena* arena); + RawScanRequest(::google::protobuf::Arena* arena, const RawScanRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKeyFieldNumber = 2, - kValueFieldNumber = 3, - kErrorFieldNumber = 1, + kStartKeyFieldNumber = 2, + kCfFieldNumber = 5, + kEndKeyFieldNumber = 7, + kContextFieldNumber = 1, + kLimitFieldNumber = 3, + kKeyOnlyFieldNumber = 4, + kReverseFieldNumber = 6, }; - // bytes key = 2; - void clear_key(); - const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_key(); - PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); + // bytes start_key = 2; + void clear_start_key() ; + const std::string& start_key() const; + template + void set_start_key(Arg_&& arg, Args_... args); + std::string* mutable_start_key(); + PROTOBUF_NODISCARD std::string* release_start_key(); + void set_allocated_start_key(std::string* value); + private: - const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); - std::string* _internal_mutable_key(); + const std::string& _internal_start_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key( + const std::string& value); + std::string* _internal_mutable_start_key(); + public: + // string cf = 5; + void clear_cf() ; + const std::string& cf() const; + template + void set_cf(Arg_&& arg, Args_... args); + std::string* mutable_cf(); + PROTOBUF_NODISCARD std::string* release_cf(); + void set_allocated_cf(std::string* value); - // bytes value = 3; - void clear_value(); - const std::string& value() const; - template - void set_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_value(); - PROTOBUF_NODISCARD std::string* release_value(); - void set_allocated_value(std::string* value); private: - const std::string& _internal_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); - std::string* _internal_mutable_value(); + const std::string& _internal_cf() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); + std::string* _internal_mutable_cf(); + public: + // bytes end_key = 7; + void clear_end_key() ; + const std::string& end_key() const; + template + void set_end_key(Arg_&& arg, Args_... args); + std::string* mutable_end_key(); + PROTOBUF_NODISCARD std::string* release_end_key(); + void set_allocated_end_key(std::string* value); - // .errorpb.Error error = 1; - bool has_error() const; private: - bool _internal_has_error() const; + const std::string& _internal_end_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key( + const std::string& value); + std::string* _internal_mutable_end_key(); + public: - void clear_error(); - const ::errorpb::Error& error() const; - PROTOBUF_NODISCARD ::errorpb::Error* release_error(); - ::errorpb::Error* mutable_error(); - void set_allocated_error(::errorpb::Error* error); + // .kvrpcpb.Context context = 1; + bool has_context() const; + void clear_context() ; + const ::kvrpcpb::Context& context() const; + PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); + ::kvrpcpb::Context* mutable_context(); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: - const ::errorpb::Error& _internal_error() const; - ::errorpb::Error* _internal_mutable_error(); + const ::kvrpcpb::Context& _internal_context() const; + ::kvrpcpb::Context* _internal_mutable_context(); + public: - void unsafe_arena_set_allocated_error( - ::errorpb::Error* error); - ::errorpb::Error* unsafe_arena_release_error(); + // uint32 limit = 3; + void clear_limit() ; + ::uint32_t limit() const; + void set_limit(::uint32_t value); - // @@protoc_insertion_point(class_scope:kvrpcpb.KvPair) + private: + ::uint32_t _internal_limit() const; + void _internal_set_limit(::uint32_t value); + + public: + // bool key_only = 4; + void clear_key_only() ; + bool key_only() const; + void set_key_only(bool value); + + private: + bool _internal_key_only() const; + void _internal_set_key_only(bool value); + + public: + // bool reverse = 6; + void clear_reverse() ; + bool reverse() const; + void set_reverse(bool value); + + private: + bool _internal_reverse() const; + void _internal_set_reverse(bool value); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawScanRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 7, 1, + 33, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; - ::errorpb::Error* error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr start_key_; + ::google::protobuf::internal::ArenaStringPtr cf_; + ::google::protobuf::internal::ArenaStringPtr end_key_; + ::kvrpcpb::Context* context_; + ::uint32_t limit_; + bool key_only_; + bool reverse_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawGetRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawGetRequest) */ { +class RawPutRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawPutRequest) */ { public: - inline RawGetRequest() : RawGetRequest(nullptr) {} - ~RawGetRequest() override; - explicit PROTOBUF_CONSTEXPR RawGetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawPutRequest() : RawPutRequest(nullptr) {} + ~RawPutRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawPutRequest(::google::protobuf::internal::ConstantInitialized); - RawGetRequest(const RawGetRequest& from); - RawGetRequest(RawGetRequest&& from) noexcept - : RawGetRequest() { + inline RawPutRequest(const RawPutRequest& from) + : RawPutRequest(nullptr, from) {} + RawPutRequest(RawPutRequest&& from) noexcept + : RawPutRequest() { *this = ::std::move(from); } - inline RawGetRequest& operator=(const RawGetRequest& from) { + inline RawPutRequest& operator=(const RawPutRequest& from) { CopyFrom(from); return *this; } - inline RawGetRequest& operator=(RawGetRequest&& from) noexcept { + inline RawPutRequest& operator=(RawPutRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -785,90 +1111,99 @@ class RawGetRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawGetRequest& default_instance() { + static const RawPutRequest& default_instance() { return *internal_default_instance(); } - static inline const RawGetRequest* internal_default_instance() { - return reinterpret_cast( - &_RawGetRequest_default_instance_); + static inline const RawPutRequest* internal_default_instance() { + return reinterpret_cast( + &_RawPutRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 6; - friend void swap(RawGetRequest& a, RawGetRequest& b) { + friend void swap(RawPutRequest& a, RawPutRequest& b) { a.Swap(&b); } - inline void Swap(RawGetRequest* other) { + inline void Swap(RawPutRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawGetRequest* other) { + void UnsafeArenaSwap(RawPutRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawGetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawPutRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawGetRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawGetRequest& from) { - RawGetRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawPutRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawPutRequest& from) { + RawPutRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawGetRequest* other); + void InternalSwap(RawPutRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawGetRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawPutRequest"; } protected: - explicit RawGetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawPutRequest(::google::protobuf::Arena* arena); + RawPutRequest(::google::protobuf::Arena* arena, const RawPutRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -876,95 +1211,156 @@ class RawGetRequest final : enum : int { kKeyFieldNumber = 2, - kCfFieldNumber = 3, + kValueFieldNumber = 3, + kCfFieldNumber = 4, kContextFieldNumber = 1, + kTtlFieldNumber = 5, + kForCasFieldNumber = 6, }; // bytes key = 2; - void clear_key(); + void clear_key() ; const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); + template + void set_key(Arg_&& arg, Args_... args); std::string* mutable_key(); PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); + void set_allocated_key(std::string* value); + private: const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); std::string* _internal_mutable_key(); + public: + // bytes value = 3; + void clear_value() ; + const std::string& value() const; + template + void set_value(Arg_&& arg, Args_... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); - // string cf = 3; - void clear_cf(); + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value( + const std::string& value); + std::string* _internal_mutable_value(); + + public: + // string cf = 4; + void clear_cf() ; const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); + template + void set_cf(Arg_&& arg, Args_... args); std::string* mutable_cf(); PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); + void set_allocated_cf(std::string* value); + private: const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); std::string* _internal_mutable_cf(); - public: + public: // .kvrpcpb.Context context = 1; bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); + void clear_context() ; const ::kvrpcpb::Context& context() const; PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: const ::kvrpcpb::Context& _internal_context() const; ::kvrpcpb::Context* _internal_mutable_context(); + public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + // uint64 ttl = 5; + void clear_ttl() ; + ::uint64_t ttl() const; + void set_ttl(::uint64_t value); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawGetRequest) + private: + ::uint64_t _internal_ttl() const; + void _internal_set_ttl(::uint64_t value); + + public: + // bool for_cas = 6; + void clear_for_cas() ; + bool for_cas() const; + void set_for_cas(bool value); + + private: + bool _internal_for_cas() const; + void _internal_set_for_cas(bool value); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawPutRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 6, 1, + 32, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr value_; + ::google::protobuf::internal::ArenaStringPtr cf_; ::kvrpcpb::Context* context_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::uint64_t ttl_; + bool for_cas_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawGetResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawGetResponse) */ { +class RawGetRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawGetRequest) */ { public: - inline RawGetResponse() : RawGetResponse(nullptr) {} - ~RawGetResponse() override; - explicit PROTOBUF_CONSTEXPR RawGetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawGetRequest() : RawGetRequest(nullptr) {} + ~RawGetRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawGetRequest(::google::protobuf::internal::ConstantInitialized); - RawGetResponse(const RawGetResponse& from); - RawGetResponse(RawGetResponse&& from) noexcept - : RawGetResponse() { + inline RawGetRequest(const RawGetRequest& from) + : RawGetRequest(nullptr, from) {} + RawGetRequest(RawGetRequest&& from) noexcept + : RawGetRequest() { *this = ::std::move(from); } - inline RawGetResponse& operator=(const RawGetResponse& from) { + inline RawGetRequest& operator=(const RawGetRequest& from) { CopyFrom(from); return *this; } - inline RawGetResponse& operator=(RawGetResponse&& from) noexcept { + inline RawGetRequest& operator=(RawGetRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -974,197 +1370,214 @@ class RawGetResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawGetResponse& default_instance() { + static const RawGetRequest& default_instance() { return *internal_default_instance(); } - static inline const RawGetResponse* internal_default_instance() { - return reinterpret_cast( - &_RawGetResponse_default_instance_); + static inline const RawGetRequest* internal_default_instance() { + return reinterpret_cast( + &_RawGetRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 2; - friend void swap(RawGetResponse& a, RawGetResponse& b) { + friend void swap(RawGetRequest& a, RawGetRequest& b) { a.Swap(&b); } - inline void Swap(RawGetResponse* other) { + inline void Swap(RawGetRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawGetResponse* other) { + void UnsafeArenaSwap(RawGetRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawGetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawGetRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawGetResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawGetResponse& from) { - RawGetResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawGetRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawGetRequest& from) { + RawGetRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawGetResponse* other); + void InternalSwap(RawGetRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawGetResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawGetRequest"; } protected: - explicit RawGetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawGetRequest(::google::protobuf::Arena* arena); + RawGetRequest(::google::protobuf::Arena* arena, const RawGetRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kErrorFieldNumber = 2, - kValueFieldNumber = 3, - kRegionErrorFieldNumber = 1, - kNotFoundFieldNumber = 4, + kKeyFieldNumber = 2, + kCfFieldNumber = 3, + kContextFieldNumber = 1, }; - // string error = 2; - void clear_error(); - const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); - std::string* mutable_error(); - PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); + // bytes key = 2; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); + private: - const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); - std::string* _internal_mutable_error(); + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); + public: + // string cf = 3; + void clear_cf() ; + const std::string& cf() const; + template + void set_cf(Arg_&& arg, Args_... args); + std::string* mutable_cf(); + PROTOBUF_NODISCARD std::string* release_cf(); + void set_allocated_cf(std::string* value); - // bytes value = 3; - void clear_value(); - const std::string& value() const; - template - void set_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_value(); - PROTOBUF_NODISCARD std::string* release_value(); - void set_allocated_value(std::string* value); private: - const std::string& _internal_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); - std::string* _internal_mutable_value(); - public: + const std::string& _internal_cf() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); + std::string* _internal_mutable_cf(); - // .errorpb.Error region_error = 1; - bool has_region_error() const; - private: - bool _internal_has_region_error() const; - public: - void clear_region_error(); - const ::errorpb::Error& region_error() const; - PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); - ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); - private: - const ::errorpb::Error& _internal_region_error() const; - ::errorpb::Error* _internal_mutable_region_error(); public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); + // .kvrpcpb.Context context = 1; + bool has_context() const; + void clear_context() ; + const ::kvrpcpb::Context& context() const; + PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); + ::kvrpcpb::Context* mutable_context(); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); - // bool not_found = 4; - void clear_not_found(); - bool not_found() const; - void set_not_found(bool value); private: - bool _internal_not_found() const; - void _internal_set_not_found(bool value); - public: + const ::kvrpcpb::Context& _internal_context() const; + ::kvrpcpb::Context* _internal_mutable_context(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawGetResponse) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawGetRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 3, 1, + 32, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; - ::errorpb::Error* region_error_; - bool not_found_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr cf_; + ::kvrpcpb::Context* context_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawBatchGetRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchGetRequest) */ { +class RawDeleteRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteRequest) */ { public: - inline RawBatchGetRequest() : RawBatchGetRequest(nullptr) {} - ~RawBatchGetRequest() override; - explicit PROTOBUF_CONSTEXPR RawBatchGetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawDeleteRequest() : RawDeleteRequest(nullptr) {} + ~RawDeleteRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawDeleteRequest(::google::protobuf::internal::ConstantInitialized); - RawBatchGetRequest(const RawBatchGetRequest& from); - RawBatchGetRequest(RawBatchGetRequest&& from) noexcept - : RawBatchGetRequest() { + inline RawDeleteRequest(const RawDeleteRequest& from) + : RawDeleteRequest(nullptr, from) {} + RawDeleteRequest(RawDeleteRequest&& from) noexcept + : RawDeleteRequest() { *this = ::std::move(from); } - inline RawBatchGetRequest& operator=(const RawBatchGetRequest& from) { + inline RawDeleteRequest& operator=(const RawDeleteRequest& from) { CopyFrom(from); return *this; } - inline RawBatchGetRequest& operator=(RawBatchGetRequest&& from) noexcept { + inline RawDeleteRequest& operator=(RawDeleteRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1174,196 +1587,226 @@ class RawBatchGetRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawBatchGetRequest& default_instance() { + static const RawDeleteRequest& default_instance() { return *internal_default_instance(); } - static inline const RawBatchGetRequest* internal_default_instance() { - return reinterpret_cast( - &_RawBatchGetRequest_default_instance_); + static inline const RawDeleteRequest* internal_default_instance() { + return reinterpret_cast( + &_RawDeleteRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 10; - friend void swap(RawBatchGetRequest& a, RawBatchGetRequest& b) { + friend void swap(RawDeleteRequest& a, RawDeleteRequest& b) { a.Swap(&b); } - inline void Swap(RawBatchGetRequest* other) { + inline void Swap(RawDeleteRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawBatchGetRequest* other) { + void UnsafeArenaSwap(RawDeleteRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawBatchGetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawDeleteRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawBatchGetRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawBatchGetRequest& from) { - RawBatchGetRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawDeleteRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawDeleteRequest& from) { + RawDeleteRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawBatchGetRequest* other); + void InternalSwap(RawDeleteRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawBatchGetRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawDeleteRequest"; } protected: - explicit RawBatchGetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawDeleteRequest(::google::protobuf::Arena* arena); + RawDeleteRequest(::google::protobuf::Arena* arena, const RawDeleteRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKeysFieldNumber = 2, + kKeyFieldNumber = 2, kCfFieldNumber = 3, kContextFieldNumber = 1, + kForCasFieldNumber = 4, }; - // repeated bytes keys = 2; - int keys_size() const; - private: - int _internal_keys_size() const; - public: - void clear_keys(); - const std::string& keys(int index) const; - std::string* mutable_keys(int index); - void set_keys(int index, const std::string& value); - void set_keys(int index, std::string&& value); - void set_keys(int index, const char* value); - void set_keys(int index, const void* value, size_t size); - std::string* add_keys(); - void add_keys(const std::string& value); - void add_keys(std::string&& value); - void add_keys(const char* value); - void add_keys(const void* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& keys() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_keys(); + // bytes key = 2; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); + private: - const std::string& _internal_keys(int index) const; - std::string* _internal_add_keys(); - public: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); + public: // string cf = 3; - void clear_cf(); + void clear_cf() ; const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); + template + void set_cf(Arg_&& arg, Args_... args); std::string* mutable_cf(); PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); + void set_allocated_cf(std::string* value); + private: const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); std::string* _internal_mutable_cf(); - public: + public: // .kvrpcpb.Context context = 1; bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); + void clear_context() ; const ::kvrpcpb::Context& context() const; PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: const ::kvrpcpb::Context& _internal_context() const; ::kvrpcpb::Context* _internal_mutable_context(); + public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + // bool for_cas = 4; + void clear_for_cas() ; + bool for_cas() const; + void set_for_cas(bool value); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchGetRequest) + private: + bool _internal_for_cas() const; + void _internal_set_for_cas(bool value); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 1, + 35, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField keys_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr cf_; ::kvrpcpb::Context* context_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + bool for_cas_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawBatchGetResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchGetResponse) */ { +class RawDeleteRangeRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteRangeRequest) */ { public: - inline RawBatchGetResponse() : RawBatchGetResponse(nullptr) {} - ~RawBatchGetResponse() override; - explicit PROTOBUF_CONSTEXPR RawBatchGetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawDeleteRangeRequest() : RawDeleteRangeRequest(nullptr) {} + ~RawDeleteRangeRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawDeleteRangeRequest(::google::protobuf::internal::ConstantInitialized); - RawBatchGetResponse(const RawBatchGetResponse& from); - RawBatchGetResponse(RawBatchGetResponse&& from) noexcept - : RawBatchGetResponse() { + inline RawDeleteRangeRequest(const RawDeleteRangeRequest& from) + : RawDeleteRangeRequest(nullptr, from) {} + RawDeleteRangeRequest(RawDeleteRangeRequest&& from) noexcept + : RawDeleteRangeRequest() { *this = ::std::move(from); } - inline RawBatchGetResponse& operator=(const RawBatchGetResponse& from) { + inline RawDeleteRangeRequest& operator=(const RawDeleteRangeRequest& from) { CopyFrom(from); return *this; } - inline RawBatchGetResponse& operator=(RawBatchGetResponse&& from) noexcept { + inline RawDeleteRangeRequest& operator=(RawDeleteRangeRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1373,174 +1816,232 @@ class RawBatchGetResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawBatchGetResponse& default_instance() { + static const RawDeleteRangeRequest& default_instance() { return *internal_default_instance(); } - static inline const RawBatchGetResponse* internal_default_instance() { - return reinterpret_cast( - &_RawBatchGetResponse_default_instance_); + static inline const RawDeleteRangeRequest* internal_default_instance() { + return reinterpret_cast( + &_RawDeleteRangeRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 14; - friend void swap(RawBatchGetResponse& a, RawBatchGetResponse& b) { + friend void swap(RawDeleteRangeRequest& a, RawDeleteRangeRequest& b) { a.Swap(&b); } - inline void Swap(RawBatchGetResponse* other) { + inline void Swap(RawDeleteRangeRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawBatchGetResponse* other) { + void UnsafeArenaSwap(RawDeleteRangeRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawBatchGetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawDeleteRangeRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawBatchGetResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawBatchGetResponse& from) { - RawBatchGetResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawDeleteRangeRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawDeleteRangeRequest& from) { + RawDeleteRangeRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawBatchGetResponse* other); + void InternalSwap(RawDeleteRangeRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawBatchGetResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawDeleteRangeRequest"; } protected: - explicit RawBatchGetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawDeleteRangeRequest(::google::protobuf::Arena* arena); + RawDeleteRangeRequest(::google::protobuf::Arena* arena, const RawDeleteRangeRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kPairsFieldNumber = 2, - kRegionErrorFieldNumber = 1, + kStartKeyFieldNumber = 2, + kEndKeyFieldNumber = 3, + kCfFieldNumber = 4, + kContextFieldNumber = 1, }; - // repeated .kvrpcpb.KvPair pairs = 2; - int pairs_size() const; + // bytes start_key = 2; + void clear_start_key() ; + const std::string& start_key() const; + template + void set_start_key(Arg_&& arg, Args_... args); + std::string* mutable_start_key(); + PROTOBUF_NODISCARD std::string* release_start_key(); + void set_allocated_start_key(std::string* value); + private: - int _internal_pairs_size() const; + const std::string& _internal_start_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key( + const std::string& value); + std::string* _internal_mutable_start_key(); + public: - void clear_pairs(); - ::kvrpcpb::KvPair* mutable_pairs(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >* - mutable_pairs(); + // bytes end_key = 3; + void clear_end_key() ; + const std::string& end_key() const; + template + void set_end_key(Arg_&& arg, Args_... args); + std::string* mutable_end_key(); + PROTOBUF_NODISCARD std::string* release_end_key(); + void set_allocated_end_key(std::string* value); + private: - const ::kvrpcpb::KvPair& _internal_pairs(int index) const; - ::kvrpcpb::KvPair* _internal_add_pairs(); + const std::string& _internal_end_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key( + const std::string& value); + std::string* _internal_mutable_end_key(); + public: - const ::kvrpcpb::KvPair& pairs(int index) const; - ::kvrpcpb::KvPair* add_pairs(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >& - pairs() const; + // string cf = 4; + void clear_cf() ; + const std::string& cf() const; + template + void set_cf(Arg_&& arg, Args_... args); + std::string* mutable_cf(); + PROTOBUF_NODISCARD std::string* release_cf(); + void set_allocated_cf(std::string* value); - // .errorpb.Error region_error = 1; - bool has_region_error() const; private: - bool _internal_has_region_error() const; + const std::string& _internal_cf() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); + std::string* _internal_mutable_cf(); + public: - void clear_region_error(); - const ::errorpb::Error& region_error() const; - PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); - ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); + // .kvrpcpb.Context context = 1; + bool has_context() const; + void clear_context() ; + const ::kvrpcpb::Context& context() const; + PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); + ::kvrpcpb::Context* mutable_context(); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: - const ::errorpb::Error& _internal_region_error() const; - ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); + const ::kvrpcpb::Context& _internal_context() const; + ::kvrpcpb::Context* _internal_mutable_context(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchGetResponse) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteRangeRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 1, + 40, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair > pairs_; - ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr start_key_; + ::google::protobuf::internal::ArenaStringPtr end_key_; + ::google::protobuf::internal::ArenaStringPtr cf_; + ::kvrpcpb::Context* context_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawPutRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawPutRequest) */ { +class RawCoprocessorRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCoprocessorRequest) */ { public: - inline RawPutRequest() : RawPutRequest(nullptr) {} - ~RawPutRequest() override; - explicit PROTOBUF_CONSTEXPR RawPutRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawCoprocessorRequest() : RawCoprocessorRequest(nullptr) {} + ~RawCoprocessorRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawCoprocessorRequest(::google::protobuf::internal::ConstantInitialized); - RawPutRequest(const RawPutRequest& from); - RawPutRequest(RawPutRequest&& from) noexcept - : RawPutRequest() { + inline RawCoprocessorRequest(const RawCoprocessorRequest& from) + : RawCoprocessorRequest(nullptr, from) {} + RawCoprocessorRequest(RawCoprocessorRequest&& from) noexcept + : RawCoprocessorRequest() { *this = ::std::move(from); } - inline RawPutRequest& operator=(const RawPutRequest& from) { + inline RawCoprocessorRequest& operator=(const RawCoprocessorRequest& from) { CopyFrom(from); return *this; } - inline RawPutRequest& operator=(RawPutRequest&& from) noexcept { + inline RawCoprocessorRequest& operator=(RawCoprocessorRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1550,224 +2051,252 @@ class RawPutRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawPutRequest& default_instance() { + static const RawCoprocessorRequest& default_instance() { return *internal_default_instance(); } - static inline const RawPutRequest* internal_default_instance() { - return reinterpret_cast( - &_RawPutRequest_default_instance_); + static inline const RawCoprocessorRequest* internal_default_instance() { + return reinterpret_cast( + &_RawCoprocessorRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 21; - friend void swap(RawPutRequest& a, RawPutRequest& b) { + friend void swap(RawCoprocessorRequest& a, RawCoprocessorRequest& b) { a.Swap(&b); } - inline void Swap(RawPutRequest* other) { + inline void Swap(RawCoprocessorRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawPutRequest* other) { + void UnsafeArenaSwap(RawCoprocessorRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawPutRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawCoprocessorRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawPutRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawPutRequest& from) { - RawPutRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawCoprocessorRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawCoprocessorRequest& from) { + RawCoprocessorRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawPutRequest* other); + void InternalSwap(RawCoprocessorRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawPutRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawCoprocessorRequest"; } protected: - explicit RawPutRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawCoprocessorRequest(::google::protobuf::Arena* arena); + RawCoprocessorRequest(::google::protobuf::Arena* arena, const RawCoprocessorRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKeyFieldNumber = 2, - kValueFieldNumber = 3, - kCfFieldNumber = 4, + kRangesFieldNumber = 4, + kCoprNameFieldNumber = 2, + kCoprVersionReqFieldNumber = 3, + kDataFieldNumber = 5, kContextFieldNumber = 1, - kTtlFieldNumber = 5, - kForCasFieldNumber = 6, }; - // bytes key = 2; - void clear_key(); - const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_key(); - PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); + // repeated .kvrpcpb.KeyRange ranges = 4; + int ranges_size() const; private: - const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); - std::string* _internal_mutable_key(); + int _internal_ranges_size() const; + + public: + void clear_ranges() ; + ::kvrpcpb::KeyRange* mutable_ranges(int index); + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KeyRange >* + mutable_ranges(); + private: + const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KeyRange>& _internal_ranges() const; + ::google::protobuf::RepeatedPtrField<::kvrpcpb::KeyRange>* _internal_mutable_ranges(); public: + const ::kvrpcpb::KeyRange& ranges(int index) const; + ::kvrpcpb::KeyRange* add_ranges(); + const ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KeyRange >& + ranges() const; + // string copr_name = 2; + void clear_copr_name() ; + const std::string& copr_name() const; + template + void set_copr_name(Arg_&& arg, Args_... args); + std::string* mutable_copr_name(); + PROTOBUF_NODISCARD std::string* release_copr_name(); + void set_allocated_copr_name(std::string* value); - // bytes value = 3; - void clear_value(); - const std::string& value() const; - template - void set_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_value(); - PROTOBUF_NODISCARD std::string* release_value(); - void set_allocated_value(std::string* value); private: - const std::string& _internal_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); - std::string* _internal_mutable_value(); + const std::string& _internal_copr_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_copr_name( + const std::string& value); + std::string* _internal_mutable_copr_name(); + public: + // string copr_version_req = 3; + void clear_copr_version_req() ; + const std::string& copr_version_req() const; + template + void set_copr_version_req(Arg_&& arg, Args_... args); + std::string* mutable_copr_version_req(); + PROTOBUF_NODISCARD std::string* release_copr_version_req(); + void set_allocated_copr_version_req(std::string* value); - // string cf = 4; - void clear_cf(); - const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); - std::string* mutable_cf(); - PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); private: - const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); - std::string* _internal_mutable_cf(); + const std::string& _internal_copr_version_req() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_copr_version_req( + const std::string& value); + std::string* _internal_mutable_copr_version_req(); + public: + // bytes data = 5; + void clear_data() ; + const std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + std::string* mutable_data(); + PROTOBUF_NODISCARD std::string* release_data(); + void set_allocated_data(std::string* value); - // .kvrpcpb.Context context = 1; - bool has_context() const; private: - bool _internal_has_context() const; + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data( + const std::string& value); + std::string* _internal_mutable_data(); + public: - void clear_context(); + // .kvrpcpb.Context context = 1; + bool has_context() const; + void clear_context() ; const ::kvrpcpb::Context& context() const; PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: const ::kvrpcpb::Context& _internal_context() const; ::kvrpcpb::Context* _internal_mutable_context(); - public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); - // uint64 ttl = 5; - void clear_ttl(); - uint64_t ttl() const; - void set_ttl(uint64_t value); - private: - uint64_t _internal_ttl() const; - void _internal_set_ttl(uint64_t value); public: - - // bool for_cas = 6; - void clear_for_cas(); - bool for_cas() const; - void set_for_cas(bool value); - private: - bool _internal_for_cas() const; - void _internal_set_for_cas(bool value); - public: - - // @@protoc_insertion_point(class_scope:kvrpcpb.RawPutRequest) + // @@protoc_insertion_point(class_scope:kvrpcpb.RawCoprocessorRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 5, 2, + 63, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KeyRange > ranges_; + ::google::protobuf::internal::ArenaStringPtr copr_name_; + ::google::protobuf::internal::ArenaStringPtr copr_version_req_; + ::google::protobuf::internal::ArenaStringPtr data_; ::kvrpcpb::Context* context_; - uint64_t ttl_; - bool for_cas_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawPutResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawPutResponse) */ { +class RawCASRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCASRequest) */ { public: - inline RawPutResponse() : RawPutResponse(nullptr) {} - ~RawPutResponse() override; - explicit PROTOBUF_CONSTEXPR RawPutResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawCASRequest() : RawCASRequest(nullptr) {} + ~RawCASRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawCASRequest(::google::protobuf::internal::ConstantInitialized); - RawPutResponse(const RawPutResponse& from); - RawPutResponse(RawPutResponse&& from) noexcept - : RawPutResponse() { + inline RawCASRequest(const RawCASRequest& from) + : RawCASRequest(nullptr, from) {} + RawCASRequest(RawCASRequest&& from) noexcept + : RawCASRequest() { *this = ::std::move(from); } - inline RawPutResponse& operator=(const RawPutResponse& from) { + inline RawCASRequest& operator=(const RawCASRequest& from) { CopyFrom(from); return *this; } - inline RawPutResponse& operator=(RawPutResponse&& from) noexcept { + inline RawCASRequest& operator=(RawCASRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1777,385 +2306,286 @@ class RawPutResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawPutResponse& default_instance() { + static const RawCASRequest& default_instance() { return *internal_default_instance(); } - static inline const RawPutResponse* internal_default_instance() { - return reinterpret_cast( - &_RawPutResponse_default_instance_); + static inline const RawCASRequest* internal_default_instance() { + return reinterpret_cast( + &_RawCASRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 16; - friend void swap(RawPutResponse& a, RawPutResponse& b) { + friend void swap(RawCASRequest& a, RawCASRequest& b) { a.Swap(&b); } - inline void Swap(RawPutResponse* other) { + inline void Swap(RawCASRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawPutResponse* other) { + void UnsafeArenaSwap(RawCASRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawPutResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawCASRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawPutResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawPutResponse& from) { - RawPutResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawCASRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawCASRequest& from) { + RawCASRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawPutResponse* other); + void InternalSwap(RawCASRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawPutResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawCASRequest"; } protected: - explicit RawPutResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawCASRequest(::google::protobuf::Arena* arena); + RawCASRequest(::google::protobuf::Arena* arena, const RawCASRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kErrorFieldNumber = 2, - kRegionErrorFieldNumber = 1, + kKeyFieldNumber = 2, + kValueFieldNumber = 3, + kPreviousValueFieldNumber = 5, + kCfFieldNumber = 6, + kContextFieldNumber = 1, + kTtlFieldNumber = 7, + kPreviousNotExistFieldNumber = 4, + kDeleteFieldNumber = 8, }; - // string error = 2; - void clear_error(); - const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); - std::string* mutable_error(); - PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); - private: - const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); - std::string* _internal_mutable_error(); - public: + // bytes key = 2; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); - // .errorpb.Error region_error = 1; - bool has_region_error() const; - private: - bool _internal_has_region_error() const; - public: - void clear_region_error(); - const ::errorpb::Error& region_error() const; - PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); - ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); private: - const ::errorpb::Error& _internal_region_error() const; - ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); - - // @@protoc_insertion_point(class_scope:kvrpcpb.RawPutResponse) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; - ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- - -class RawBatchPutRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchPutRequest) */ { - public: - inline RawBatchPutRequest() : RawBatchPutRequest(nullptr) {} - ~RawBatchPutRequest() override; - explicit PROTOBUF_CONSTEXPR RawBatchPutRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - RawBatchPutRequest(const RawBatchPutRequest& from); - RawBatchPutRequest(RawBatchPutRequest&& from) noexcept - : RawBatchPutRequest() { - *this = ::std::move(from); - } - - inline RawBatchPutRequest& operator=(const RawBatchPutRequest& from) { - CopyFrom(from); - return *this; - } - inline RawBatchPutRequest& operator=(RawBatchPutRequest&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const RawBatchPutRequest& default_instance() { - return *internal_default_instance(); - } - static inline const RawBatchPutRequest* internal_default_instance() { - return reinterpret_cast( - &_RawBatchPutRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = - 8; - - friend void swap(RawBatchPutRequest& a, RawBatchPutRequest& b) { - a.Swap(&b); - } - inline void Swap(RawBatchPutRequest* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(RawBatchPutRequest* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); - RawBatchPutRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawBatchPutRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawBatchPutRequest& from) { - RawBatchPutRequest::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + // bytes value = 3; + void clear_value() ; + const std::string& value() const; + template + void set_value(Arg_&& arg, Args_... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawBatchPutRequest* other); + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value( + const std::string& value); + std::string* _internal_mutable_value(); - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawBatchPutRequest"; - } - protected: - explicit RawBatchPutRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); public: + // bytes previous_value = 5; + void clear_previous_value() ; + const std::string& previous_value() const; + template + void set_previous_value(Arg_&& arg, Args_... args); + std::string* mutable_previous_value(); + PROTOBUF_NODISCARD std::string* release_previous_value(); + void set_allocated_previous_value(std::string* value); - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kPairsFieldNumber = 2, - kCfFieldNumber = 3, - kContextFieldNumber = 1, - kTtlFieldNumber = 4, - kForCasFieldNumber = 5, - }; - // repeated .kvrpcpb.KvPair pairs = 2; - int pairs_size() const; private: - int _internal_pairs_size() const; - public: - void clear_pairs(); - ::kvrpcpb::KvPair* mutable_pairs(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >* - mutable_pairs(); - private: - const ::kvrpcpb::KvPair& _internal_pairs(int index) const; - ::kvrpcpb::KvPair* _internal_add_pairs(); - public: - const ::kvrpcpb::KvPair& pairs(int index) const; - ::kvrpcpb::KvPair* add_pairs(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >& - pairs() const; + const std::string& _internal_previous_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_previous_value( + const std::string& value); + std::string* _internal_mutable_previous_value(); - // string cf = 3; - void clear_cf(); + public: + // string cf = 6; + void clear_cf() ; const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); + template + void set_cf(Arg_&& arg, Args_... args); std::string* mutable_cf(); PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); + void set_allocated_cf(std::string* value); + private: const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); std::string* _internal_mutable_cf(); - public: + public: // .kvrpcpb.Context context = 1; bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); + void clear_context() ; const ::kvrpcpb::Context& context() const; PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: const ::kvrpcpb::Context& _internal_context() const; ::kvrpcpb::Context* _internal_mutable_context(); + public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + // uint64 ttl = 7; + void clear_ttl() ; + ::uint64_t ttl() const; + void set_ttl(::uint64_t value); - // uint64 ttl = 4; - void clear_ttl(); - uint64_t ttl() const; - void set_ttl(uint64_t value); private: - uint64_t _internal_ttl() const; - void _internal_set_ttl(uint64_t value); + ::uint64_t _internal_ttl() const; + void _internal_set_ttl(::uint64_t value); + public: + // bool previous_not_exist = 4; + void clear_previous_not_exist() ; + bool previous_not_exist() const; + void set_previous_not_exist(bool value); - // bool for_cas = 5; - void clear_for_cas(); - bool for_cas() const; - void set_for_cas(bool value); private: - bool _internal_for_cas() const; - void _internal_set_for_cas(bool value); + bool _internal_previous_not_exist() const; + void _internal_set_previous_not_exist(bool value); + public: + // bool delete = 8; + void clear_delete_() ; + bool delete_() const; + void set_delete_(bool value); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchPutRequest) + private: + bool _internal_delete_() const; + void _internal_set_delete_(bool value); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawCASRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 8, 1, + 40, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair > pairs_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr value_; + ::google::protobuf::internal::ArenaStringPtr previous_value_; + ::google::protobuf::internal::ArenaStringPtr cf_; ::kvrpcpb::Context* context_; - uint64_t ttl_; - bool for_cas_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::uint64_t ttl_; + bool previous_not_exist_; + bool delete__; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawBatchPutResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchPutResponse) */ { +class RawBatchGetRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchGetRequest) */ { public: - inline RawBatchPutResponse() : RawBatchPutResponse(nullptr) {} - ~RawBatchPutResponse() override; - explicit PROTOBUF_CONSTEXPR RawBatchPutResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawBatchGetRequest() : RawBatchGetRequest(nullptr) {} + ~RawBatchGetRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawBatchGetRequest(::google::protobuf::internal::ConstantInitialized); - RawBatchPutResponse(const RawBatchPutResponse& from); - RawBatchPutResponse(RawBatchPutResponse&& from) noexcept - : RawBatchPutResponse() { + inline RawBatchGetRequest(const RawBatchGetRequest& from) + : RawBatchGetRequest(nullptr, from) {} + RawBatchGetRequest(RawBatchGetRequest&& from) noexcept + : RawBatchGetRequest() { *this = ::std::move(from); } - inline RawBatchPutResponse& operator=(const RawBatchPutResponse& from) { + inline RawBatchGetRequest& operator=(const RawBatchGetRequest& from) { CopyFrom(from); return *this; } - inline RawBatchPutResponse& operator=(RawBatchPutResponse&& from) noexcept { + inline RawBatchGetRequest& operator=(RawBatchGetRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -2165,170 +2595,226 @@ class RawBatchPutResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawBatchPutResponse& default_instance() { + static const RawBatchGetRequest& default_instance() { return *internal_default_instance(); } - static inline const RawBatchPutResponse* internal_default_instance() { - return reinterpret_cast( - &_RawBatchPutResponse_default_instance_); + static inline const RawBatchGetRequest* internal_default_instance() { + return reinterpret_cast( + &_RawBatchGetRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 4; - friend void swap(RawBatchPutResponse& a, RawBatchPutResponse& b) { + friend void swap(RawBatchGetRequest& a, RawBatchGetRequest& b) { a.Swap(&b); } - inline void Swap(RawBatchPutResponse* other) { + inline void Swap(RawBatchGetRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawBatchPutResponse* other) { + void UnsafeArenaSwap(RawBatchGetRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawBatchPutResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawBatchGetRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawBatchPutResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawBatchPutResponse& from) { - RawBatchPutResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawBatchGetRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawBatchGetRequest& from) { + RawBatchGetRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawBatchPutResponse* other); + void InternalSwap(RawBatchGetRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawBatchPutResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawBatchGetRequest"; } protected: - explicit RawBatchPutResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawBatchGetRequest(::google::protobuf::Arena* arena); + RawBatchGetRequest(::google::protobuf::Arena* arena, const RawBatchGetRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kErrorFieldNumber = 2, - kRegionErrorFieldNumber = 1, + kKeysFieldNumber = 2, + kCfFieldNumber = 3, + kContextFieldNumber = 1, }; - // string error = 2; - void clear_error(); - const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); - std::string* mutable_error(); - PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); + // repeated bytes keys = 2; + int keys_size() const; private: - const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); - std::string* _internal_mutable_error(); + int _internal_keys_size() const; + public: + void clear_keys() ; + const std::string& keys(int index) const; + std::string* mutable_keys(int index); + void set_keys(int index, const std::string& value); + void set_keys(int index, std::string&& value); + void set_keys(int index, const char* value); + void set_keys(int index, const void* value, std::size_t size); + void set_keys(int index, absl::string_view value); + std::string* add_keys(); + void add_keys(const std::string& value); + void add_keys(std::string&& value); + void add_keys(const char* value); + void add_keys(const void* value, std::size_t size); + void add_keys(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& keys() const; + ::google::protobuf::RepeatedPtrField* mutable_keys(); - // .errorpb.Error region_error = 1; - bool has_region_error() const; private: - bool _internal_has_region_error() const; + const ::google::protobuf::RepeatedPtrField& _internal_keys() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_keys(); + public: - void clear_region_error(); - const ::errorpb::Error& region_error() const; - PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); - ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); + // string cf = 3; + void clear_cf() ; + const std::string& cf() const; + template + void set_cf(Arg_&& arg, Args_... args); + std::string* mutable_cf(); + PROTOBUF_NODISCARD std::string* release_cf(); + void set_allocated_cf(std::string* value); + private: - const ::errorpb::Error& _internal_region_error() const; - ::errorpb::Error* _internal_mutable_region_error(); + const std::string& _internal_cf() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); + std::string* _internal_mutable_cf(); + public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); + // .kvrpcpb.Context context = 1; + bool has_context() const; + void clear_context() ; + const ::kvrpcpb::Context& context() const; + PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); + ::kvrpcpb::Context* mutable_context(); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchPutResponse) + private: + const ::kvrpcpb::Context& _internal_context() const; + ::kvrpcpb::Context* _internal_mutable_context(); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchGetRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 3, 1, + 37, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; - ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField keys_; + ::google::protobuf::internal::ArenaStringPtr cf_; + ::kvrpcpb::Context* context_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawDeleteRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteRequest) */ { +class RawBatchDeleteRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchDeleteRequest) */ { public: - inline RawDeleteRequest() : RawDeleteRequest(nullptr) {} - ~RawDeleteRequest() override; - explicit PROTOBUF_CONSTEXPR RawDeleteRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawBatchDeleteRequest() : RawBatchDeleteRequest(nullptr) {} + ~RawBatchDeleteRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawBatchDeleteRequest(::google::protobuf::internal::ConstantInitialized); - RawDeleteRequest(const RawDeleteRequest& from); - RawDeleteRequest(RawDeleteRequest&& from) noexcept - : RawDeleteRequest() { + inline RawBatchDeleteRequest(const RawBatchDeleteRequest& from) + : RawBatchDeleteRequest(nullptr, from) {} + RawBatchDeleteRequest(RawBatchDeleteRequest&& from) noexcept + : RawBatchDeleteRequest() { *this = ::std::move(from); } - inline RawDeleteRequest& operator=(const RawDeleteRequest& from) { + inline RawBatchDeleteRequest& operator=(const RawBatchDeleteRequest& from) { CopyFrom(from); return *this; } - inline RawDeleteRequest& operator=(RawDeleteRequest&& from) noexcept { + inline RawBatchDeleteRequest& operator=(RawBatchDeleteRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -2338,197 +2824,226 @@ class RawDeleteRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawDeleteRequest& default_instance() { + static const RawBatchDeleteRequest& default_instance() { return *internal_default_instance(); } - static inline const RawDeleteRequest* internal_default_instance() { - return reinterpret_cast( - &_RawDeleteRequest_default_instance_); + static inline const RawBatchDeleteRequest* internal_default_instance() { + return reinterpret_cast( + &_RawBatchDeleteRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 12; - friend void swap(RawDeleteRequest& a, RawDeleteRequest& b) { + friend void swap(RawBatchDeleteRequest& a, RawBatchDeleteRequest& b) { a.Swap(&b); } - inline void Swap(RawDeleteRequest* other) { + inline void Swap(RawBatchDeleteRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawDeleteRequest* other) { + void UnsafeArenaSwap(RawBatchDeleteRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawDeleteRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawBatchDeleteRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawDeleteRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawDeleteRequest& from) { - RawDeleteRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawBatchDeleteRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawBatchDeleteRequest& from) { + RawBatchDeleteRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawDeleteRequest* other); + void InternalSwap(RawBatchDeleteRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawDeleteRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawBatchDeleteRequest"; } protected: - explicit RawDeleteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawBatchDeleteRequest(::google::protobuf::Arena* arena); + RawBatchDeleteRequest(::google::protobuf::Arena* arena, const RawBatchDeleteRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKeyFieldNumber = 2, + kKeysFieldNumber = 2, kCfFieldNumber = 3, kContextFieldNumber = 1, - kForCasFieldNumber = 4, }; - // bytes key = 2; - void clear_key(); - const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_key(); - PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); + // repeated bytes keys = 2; + int keys_size() const; private: - const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); - std::string* _internal_mutable_key(); + int _internal_keys_size() const; + public: + void clear_keys() ; + const std::string& keys(int index) const; + std::string* mutable_keys(int index); + void set_keys(int index, const std::string& value); + void set_keys(int index, std::string&& value); + void set_keys(int index, const char* value); + void set_keys(int index, const void* value, std::size_t size); + void set_keys(int index, absl::string_view value); + std::string* add_keys(); + void add_keys(const std::string& value); + void add_keys(std::string&& value); + void add_keys(const char* value); + void add_keys(const void* value, std::size_t size); + void add_keys(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& keys() const; + ::google::protobuf::RepeatedPtrField* mutable_keys(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_keys() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_keys(); + public: // string cf = 3; - void clear_cf(); + void clear_cf() ; const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); + template + void set_cf(Arg_&& arg, Args_... args); std::string* mutable_cf(); PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); + void set_allocated_cf(std::string* value); + private: const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); std::string* _internal_mutable_cf(); - public: + public: // .kvrpcpb.Context context = 1; bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); + void clear_context() ; const ::kvrpcpb::Context& context() const; PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: const ::kvrpcpb::Context& _internal_context() const; ::kvrpcpb::Context* _internal_mutable_context(); - public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); - // bool for_cas = 4; - void clear_for_cas(); - bool for_cas() const; - void set_for_cas(bool value); - private: - bool _internal_for_cas() const; - void _internal_set_for_cas(bool value); public: - - // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteRequest) + // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchDeleteRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 3, 1, + 40, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField keys_; + ::google::protobuf::internal::ArenaStringPtr cf_; ::kvrpcpb::Context* context_; - bool for_cas_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawDeleteResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteResponse) */ { +class RawPutResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawPutResponse) */ { public: - inline RawDeleteResponse() : RawDeleteResponse(nullptr) {} - ~RawDeleteResponse() override; - explicit PROTOBUF_CONSTEXPR RawDeleteResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawPutResponse() : RawPutResponse(nullptr) {} + ~RawPutResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawPutResponse(::google::protobuf::internal::ConstantInitialized); - RawDeleteResponse(const RawDeleteResponse& from); - RawDeleteResponse(RawDeleteResponse&& from) noexcept - : RawDeleteResponse() { + inline RawPutResponse(const RawPutResponse& from) + : RawPutResponse(nullptr, from) {} + RawPutResponse(RawPutResponse&& from) noexcept + : RawPutResponse() { *this = ::std::move(from); } - inline RawDeleteResponse& operator=(const RawDeleteResponse& from) { + inline RawPutResponse& operator=(const RawPutResponse& from) { CopyFrom(from); return *this; } - inline RawDeleteResponse& operator=(RawDeleteResponse&& from) noexcept { + inline RawPutResponse& operator=(RawPutResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -2538,90 +3053,99 @@ class RawDeleteResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawDeleteResponse& default_instance() { + static const RawPutResponse& default_instance() { return *internal_default_instance(); } - static inline const RawDeleteResponse* internal_default_instance() { - return reinterpret_cast( - &_RawDeleteResponse_default_instance_); + static inline const RawPutResponse* internal_default_instance() { + return reinterpret_cast( + &_RawPutResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 7; - friend void swap(RawDeleteResponse& a, RawDeleteResponse& b) { + friend void swap(RawPutResponse& a, RawPutResponse& b) { a.Swap(&b); } - inline void Swap(RawDeleteResponse* other) { + inline void Swap(RawPutResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawDeleteResponse* other) { + void UnsafeArenaSwap(RawPutResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawDeleteResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawPutResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawDeleteResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawDeleteResponse& from) { - RawDeleteResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawPutResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawPutResponse& from) { + RawPutResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawDeleteResponse* other); + void InternalSwap(RawPutResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawDeleteResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawPutResponse"; } protected: - explicit RawDeleteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawPutResponse(::google::protobuf::Arena* arena); + RawPutResponse(::google::protobuf::Arena* arena, const RawPutResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -2632,76 +3156,93 @@ class RawDeleteResponse final : kRegionErrorFieldNumber = 1, }; // string error = 2; - void clear_error(); + void clear_error() ; const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); + template + void set_error(Arg_&& arg, Args_... args); std::string* mutable_error(); PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); + void set_allocated_error(std::string* value); + private: const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); std::string* _internal_mutable_error(); - public: + public: // .errorpb.Error region_error = 1; bool has_region_error() const; - private: - bool _internal_has_region_error() const; - public: - void clear_region_error(); + void clear_region_error() ; const ::errorpb::Error& region_error() const; PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); + private: const ::errorpb::Error& _internal_region_error() const; ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteResponse) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawPutResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 36, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawBatchDeleteRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchDeleteRequest) */ { +class RawGetResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawGetResponse) */ { public: - inline RawBatchDeleteRequest() : RawBatchDeleteRequest(nullptr) {} - ~RawBatchDeleteRequest() override; - explicit PROTOBUF_CONSTEXPR RawBatchDeleteRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawGetResponse() : RawGetResponse(nullptr) {} + ~RawGetResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawGetResponse(::google::protobuf::internal::ConstantInitialized); - RawBatchDeleteRequest(const RawBatchDeleteRequest& from); - RawBatchDeleteRequest(RawBatchDeleteRequest&& from) noexcept - : RawBatchDeleteRequest() { + inline RawGetResponse(const RawGetResponse& from) + : RawGetResponse(nullptr, from) {} + RawGetResponse(RawGetResponse&& from) noexcept + : RawGetResponse() { *this = ::std::move(from); } - inline RawBatchDeleteRequest& operator=(const RawBatchDeleteRequest& from) { + inline RawGetResponse& operator=(const RawGetResponse& from) { CopyFrom(from); return *this; } - inline RawBatchDeleteRequest& operator=(RawBatchDeleteRequest&& from) noexcept { + inline RawGetResponse& operator=(RawGetResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -2711,196 +3252,226 @@ class RawBatchDeleteRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawBatchDeleteRequest& default_instance() { + static const RawGetResponse& default_instance() { return *internal_default_instance(); } - static inline const RawBatchDeleteRequest* internal_default_instance() { - return reinterpret_cast( - &_RawBatchDeleteRequest_default_instance_); + static inline const RawGetResponse* internal_default_instance() { + return reinterpret_cast( + &_RawGetResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 3; - friend void swap(RawBatchDeleteRequest& a, RawBatchDeleteRequest& b) { + friend void swap(RawGetResponse& a, RawGetResponse& b) { a.Swap(&b); } - inline void Swap(RawBatchDeleteRequest* other) { + inline void Swap(RawGetResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawBatchDeleteRequest* other) { + void UnsafeArenaSwap(RawGetResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawBatchDeleteRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawGetResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawBatchDeleteRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawBatchDeleteRequest& from) { - RawBatchDeleteRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawGetResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawGetResponse& from) { + RawGetResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawBatchDeleteRequest* other); + void InternalSwap(RawGetResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawBatchDeleteRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawGetResponse"; } protected: - explicit RawBatchDeleteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawGetResponse(::google::protobuf::Arena* arena); + RawGetResponse(::google::protobuf::Arena* arena, const RawGetResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kErrorFieldNumber = 2, + kValueFieldNumber = 3, + kRegionErrorFieldNumber = 1, + kNotFoundFieldNumber = 4, + }; + // string error = 2; + void clear_error() ; + const std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + std::string* mutable_error(); + PROTOBUF_NODISCARD std::string* release_error(); + void set_allocated_error(std::string* value); - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kKeysFieldNumber = 2, - kCfFieldNumber = 3, - kContextFieldNumber = 1, - }; - // repeated bytes keys = 2; - int keys_size() const; - private: - int _internal_keys_size() const; - public: - void clear_keys(); - const std::string& keys(int index) const; - std::string* mutable_keys(int index); - void set_keys(int index, const std::string& value); - void set_keys(int index, std::string&& value); - void set_keys(int index, const char* value); - void set_keys(int index, const void* value, size_t size); - std::string* add_keys(); - void add_keys(const std::string& value); - void add_keys(std::string&& value); - void add_keys(const char* value); - void add_keys(const void* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& keys() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_keys(); private: - const std::string& _internal_keys(int index) const; - std::string* _internal_add_keys(); + const std::string& _internal_error() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); + std::string* _internal_mutable_error(); + public: + // bytes value = 3; + void clear_value() ; + const std::string& value() const; + template + void set_value(Arg_&& arg, Args_... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); - // string cf = 3; - void clear_cf(); - const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); - std::string* mutable_cf(); - PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); private: - const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); - std::string* _internal_mutable_cf(); + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value( + const std::string& value); + std::string* _internal_mutable_value(); + public: + // .errorpb.Error region_error = 1; + bool has_region_error() const; + void clear_region_error() ; + const ::errorpb::Error& region_error() const; + PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); + ::errorpb::Error* mutable_region_error(); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); - // .kvrpcpb.Context context = 1; - bool has_context() const; private: - bool _internal_has_context() const; + const ::errorpb::Error& _internal_region_error() const; + ::errorpb::Error* _internal_mutable_region_error(); + public: - void clear_context(); - const ::kvrpcpb::Context& context() const; - PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); - ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); + // bool not_found = 4; + void clear_not_found() ; + bool not_found() const; + void set_not_found(bool value); + private: - const ::kvrpcpb::Context& _internal_context() const; - ::kvrpcpb::Context* _internal_mutable_context(); - public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + bool _internal_not_found() const; + void _internal_set_not_found(bool value); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchDeleteRequest) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawGetResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 1, + 36, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField keys_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; - ::kvrpcpb::Context* context_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::google::protobuf::internal::ArenaStringPtr value_; + ::errorpb::Error* region_error_; + bool not_found_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawBatchDeleteResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchDeleteResponse) */ { +class RawDeleteResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteResponse) */ { public: - inline RawBatchDeleteResponse() : RawBatchDeleteResponse(nullptr) {} - ~RawBatchDeleteResponse() override; - explicit PROTOBUF_CONSTEXPR RawBatchDeleteResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawDeleteResponse() : RawDeleteResponse(nullptr) {} + ~RawDeleteResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawDeleteResponse(::google::protobuf::internal::ConstantInitialized); - RawBatchDeleteResponse(const RawBatchDeleteResponse& from); - RawBatchDeleteResponse(RawBatchDeleteResponse&& from) noexcept - : RawBatchDeleteResponse() { + inline RawDeleteResponse(const RawDeleteResponse& from) + : RawDeleteResponse(nullptr, from) {} + RawDeleteResponse(RawDeleteResponse&& from) noexcept + : RawDeleteResponse() { *this = ::std::move(from); } - inline RawBatchDeleteResponse& operator=(const RawBatchDeleteResponse& from) { + inline RawDeleteResponse& operator=(const RawDeleteResponse& from) { CopyFrom(from); return *this; } - inline RawBatchDeleteResponse& operator=(RawBatchDeleteResponse&& from) noexcept { + inline RawDeleteResponse& operator=(RawDeleteResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -2910,90 +3481,99 @@ class RawBatchDeleteResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawBatchDeleteResponse& default_instance() { + static const RawDeleteResponse& default_instance() { return *internal_default_instance(); } - static inline const RawBatchDeleteResponse* internal_default_instance() { - return reinterpret_cast( - &_RawBatchDeleteResponse_default_instance_); + static inline const RawDeleteResponse* internal_default_instance() { + return reinterpret_cast( + &_RawDeleteResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 13; + 11; - friend void swap(RawBatchDeleteResponse& a, RawBatchDeleteResponse& b) { + friend void swap(RawDeleteResponse& a, RawDeleteResponse& b) { a.Swap(&b); } - inline void Swap(RawBatchDeleteResponse* other) { + inline void Swap(RawDeleteResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawBatchDeleteResponse* other) { + void UnsafeArenaSwap(RawDeleteResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawBatchDeleteResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawDeleteResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawBatchDeleteResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawBatchDeleteResponse& from) { - RawBatchDeleteResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawDeleteResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawDeleteResponse& from) { + RawDeleteResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawBatchDeleteResponse* other); + void InternalSwap(RawDeleteResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawBatchDeleteResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawDeleteResponse"; } protected: - explicit RawBatchDeleteResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawDeleteResponse(::google::protobuf::Arena* arena); + RawDeleteResponse(::google::protobuf::Arena* arena, const RawDeleteResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -3004,76 +3584,93 @@ class RawBatchDeleteResponse final : kRegionErrorFieldNumber = 1, }; // string error = 2; - void clear_error(); + void clear_error() ; const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); + template + void set_error(Arg_&& arg, Args_... args); std::string* mutable_error(); PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); + void set_allocated_error(std::string* value); + private: const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); std::string* _internal_mutable_error(); - public: + public: // .errorpb.Error region_error = 1; bool has_region_error() const; - private: - bool _internal_has_region_error() const; - public: - void clear_region_error(); + void clear_region_error() ; const ::errorpb::Error& region_error() const; PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); + private: const ::errorpb::Error& _internal_region_error() const; ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchDeleteResponse) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 39, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawDeleteRangeRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteRangeRequest) */ { +class RawDeleteRangeResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteRangeResponse) */ { public: - inline RawDeleteRangeRequest() : RawDeleteRangeRequest(nullptr) {} - ~RawDeleteRangeRequest() override; - explicit PROTOBUF_CONSTEXPR RawDeleteRangeRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawDeleteRangeResponse() : RawDeleteRangeResponse(nullptr) {} + ~RawDeleteRangeResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawDeleteRangeResponse(::google::protobuf::internal::ConstantInitialized); - RawDeleteRangeRequest(const RawDeleteRangeRequest& from); - RawDeleteRangeRequest(RawDeleteRangeRequest&& from) noexcept - : RawDeleteRangeRequest() { + inline RawDeleteRangeResponse(const RawDeleteRangeResponse& from) + : RawDeleteRangeResponse(nullptr, from) {} + RawDeleteRangeResponse(RawDeleteRangeResponse&& from) noexcept + : RawDeleteRangeResponse() { *this = ::std::move(from); } - inline RawDeleteRangeRequest& operator=(const RawDeleteRangeRequest& from) { + inline RawDeleteRangeResponse& operator=(const RawDeleteRangeResponse& from) { CopyFrom(from); return *this; } - inline RawDeleteRangeRequest& operator=(RawDeleteRangeRequest&& from) noexcept { + inline RawDeleteRangeResponse& operator=(RawDeleteRangeResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -3083,202 +3680,196 @@ class RawDeleteRangeRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawDeleteRangeRequest& default_instance() { + static const RawDeleteRangeResponse& default_instance() { return *internal_default_instance(); } - static inline const RawDeleteRangeRequest* internal_default_instance() { - return reinterpret_cast( - &_RawDeleteRangeRequest_default_instance_); + static inline const RawDeleteRangeResponse* internal_default_instance() { + return reinterpret_cast( + &_RawDeleteRangeResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 14; + 15; - friend void swap(RawDeleteRangeRequest& a, RawDeleteRangeRequest& b) { + friend void swap(RawDeleteRangeResponse& a, RawDeleteRangeResponse& b) { a.Swap(&b); } - inline void Swap(RawDeleteRangeRequest* other) { + inline void Swap(RawDeleteRangeResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawDeleteRangeRequest* other) { + void UnsafeArenaSwap(RawDeleteRangeResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawDeleteRangeRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawDeleteRangeResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawDeleteRangeRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawDeleteRangeRequest& from) { - RawDeleteRangeRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawDeleteRangeResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawDeleteRangeResponse& from) { + RawDeleteRangeResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawDeleteRangeRequest* other); + void InternalSwap(RawDeleteRangeResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawDeleteRangeRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawDeleteRangeResponse"; } protected: - explicit RawDeleteRangeRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawDeleteRangeResponse(::google::protobuf::Arena* arena); + RawDeleteRangeResponse(::google::protobuf::Arena* arena, const RawDeleteRangeResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kStartKeyFieldNumber = 2, - kEndKeyFieldNumber = 3, - kCfFieldNumber = 4, - kContextFieldNumber = 1, + kErrorFieldNumber = 2, + kRegionErrorFieldNumber = 1, }; - // bytes start_key = 2; - void clear_start_key(); - const std::string& start_key() const; - template - void set_start_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_start_key(); - PROTOBUF_NODISCARD std::string* release_start_key(); - void set_allocated_start_key(std::string* start_key); - private: - const std::string& _internal_start_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key(const std::string& value); - std::string* _internal_mutable_start_key(); - public: + // string error = 2; + void clear_error() ; + const std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + std::string* mutable_error(); + PROTOBUF_NODISCARD std::string* release_error(); + void set_allocated_error(std::string* value); - // bytes end_key = 3; - void clear_end_key(); - const std::string& end_key() const; - template - void set_end_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_end_key(); - PROTOBUF_NODISCARD std::string* release_end_key(); - void set_allocated_end_key(std::string* end_key); private: - const std::string& _internal_end_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key(const std::string& value); - std::string* _internal_mutable_end_key(); - public: + const std::string& _internal_error() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); + std::string* _internal_mutable_error(); - // string cf = 4; - void clear_cf(); - const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); - std::string* mutable_cf(); - PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); - private: - const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); - std::string* _internal_mutable_cf(); public: + // .errorpb.Error region_error = 1; + bool has_region_error() const; + void clear_region_error() ; + const ::errorpb::Error& region_error() const; + PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); + ::errorpb::Error* mutable_region_error(); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); - // .kvrpcpb.Context context = 1; - bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); - const ::kvrpcpb::Context& context() const; - PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); - ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); private: - const ::kvrpcpb::Context& _internal_context() const; - ::kvrpcpb::Context* _internal_mutable_context(); - public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + const ::errorpb::Error& _internal_region_error() const; + ::errorpb::Error* _internal_mutable_region_error(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteRangeRequest) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteRangeResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 44, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; - ::kvrpcpb::Context* context_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::errorpb::Error* region_error_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawDeleteRangeResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawDeleteRangeResponse) */ { +class RawCoprocessorResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCoprocessorResponse) */ { public: - inline RawDeleteRangeResponse() : RawDeleteRangeResponse(nullptr) {} - ~RawDeleteRangeResponse() override; - explicit PROTOBUF_CONSTEXPR RawDeleteRangeResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawCoprocessorResponse() : RawCoprocessorResponse(nullptr) {} + ~RawCoprocessorResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawCoprocessorResponse(::google::protobuf::internal::ConstantInitialized); - RawDeleteRangeResponse(const RawDeleteRangeResponse& from); - RawDeleteRangeResponse(RawDeleteRangeResponse&& from) noexcept - : RawDeleteRangeResponse() { + inline RawCoprocessorResponse(const RawCoprocessorResponse& from) + : RawCoprocessorResponse(nullptr, from) {} + RawCoprocessorResponse(RawCoprocessorResponse&& from) noexcept + : RawCoprocessorResponse() { *this = ::std::move(from); } - inline RawDeleteRangeResponse& operator=(const RawDeleteRangeResponse& from) { + inline RawCoprocessorResponse& operator=(const RawCoprocessorResponse& from) { CopyFrom(from); return *this; } - inline RawDeleteRangeResponse& operator=(RawDeleteRangeResponse&& from) noexcept { + inline RawCoprocessorResponse& operator=(RawCoprocessorResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -3288,90 +3879,99 @@ class RawDeleteRangeResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawDeleteRangeResponse& default_instance() { + static const RawCoprocessorResponse& default_instance() { return *internal_default_instance(); } - static inline const RawDeleteRangeResponse* internal_default_instance() { - return reinterpret_cast( - &_RawDeleteRangeResponse_default_instance_); + static inline const RawCoprocessorResponse* internal_default_instance() { + return reinterpret_cast( + &_RawCoprocessorResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 15; + 22; - friend void swap(RawDeleteRangeResponse& a, RawDeleteRangeResponse& b) { + friend void swap(RawCoprocessorResponse& a, RawCoprocessorResponse& b) { a.Swap(&b); } - inline void Swap(RawDeleteRangeResponse* other) { + inline void Swap(RawCoprocessorResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawDeleteRangeResponse* other) { + void UnsafeArenaSwap(RawCoprocessorResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawDeleteRangeResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawCoprocessorResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawDeleteRangeResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawDeleteRangeResponse& from) { - RawDeleteRangeResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawCoprocessorResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawCoprocessorResponse& from) { + RawCoprocessorResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawDeleteRangeResponse* other); + void InternalSwap(RawCoprocessorResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawDeleteRangeResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawCoprocessorResponse"; } protected: - explicit RawDeleteRangeResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawCoprocessorResponse(::google::protobuf::Arena* arena); + RawCoprocessorResponse(::google::protobuf::Arena* arena, const RawCoprocessorResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -3379,79 +3979,114 @@ class RawDeleteRangeResponse final : enum : int { kErrorFieldNumber = 2, + kDataFieldNumber = 3, kRegionErrorFieldNumber = 1, }; // string error = 2; - void clear_error(); + void clear_error() ; const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); + template + void set_error(Arg_&& arg, Args_... args); std::string* mutable_error(); PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); + void set_allocated_error(std::string* value); + private: const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); std::string* _internal_mutable_error(); + public: + // bytes data = 3; + void clear_data() ; + const std::string& data() const; + template + void set_data(Arg_&& arg, Args_... args); + std::string* mutable_data(); + PROTOBUF_NODISCARD std::string* release_data(); + void set_allocated_data(std::string* value); - // .errorpb.Error region_error = 1; - bool has_region_error() const; private: - bool _internal_has_region_error() const; + const std::string& _internal_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data( + const std::string& value); + std::string* _internal_mutable_data(); + public: - void clear_region_error(); + // .errorpb.Error region_error = 1; + bool has_region_error() const; + void clear_region_error() ; const ::errorpb::Error& region_error() const; PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); + private: const ::errorpb::Error& _internal_region_error() const; ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawDeleteRangeResponse) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawCoprocessorResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 3, 1, + 44, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::google::protobuf::internal::ArenaStringPtr data_; ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawCASRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCASRequest) */ { +class RawCASResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCASResponse) */ { public: - inline RawCASRequest() : RawCASRequest(nullptr) {} - ~RawCASRequest() override; - explicit PROTOBUF_CONSTEXPR RawCASRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawCASResponse() : RawCASResponse(nullptr) {} + ~RawCASResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawCASResponse(::google::protobuf::internal::ConstantInitialized); - RawCASRequest(const RawCASRequest& from); - RawCASRequest(RawCASRequest&& from) noexcept - : RawCASRequest() { + inline RawCASResponse(const RawCASResponse& from) + : RawCASResponse(nullptr, from) {} + RawCASResponse(RawCASResponse&& from) noexcept + : RawCASResponse() { *this = ::std::move(from); } - inline RawCASRequest& operator=(const RawCASRequest& from) { + inline RawCASResponse& operator=(const RawCASResponse& from) { CopyFrom(from); return *this; } - inline RawCASRequest& operator=(RawCASRequest&& from) noexcept { + inline RawCASResponse& operator=(RawCASResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -3461,251 +4096,238 @@ class RawCASRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawCASRequest& default_instance() { + static const RawCASResponse& default_instance() { return *internal_default_instance(); } - static inline const RawCASRequest* internal_default_instance() { - return reinterpret_cast( - &_RawCASRequest_default_instance_); + static inline const RawCASResponse* internal_default_instance() { + return reinterpret_cast( + &_RawCASResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 16; + 17; - friend void swap(RawCASRequest& a, RawCASRequest& b) { + friend void swap(RawCASResponse& a, RawCASResponse& b) { a.Swap(&b); } - inline void Swap(RawCASRequest* other) { + inline void Swap(RawCASResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawCASRequest* other) { + void UnsafeArenaSwap(RawCASResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawCASRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawCASResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawCASRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawCASRequest& from) { - RawCASRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawCASResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawCASResponse& from) { + RawCASResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawCASRequest* other); + void InternalSwap(RawCASResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawCASRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawCASResponse"; } protected: - explicit RawCASRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawCASResponse(::google::protobuf::Arena* arena); + RawCASResponse(::google::protobuf::Arena* arena, const RawCASResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKeyFieldNumber = 2, - kValueFieldNumber = 3, + kErrorFieldNumber = 2, kPreviousValueFieldNumber = 5, - kCfFieldNumber = 6, - kContextFieldNumber = 1, - kTtlFieldNumber = 7, + kRegionErrorFieldNumber = 1, + kSucceedFieldNumber = 3, kPreviousNotExistFieldNumber = 4, - kDeleteFieldNumber = 8, }; - // bytes key = 2; - void clear_key(); - const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_key(); - PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); - private: - const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); - std::string* _internal_mutable_key(); - public: + // string error = 2; + void clear_error() ; + const std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + std::string* mutable_error(); + PROTOBUF_NODISCARD std::string* release_error(); + void set_allocated_error(std::string* value); - // bytes value = 3; - void clear_value(); - const std::string& value() const; - template - void set_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_value(); - PROTOBUF_NODISCARD std::string* release_value(); - void set_allocated_value(std::string* value); private: - const std::string& _internal_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); - std::string* _internal_mutable_value(); - public: + const std::string& _internal_error() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); + std::string* _internal_mutable_error(); + public: // bytes previous_value = 5; - void clear_previous_value(); + void clear_previous_value() ; const std::string& previous_value() const; - template - void set_previous_value(ArgT0&& arg0, ArgT... args); + template + void set_previous_value(Arg_&& arg, Args_... args); std::string* mutable_previous_value(); PROTOBUF_NODISCARD std::string* release_previous_value(); - void set_allocated_previous_value(std::string* previous_value); + void set_allocated_previous_value(std::string* value); + private: const std::string& _internal_previous_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_previous_value(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_previous_value( + const std::string& value); std::string* _internal_mutable_previous_value(); - public: - // string cf = 6; - void clear_cf(); - const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); - std::string* mutable_cf(); - PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); - private: - const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); - std::string* _internal_mutable_cf(); public: + // .errorpb.Error region_error = 1; + bool has_region_error() const; + void clear_region_error() ; + const ::errorpb::Error& region_error() const; + PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); + ::errorpb::Error* mutable_region_error(); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); - // .kvrpcpb.Context context = 1; - bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); - const ::kvrpcpb::Context& context() const; - PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); - ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); private: - const ::kvrpcpb::Context& _internal_context() const; - ::kvrpcpb::Context* _internal_mutable_context(); + const ::errorpb::Error& _internal_region_error() const; + ::errorpb::Error* _internal_mutable_region_error(); + public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + // bool succeed = 3; + void clear_succeed() ; + bool succeed() const; + void set_succeed(bool value); - // uint64 ttl = 7; - void clear_ttl(); - uint64_t ttl() const; - void set_ttl(uint64_t value); private: - uint64_t _internal_ttl() const; - void _internal_set_ttl(uint64_t value); - public: + bool _internal_succeed() const; + void _internal_set_succeed(bool value); + public: // bool previous_not_exist = 4; - void clear_previous_not_exist(); + void clear_previous_not_exist() ; bool previous_not_exist() const; void set_previous_not_exist(bool value); + private: bool _internal_previous_not_exist() const; void _internal_set_previous_not_exist(bool value); - public: - // bool delete = 8; - void clear_delete_(); - bool delete_() const; - void set_delete_(bool value); - private: - bool _internal_delete_() const; - void _internal_set_delete_(bool value); public: - - // @@protoc_insertion_point(class_scope:kvrpcpb.RawCASRequest) + // @@protoc_insertion_point(class_scope:kvrpcpb.RawCASResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 5, 1, + 36, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr previous_value_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; - ::kvrpcpb::Context* context_; - uint64_t ttl_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::google::protobuf::internal::ArenaStringPtr previous_value_; + ::errorpb::Error* region_error_; + bool succeed_; bool previous_not_exist_; - bool delete__; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawCASResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCASResponse) */ { +class RawBatchPutResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchPutResponse) */ { public: - inline RawCASResponse() : RawCASResponse(nullptr) {} - ~RawCASResponse() override; - explicit PROTOBUF_CONSTEXPR RawCASResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawBatchPutResponse() : RawBatchPutResponse(nullptr) {} + ~RawBatchPutResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawBatchPutResponse(::google::protobuf::internal::ConstantInitialized); - RawCASResponse(const RawCASResponse& from); - RawCASResponse(RawCASResponse&& from) noexcept - : RawCASResponse() { + inline RawBatchPutResponse(const RawBatchPutResponse& from) + : RawBatchPutResponse(nullptr, from) {} + RawBatchPutResponse(RawBatchPutResponse&& from) noexcept + : RawBatchPutResponse() { *this = ::std::move(from); } - inline RawCASResponse& operator=(const RawCASResponse& from) { + inline RawBatchPutResponse& operator=(const RawBatchPutResponse& from) { CopyFrom(from); return *this; } - inline RawCASResponse& operator=(RawCASResponse&& from) noexcept { + inline RawBatchPutResponse& operator=(RawBatchPutResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -3715,90 +4337,99 @@ class RawCASResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawCASResponse& default_instance() { + static const RawBatchPutResponse& default_instance() { return *internal_default_instance(); } - static inline const RawCASResponse* internal_default_instance() { - return reinterpret_cast( - &_RawCASResponse_default_instance_); + static inline const RawBatchPutResponse* internal_default_instance() { + return reinterpret_cast( + &_RawBatchPutResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 17; + 9; - friend void swap(RawCASResponse& a, RawCASResponse& b) { + friend void swap(RawBatchPutResponse& a, RawBatchPutResponse& b) { a.Swap(&b); } - inline void Swap(RawCASResponse* other) { + inline void Swap(RawBatchPutResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawCASResponse* other) { + void UnsafeArenaSwap(RawBatchPutResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawCASResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawBatchPutResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawCASResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawCASResponse& from) { - RawCASResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawBatchPutResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawBatchPutResponse& from) { + RawBatchPutResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawCASResponse* other); + void InternalSwap(RawBatchPutResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawCASResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawBatchPutResponse"; } protected: - explicit RawCASResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawBatchPutResponse(::google::protobuf::Arena* arena); + RawBatchPutResponse(::google::protobuf::Arena* arena, const RawBatchPutResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -3806,117 +4437,96 @@ class RawCASResponse final : enum : int { kErrorFieldNumber = 2, - kPreviousValueFieldNumber = 5, kRegionErrorFieldNumber = 1, - kSucceedFieldNumber = 3, - kPreviousNotExistFieldNumber = 4, }; // string error = 2; - void clear_error(); + void clear_error() ; const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); + template + void set_error(Arg_&& arg, Args_... args); std::string* mutable_error(); PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); + void set_allocated_error(std::string* value); + private: const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); std::string* _internal_mutable_error(); - public: - // bytes previous_value = 5; - void clear_previous_value(); - const std::string& previous_value() const; - template - void set_previous_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_previous_value(); - PROTOBUF_NODISCARD std::string* release_previous_value(); - void set_allocated_previous_value(std::string* previous_value); - private: - const std::string& _internal_previous_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_previous_value(const std::string& value); - std::string* _internal_mutable_previous_value(); public: - // .errorpb.Error region_error = 1; bool has_region_error() const; - private: - bool _internal_has_region_error() const; - public: - void clear_region_error(); + void clear_region_error() ; const ::errorpb::Error& region_error() const; PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); - private: - const ::errorpb::Error& _internal_region_error() const; - ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); ::errorpb::Error* unsafe_arena_release_region_error(); - // bool succeed = 3; - void clear_succeed(); - bool succeed() const; - void set_succeed(bool value); private: - bool _internal_succeed() const; - void _internal_set_succeed(bool value); - public: + const ::errorpb::Error& _internal_region_error() const; + ::errorpb::Error* _internal_mutable_region_error(); - // bool previous_not_exist = 4; - void clear_previous_not_exist(); - bool previous_not_exist() const; - void set_previous_not_exist(bool value); - private: - bool _internal_previous_not_exist() const; - void _internal_set_previous_not_exist(bool value); public: - - // @@protoc_insertion_point(class_scope:kvrpcpb.RawCASResponse) + // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchPutResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 41, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr previous_value_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; ::errorpb::Error* region_error_; - bool succeed_; - bool previous_not_exist_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawScanRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawScanRequest) */ { +class RawBatchDeleteResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchDeleteResponse) */ { public: - inline RawScanRequest() : RawScanRequest(nullptr) {} - ~RawScanRequest() override; - explicit PROTOBUF_CONSTEXPR RawScanRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawBatchDeleteResponse() : RawBatchDeleteResponse(nullptr) {} + ~RawBatchDeleteResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawBatchDeleteResponse(::google::protobuf::internal::ConstantInitialized); - RawScanRequest(const RawScanRequest& from); - RawScanRequest(RawScanRequest&& from) noexcept - : RawScanRequest() { + inline RawBatchDeleteResponse(const RawBatchDeleteResponse& from) + : RawBatchDeleteResponse(nullptr, from) {} + RawBatchDeleteResponse(RawBatchDeleteResponse&& from) noexcept + : RawBatchDeleteResponse() { *this = ::std::move(from); } - inline RawScanRequest& operator=(const RawScanRequest& from) { + inline RawBatchDeleteResponse& operator=(const RawBatchDeleteResponse& from) { CopyFrom(from); return *this; } - inline RawScanRequest& operator=(RawScanRequest&& from) noexcept { + inline RawBatchDeleteResponse& operator=(RawBatchDeleteResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -3926,235 +4536,196 @@ class RawScanRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawScanRequest& default_instance() { + static const RawBatchDeleteResponse& default_instance() { return *internal_default_instance(); } - static inline const RawScanRequest* internal_default_instance() { - return reinterpret_cast( - &_RawScanRequest_default_instance_); + static inline const RawBatchDeleteResponse* internal_default_instance() { + return reinterpret_cast( + &_RawBatchDeleteResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 18; + 13; - friend void swap(RawScanRequest& a, RawScanRequest& b) { + friend void swap(RawBatchDeleteResponse& a, RawBatchDeleteResponse& b) { a.Swap(&b); } - inline void Swap(RawScanRequest* other) { + inline void Swap(RawBatchDeleteResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawScanRequest* other) { + void UnsafeArenaSwap(RawBatchDeleteResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawScanRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawBatchDeleteResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawScanRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawScanRequest& from) { - RawScanRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawBatchDeleteResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawBatchDeleteResponse& from) { + RawBatchDeleteResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawScanRequest* other); + void InternalSwap(RawBatchDeleteResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawScanRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawBatchDeleteResponse"; } protected: - explicit RawScanRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawBatchDeleteResponse(::google::protobuf::Arena* arena); + RawBatchDeleteResponse(::google::protobuf::Arena* arena, const RawBatchDeleteResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kStartKeyFieldNumber = 2, - kCfFieldNumber = 5, - kEndKeyFieldNumber = 7, - kContextFieldNumber = 1, - kLimitFieldNumber = 3, - kKeyOnlyFieldNumber = 4, - kReverseFieldNumber = 6, + kErrorFieldNumber = 2, + kRegionErrorFieldNumber = 1, }; - // bytes start_key = 2; - void clear_start_key(); - const std::string& start_key() const; - template - void set_start_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_start_key(); - PROTOBUF_NODISCARD std::string* release_start_key(); - void set_allocated_start_key(std::string* start_key); - private: - const std::string& _internal_start_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key(const std::string& value); - std::string* _internal_mutable_start_key(); - public: - - // string cf = 5; - void clear_cf(); - const std::string& cf() const; - template - void set_cf(ArgT0&& arg0, ArgT... args); - std::string* mutable_cf(); - PROTOBUF_NODISCARD std::string* release_cf(); - void set_allocated_cf(std::string* cf); - private: - const std::string& _internal_cf() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf(const std::string& value); - std::string* _internal_mutable_cf(); - public: - - // bytes end_key = 7; - void clear_end_key(); - const std::string& end_key() const; - template - void set_end_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_end_key(); - PROTOBUF_NODISCARD std::string* release_end_key(); - void set_allocated_end_key(std::string* end_key); - private: - const std::string& _internal_end_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key(const std::string& value); - std::string* _internal_mutable_end_key(); - public: + // string error = 2; + void clear_error() ; + const std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + std::string* mutable_error(); + PROTOBUF_NODISCARD std::string* release_error(); + void set_allocated_error(std::string* value); - // .kvrpcpb.Context context = 1; - bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); - const ::kvrpcpb::Context& context() const; - PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); - ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); private: - const ::kvrpcpb::Context& _internal_context() const; - ::kvrpcpb::Context* _internal_mutable_context(); - public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + const std::string& _internal_error() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); + std::string* _internal_mutable_error(); - // uint32 limit = 3; - void clear_limit(); - uint32_t limit() const; - void set_limit(uint32_t value); - private: - uint32_t _internal_limit() const; - void _internal_set_limit(uint32_t value); public: + // .errorpb.Error region_error = 1; + bool has_region_error() const; + void clear_region_error() ; + const ::errorpb::Error& region_error() const; + PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); + ::errorpb::Error* mutable_region_error(); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); - // bool key_only = 4; - void clear_key_only(); - bool key_only() const; - void set_key_only(bool value); private: - bool _internal_key_only() const; - void _internal_set_key_only(bool value); - public: + const ::errorpb::Error& _internal_region_error() const; + ::errorpb::Error* _internal_mutable_region_error(); - // bool reverse = 6; - void clear_reverse(); - bool reverse() const; - void set_reverse(bool value); - private: - bool _internal_reverse() const; - void _internal_set_reverse(bool value); public: - - // @@protoc_insertion_point(class_scope:kvrpcpb.RawScanRequest) + // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchDeleteResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 44, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cf_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_key_; - ::kvrpcpb::Context* context_; - uint32_t limit_; - bool key_only_; - bool reverse_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::errorpb::Error* region_error_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawScanResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawScanResponse) */ { +class KvPair final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.KvPair) */ { public: - inline RawScanResponse() : RawScanResponse(nullptr) {} - ~RawScanResponse() override; - explicit PROTOBUF_CONSTEXPR RawScanResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline KvPair() : KvPair(nullptr) {} + ~KvPair() override; + template + explicit PROTOBUF_CONSTEXPR KvPair(::google::protobuf::internal::ConstantInitialized); - RawScanResponse(const RawScanResponse& from); - RawScanResponse(RawScanResponse&& from) noexcept - : RawScanResponse() { + inline KvPair(const KvPair& from) + : KvPair(nullptr, from) {} + KvPair(KvPair&& from) noexcept + : KvPair() { *this = ::std::move(from); } - inline RawScanResponse& operator=(const RawScanResponse& from) { + inline KvPair& operator=(const KvPair& from) { CopyFrom(from); return *this; } - inline RawScanResponse& operator=(RawScanResponse&& from) noexcept { + inline KvPair& operator=(KvPair&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -4164,174 +4735,214 @@ class RawScanResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawScanResponse& default_instance() { + static const KvPair& default_instance() { return *internal_default_instance(); } - static inline const RawScanResponse* internal_default_instance() { - return reinterpret_cast( - &_RawScanResponse_default_instance_); + static inline const KvPair* internal_default_instance() { + return reinterpret_cast( + &_KvPair_default_instance_); } static constexpr int kIndexInFileMessages = - 19; + 1; - friend void swap(RawScanResponse& a, RawScanResponse& b) { + friend void swap(KvPair& a, KvPair& b) { a.Swap(&b); } - inline void Swap(RawScanResponse* other) { + inline void Swap(KvPair* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawScanResponse* other) { + void UnsafeArenaSwap(KvPair* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawScanResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + KvPair* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawScanResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawScanResponse& from) { - RawScanResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const KvPair& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const KvPair& from) { + KvPair::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawScanResponse* other); + void InternalSwap(KvPair* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawScanResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.KvPair"; } protected: - explicit RawScanResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit KvPair(::google::protobuf::Arena* arena); + KvPair(::google::protobuf::Arena* arena, const KvPair& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKvsFieldNumber = 2, - kRegionErrorFieldNumber = 1, + kKeyFieldNumber = 2, + kValueFieldNumber = 3, + kErrorFieldNumber = 1, }; - // repeated .kvrpcpb.KvPair kvs = 2; - int kvs_size() const; - private: - int _internal_kvs_size() const; - public: - void clear_kvs(); - ::kvrpcpb::KvPair* mutable_kvs(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >* - mutable_kvs(); + // bytes key = 2; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); + private: - const ::kvrpcpb::KvPair& _internal_kvs(int index) const; - ::kvrpcpb::KvPair* _internal_add_kvs(); + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); + public: - const ::kvrpcpb::KvPair& kvs(int index) const; - ::kvrpcpb::KvPair* add_kvs(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >& - kvs() const; + // bytes value = 3; + void clear_value() ; + const std::string& value() const; + template + void set_value(Arg_&& arg, Args_... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); - // .errorpb.Error region_error = 1; - bool has_region_error() const; private: - bool _internal_has_region_error() const; + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value( + const std::string& value); + std::string* _internal_mutable_value(); + public: - void clear_region_error(); - const ::errorpb::Error& region_error() const; - PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); - ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); + // .errorpb.Error error = 1; + bool has_error() const; + void clear_error() ; + const ::errorpb::Error& error() const; + PROTOBUF_NODISCARD ::errorpb::Error* release_error(); + ::errorpb::Error* mutable_error(); + void set_allocated_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_error(); + private: - const ::errorpb::Error& _internal_region_error() const; - ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); + const ::errorpb::Error& _internal_error() const; + ::errorpb::Error* _internal_mutable_error(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawScanResponse) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.KvPair) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 3, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair > kvs_; - ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr value_; + ::errorpb::Error* error_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class KeyRange final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.KeyRange) */ { +class RawScanResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawScanResponse) */ { public: - inline KeyRange() : KeyRange(nullptr) {} - ~KeyRange() override; - explicit PROTOBUF_CONSTEXPR KeyRange(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawScanResponse() : RawScanResponse(nullptr) {} + ~RawScanResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawScanResponse(::google::protobuf::internal::ConstantInitialized); - KeyRange(const KeyRange& from); - KeyRange(KeyRange&& from) noexcept - : KeyRange() { + inline RawScanResponse(const RawScanResponse& from) + : RawScanResponse(nullptr, from) {} + RawScanResponse(RawScanResponse&& from) noexcept + : RawScanResponse() { *this = ::std::move(from); } - inline KeyRange& operator=(const KeyRange& from) { + inline RawScanResponse& operator=(const RawScanResponse& from) { CopyFrom(from); return *this; } - inline KeyRange& operator=(KeyRange&& from) noexcept { + inline RawScanResponse& operator=(RawScanResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -4341,166 +4952,198 @@ class KeyRange final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const KeyRange& default_instance() { + static const RawScanResponse& default_instance() { return *internal_default_instance(); } - static inline const KeyRange* internal_default_instance() { - return reinterpret_cast( - &_KeyRange_default_instance_); + static inline const RawScanResponse* internal_default_instance() { + return reinterpret_cast( + &_RawScanResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 20; + 19; - friend void swap(KeyRange& a, KeyRange& b) { + friend void swap(RawScanResponse& a, RawScanResponse& b) { a.Swap(&b); } - inline void Swap(KeyRange* other) { + inline void Swap(RawScanResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(KeyRange* other) { + void UnsafeArenaSwap(RawScanResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - KeyRange* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawScanResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const KeyRange& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const KeyRange& from) { - KeyRange::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawScanResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawScanResponse& from) { + RawScanResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(KeyRange* other); + void InternalSwap(RawScanResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.KeyRange"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawScanResponse"; } protected: - explicit KeyRange(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawScanResponse(::google::protobuf::Arena* arena); + RawScanResponse(::google::protobuf::Arena* arena, const RawScanResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kStartKeyFieldNumber = 1, - kEndKeyFieldNumber = 2, + kKvsFieldNumber = 2, + kRegionErrorFieldNumber = 1, }; - // bytes start_key = 1; - void clear_start_key(); - const std::string& start_key() const; - template - void set_start_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_start_key(); - PROTOBUF_NODISCARD std::string* release_start_key(); - void set_allocated_start_key(std::string* start_key); + // repeated .kvrpcpb.KvPair kvs = 2; + int kvs_size() const; private: - const std::string& _internal_start_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key(const std::string& value); - std::string* _internal_mutable_start_key(); - public: + int _internal_kvs_size() const; - // bytes end_key = 2; - void clear_end_key(); - const std::string& end_key() const; - template - void set_end_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_end_key(); - PROTOBUF_NODISCARD std::string* release_end_key(); - void set_allocated_end_key(std::string* end_key); + public: + void clear_kvs() ; + ::kvrpcpb::KvPair* mutable_kvs(int index); + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair >* + mutable_kvs(); private: - const std::string& _internal_end_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key(const std::string& value); - std::string* _internal_mutable_end_key(); + const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& _internal_kvs() const; + ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* _internal_mutable_kvs(); public: + const ::kvrpcpb::KvPair& kvs(int index) const; + ::kvrpcpb::KvPair* add_kvs(); + const ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair >& + kvs() const; + // .errorpb.Error region_error = 1; + bool has_region_error() const; + void clear_region_error() ; + const ::errorpb::Error& region_error() const; + PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); + ::errorpb::Error* mutable_region_error(); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); - // @@protoc_insertion_point(class_scope:kvrpcpb.KeyRange) + private: + const ::errorpb::Error& _internal_region_error() const; + ::errorpb::Error* _internal_mutable_region_error(); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawScanResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 2, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_key_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair > kvs_; + ::errorpb::Error* region_error_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawCoprocessorRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCoprocessorRequest) */ { +class RawBatchPutRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchPutRequest) */ { public: - inline RawCoprocessorRequest() : RawCoprocessorRequest(nullptr) {} - ~RawCoprocessorRequest() override; - explicit PROTOBUF_CONSTEXPR RawCoprocessorRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawBatchPutRequest() : RawBatchPutRequest(nullptr) {} + ~RawBatchPutRequest() override; + template + explicit PROTOBUF_CONSTEXPR RawBatchPutRequest(::google::protobuf::internal::ConstantInitialized); - RawCoprocessorRequest(const RawCoprocessorRequest& from); - RawCoprocessorRequest(RawCoprocessorRequest&& from) noexcept - : RawCoprocessorRequest() { + inline RawBatchPutRequest(const RawBatchPutRequest& from) + : RawBatchPutRequest(nullptr, from) {} + RawBatchPutRequest(RawBatchPutRequest&& from) noexcept + : RawBatchPutRequest() { *this = ::std::move(from); } - inline RawCoprocessorRequest& operator=(const RawCoprocessorRequest& from) { + inline RawBatchPutRequest& operator=(const RawBatchPutRequest& from) { CopyFrom(from); return *this; } - inline RawCoprocessorRequest& operator=(RawCoprocessorRequest&& from) noexcept { + inline RawBatchPutRequest& operator=(RawBatchPutRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -4510,222 +5153,240 @@ class RawCoprocessorRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawCoprocessorRequest& default_instance() { + static const RawBatchPutRequest& default_instance() { return *internal_default_instance(); } - static inline const RawCoprocessorRequest* internal_default_instance() { - return reinterpret_cast( - &_RawCoprocessorRequest_default_instance_); + static inline const RawBatchPutRequest* internal_default_instance() { + return reinterpret_cast( + &_RawBatchPutRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 21; + 8; - friend void swap(RawCoprocessorRequest& a, RawCoprocessorRequest& b) { + friend void swap(RawBatchPutRequest& a, RawBatchPutRequest& b) { a.Swap(&b); } - inline void Swap(RawCoprocessorRequest* other) { + inline void Swap(RawBatchPutRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawCoprocessorRequest* other) { + void UnsafeArenaSwap(RawBatchPutRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawCoprocessorRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawBatchPutRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawCoprocessorRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawCoprocessorRequest& from) { - RawCoprocessorRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawBatchPutRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawBatchPutRequest& from) { + RawBatchPutRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawCoprocessorRequest* other); + void InternalSwap(RawBatchPutRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawCoprocessorRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawBatchPutRequest"; } protected: - explicit RawCoprocessorRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawBatchPutRequest(::google::protobuf::Arena* arena); + RawBatchPutRequest(::google::protobuf::Arena* arena, const RawBatchPutRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kRangesFieldNumber = 4, - kCoprNameFieldNumber = 2, - kCoprVersionReqFieldNumber = 3, - kDataFieldNumber = 5, + kPairsFieldNumber = 2, + kCfFieldNumber = 3, kContextFieldNumber = 1, + kTtlFieldNumber = 4, + kForCasFieldNumber = 5, }; - // repeated .kvrpcpb.KeyRange ranges = 4; - int ranges_size() const; - private: - int _internal_ranges_size() const; - public: - void clear_ranges(); - ::kvrpcpb::KeyRange* mutable_ranges(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KeyRange >* - mutable_ranges(); + // repeated .kvrpcpb.KvPair pairs = 2; + int pairs_size() const; private: - const ::kvrpcpb::KeyRange& _internal_ranges(int index) const; - ::kvrpcpb::KeyRange* _internal_add_ranges(); - public: - const ::kvrpcpb::KeyRange& ranges(int index) const; - ::kvrpcpb::KeyRange* add_ranges(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KeyRange >& - ranges() const; + int _internal_pairs_size() const; - // string copr_name = 2; - void clear_copr_name(); - const std::string& copr_name() const; - template - void set_copr_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_copr_name(); - PROTOBUF_NODISCARD std::string* release_copr_name(); - void set_allocated_copr_name(std::string* copr_name); - private: - const std::string& _internal_copr_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_copr_name(const std::string& value); - std::string* _internal_mutable_copr_name(); public: - - // string copr_version_req = 3; - void clear_copr_version_req(); - const std::string& copr_version_req() const; - template - void set_copr_version_req(ArgT0&& arg0, ArgT... args); - std::string* mutable_copr_version_req(); - PROTOBUF_NODISCARD std::string* release_copr_version_req(); - void set_allocated_copr_version_req(std::string* copr_version_req); + void clear_pairs() ; + ::kvrpcpb::KvPair* mutable_pairs(int index); + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair >* + mutable_pairs(); private: - const std::string& _internal_copr_version_req() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_copr_version_req(const std::string& value); - std::string* _internal_mutable_copr_version_req(); + const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& _internal_pairs() const; + ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* _internal_mutable_pairs(); public: + const ::kvrpcpb::KvPair& pairs(int index) const; + ::kvrpcpb::KvPair* add_pairs(); + const ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair >& + pairs() const; + // string cf = 3; + void clear_cf() ; + const std::string& cf() const; + template + void set_cf(Arg_&& arg, Args_... args); + std::string* mutable_cf(); + PROTOBUF_NODISCARD std::string* release_cf(); + void set_allocated_cf(std::string* value); - // bytes data = 5; - void clear_data(); - const std::string& data() const; - template - void set_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_data(); - PROTOBUF_NODISCARD std::string* release_data(); - void set_allocated_data(std::string* data); private: - const std::string& _internal_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); - std::string* _internal_mutable_data(); - public: + const std::string& _internal_cf() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cf( + const std::string& value); + std::string* _internal_mutable_cf(); + public: // .kvrpcpb.Context context = 1; bool has_context() const; - private: - bool _internal_has_context() const; - public: - void clear_context(); + void clear_context() ; const ::kvrpcpb::Context& context() const; PROTOBUF_NODISCARD ::kvrpcpb::Context* release_context(); ::kvrpcpb::Context* mutable_context(); - void set_allocated_context(::kvrpcpb::Context* context); + void set_allocated_context(::kvrpcpb::Context* value); + void unsafe_arena_set_allocated_context(::kvrpcpb::Context* value); + ::kvrpcpb::Context* unsafe_arena_release_context(); + private: const ::kvrpcpb::Context& _internal_context() const; ::kvrpcpb::Context* _internal_mutable_context(); + public: - void unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context); - ::kvrpcpb::Context* unsafe_arena_release_context(); + // uint64 ttl = 4; + void clear_ttl() ; + ::uint64_t ttl() const; + void set_ttl(::uint64_t value); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawCoprocessorRequest) + private: + ::uint64_t _internal_ttl() const; + void _internal_set_ttl(::uint64_t value); + + public: + // bool for_cas = 5; + void clear_for_cas() ; + bool for_cas() const; + void set_for_cas(bool value); + + private: + bool _internal_for_cas() const; + void _internal_set_for_cas(bool value); + + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchPutRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 5, 2, + 37, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KeyRange > ranges_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr copr_name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr copr_version_req_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair > pairs_; + ::google::protobuf::internal::ArenaStringPtr cf_; ::kvrpcpb::Context* context_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::uint64_t ttl_; + bool for_cas_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RawCoprocessorResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawCoprocessorResponse) */ { +class RawBatchGetResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvrpcpb.RawBatchGetResponse) */ { public: - inline RawCoprocessorResponse() : RawCoprocessorResponse(nullptr) {} - ~RawCoprocessorResponse() override; - explicit PROTOBUF_CONSTEXPR RawCoprocessorResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RawBatchGetResponse() : RawBatchGetResponse(nullptr) {} + ~RawBatchGetResponse() override; + template + explicit PROTOBUF_CONSTEXPR RawBatchGetResponse(::google::protobuf::internal::ConstantInitialized); - RawCoprocessorResponse(const RawCoprocessorResponse& from); - RawCoprocessorResponse(RawCoprocessorResponse&& from) noexcept - : RawCoprocessorResponse() { + inline RawBatchGetResponse(const RawBatchGetResponse& from) + : RawBatchGetResponse(nullptr, from) {} + RawBatchGetResponse(RawBatchGetResponse&& from) noexcept + : RawBatchGetResponse() { *this = ::std::move(from); } - inline RawCoprocessorResponse& operator=(const RawCoprocessorResponse& from) { + inline RawBatchGetResponse& operator=(const RawBatchGetResponse& from) { CopyFrom(from); return *this; } - inline RawCoprocessorResponse& operator=(RawCoprocessorResponse&& from) noexcept { + inline RawBatchGetResponse& operator=(RawBatchGetResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -4735,916 +5396,997 @@ class RawCoprocessorResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RawCoprocessorResponse& default_instance() { + static const RawBatchGetResponse& default_instance() { return *internal_default_instance(); } - static inline const RawCoprocessorResponse* internal_default_instance() { - return reinterpret_cast( - &_RawCoprocessorResponse_default_instance_); + static inline const RawBatchGetResponse* internal_default_instance() { + return reinterpret_cast( + &_RawBatchGetResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 22; + 5; - friend void swap(RawCoprocessorResponse& a, RawCoprocessorResponse& b) { + friend void swap(RawBatchGetResponse& a, RawBatchGetResponse& b) { a.Swap(&b); } - inline void Swap(RawCoprocessorResponse* other) { + inline void Swap(RawBatchGetResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RawCoprocessorResponse* other) { + void UnsafeArenaSwap(RawBatchGetResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RawCoprocessorResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RawBatchGetResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RawCoprocessorResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RawCoprocessorResponse& from) { - RawCoprocessorResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RawBatchGetResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RawBatchGetResponse& from) { + RawBatchGetResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RawCoprocessorResponse* other); + void InternalSwap(RawBatchGetResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "kvrpcpb.RawCoprocessorResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "kvrpcpb.RawBatchGetResponse"; } protected: - explicit RawCoprocessorResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RawBatchGetResponse(::google::protobuf::Arena* arena); + RawBatchGetResponse(::google::protobuf::Arena* arena, const RawBatchGetResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kErrorFieldNumber = 2, - kDataFieldNumber = 3, + kPairsFieldNumber = 2, kRegionErrorFieldNumber = 1, }; - // string error = 2; - void clear_error(); - const std::string& error() const; - template - void set_error(ArgT0&& arg0, ArgT... args); - std::string* mutable_error(); - PROTOBUF_NODISCARD std::string* release_error(); - void set_allocated_error(std::string* error); + // repeated .kvrpcpb.KvPair pairs = 2; + int pairs_size() const; private: - const std::string& _internal_error() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_error(const std::string& value); - std::string* _internal_mutable_error(); - public: - - // bytes data = 3; - void clear_data(); - const std::string& data() const; - template - void set_data(ArgT0&& arg0, ArgT... args); - std::string* mutable_data(); - PROTOBUF_NODISCARD std::string* release_data(); - void set_allocated_data(std::string* data); + int _internal_pairs_size() const; + + public: + void clear_pairs() ; + ::kvrpcpb::KvPair* mutable_pairs(int index); + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair >* + mutable_pairs(); private: - const std::string& _internal_data() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_data(const std::string& value); - std::string* _internal_mutable_data(); + const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& _internal_pairs() const; + ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* _internal_mutable_pairs(); public: - + const ::kvrpcpb::KvPair& pairs(int index) const; + ::kvrpcpb::KvPair* add_pairs(); + const ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair >& + pairs() const; // .errorpb.Error region_error = 1; bool has_region_error() const; - private: - bool _internal_has_region_error() const; - public: - void clear_region_error(); + void clear_region_error() ; const ::errorpb::Error& region_error() const; PROTOBUF_NODISCARD ::errorpb::Error* release_region_error(); ::errorpb::Error* mutable_region_error(); - void set_allocated_region_error(::errorpb::Error* region_error); + void set_allocated_region_error(::errorpb::Error* value); + void unsafe_arena_set_allocated_region_error(::errorpb::Error* value); + ::errorpb::Error* unsafe_arena_release_region_error(); + private: const ::errorpb::Error& _internal_region_error() const; ::errorpb::Error* _internal_mutable_region_error(); - public: - void unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error); - ::errorpb::Error* unsafe_arena_release_region_error(); - // @@protoc_insertion_point(class_scope:kvrpcpb.RawCoprocessorResponse) + public: + // @@protoc_insertion_point(class_scope:kvrpcpb.RawBatchGetResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 2, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::kvrpcpb::KvPair > pairs_; ::errorpb::Error* region_error_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_kvrpcpb_2eproto; }; + // =================================================================== + + // =================================================================== + #ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ +// ------------------------------------------------------------------- + // Context // uint64 region_id = 1; inline void Context::clear_region_id() { - _impl_.region_id_ = uint64_t{0u}; -} -inline uint64_t Context::_internal_region_id() const { - return _impl_.region_id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.region_id_ = ::uint64_t{0u}; } -inline uint64_t Context::region_id() const { +inline ::uint64_t Context::region_id() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.region_id) return _internal_region_id(); } -inline void Context::_internal_set_region_id(uint64_t value) { - - _impl_.region_id_ = value; -} -inline void Context::set_region_id(uint64_t value) { +inline void Context::set_region_id(::uint64_t value) { _internal_set_region_id(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.region_id) } +inline ::uint64_t Context::_internal_region_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.region_id_; +} +inline void Context::_internal_set_region_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.region_id_ = value; +} // .metapb.RegionEpoch region_epoch = 2; -inline bool Context::_internal_has_region_epoch() const { - return this != internal_default_instance() && _impl_.region_epoch_ != nullptr; -} inline bool Context::has_region_epoch() const { - return _internal_has_region_epoch(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_epoch_ != nullptr); + return value; } inline const ::metapb::RegionEpoch& Context::_internal_region_epoch() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::metapb::RegionEpoch* p = _impl_.region_epoch_; - return p != nullptr ? *p : reinterpret_cast( - ::metapb::_RegionEpoch_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::metapb::_RegionEpoch_default_instance_); } -inline const ::metapb::RegionEpoch& Context::region_epoch() const { +inline const ::metapb::RegionEpoch& Context::region_epoch() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.Context.region_epoch) return _internal_region_epoch(); } -inline void Context::unsafe_arena_set_allocated_region_epoch( - ::metapb::RegionEpoch* region_epoch) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_epoch_); +inline void Context::unsafe_arena_set_allocated_region_epoch(::metapb::RegionEpoch* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_epoch_); } - _impl_.region_epoch_ = region_epoch; - if (region_epoch) { - + _impl_.region_epoch_ = reinterpret_cast<::metapb::RegionEpoch*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.Context.region_epoch) } inline ::metapb::RegionEpoch* Context::release_region_epoch() { - - ::metapb::RegionEpoch* temp = _impl_.region_epoch_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::metapb::RegionEpoch* released = _impl_.region_epoch_; _impl_.region_epoch_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::metapb::RegionEpoch* Context::unsafe_arena_release_region_epoch() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.Context.region_epoch) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::metapb::RegionEpoch* temp = _impl_.region_epoch_; _impl_.region_epoch_ = nullptr; return temp; } inline ::metapb::RegionEpoch* Context::_internal_mutable_region_epoch() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_epoch_ == nullptr) { - auto* p = CreateMaybeMessage<::metapb::RegionEpoch>(GetArenaForAllocation()); - _impl_.region_epoch_ = p; + auto* p = CreateMaybeMessage<::metapb::RegionEpoch>(GetArena()); + _impl_.region_epoch_ = reinterpret_cast<::metapb::RegionEpoch*>(p); } return _impl_.region_epoch_; } -inline ::metapb::RegionEpoch* Context::mutable_region_epoch() { +inline ::metapb::RegionEpoch* Context::mutable_region_epoch() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::metapb::RegionEpoch* _msg = _internal_mutable_region_epoch(); // @@protoc_insertion_point(field_mutable:kvrpcpb.Context.region_epoch) return _msg; } -inline void Context::set_allocated_region_epoch(::metapb::RegionEpoch* region_epoch) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Context::set_allocated_region_epoch(::metapb::RegionEpoch* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_epoch_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_epoch_); } - if (region_epoch) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_epoch)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_epoch = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_epoch, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_epoch_ = region_epoch; + + _impl_.region_epoch_ = reinterpret_cast<::metapb::RegionEpoch*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.Context.region_epoch) } // .metapb.Peer peer = 3; -inline bool Context::_internal_has_peer() const { - return this != internal_default_instance() && _impl_.peer_ != nullptr; -} inline bool Context::has_peer() const { - return _internal_has_peer(); + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.peer_ != nullptr); + return value; } inline const ::metapb::Peer& Context::_internal_peer() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::metapb::Peer* p = _impl_.peer_; - return p != nullptr ? *p : reinterpret_cast( - ::metapb::_Peer_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::metapb::_Peer_default_instance_); } -inline const ::metapb::Peer& Context::peer() const { +inline const ::metapb::Peer& Context::peer() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.Context.peer) return _internal_peer(); } -inline void Context::unsafe_arena_set_allocated_peer( - ::metapb::Peer* peer) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.peer_); +inline void Context::unsafe_arena_set_allocated_peer(::metapb::Peer* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.peer_); } - _impl_.peer_ = peer; - if (peer) { - + _impl_.peer_ = reinterpret_cast<::metapb::Peer*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.Context.peer) } inline ::metapb::Peer* Context::release_peer() { - - ::metapb::Peer* temp = _impl_.peer_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::metapb::Peer* released = _impl_.peer_; _impl_.peer_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::metapb::Peer* Context::unsafe_arena_release_peer() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.Context.peer) - + + _impl_._has_bits_[0] &= ~0x00000002u; ::metapb::Peer* temp = _impl_.peer_; _impl_.peer_ = nullptr; return temp; } inline ::metapb::Peer* Context::_internal_mutable_peer() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000002u; if (_impl_.peer_ == nullptr) { - auto* p = CreateMaybeMessage<::metapb::Peer>(GetArenaForAllocation()); - _impl_.peer_ = p; + auto* p = CreateMaybeMessage<::metapb::Peer>(GetArena()); + _impl_.peer_ = reinterpret_cast<::metapb::Peer*>(p); } return _impl_.peer_; } -inline ::metapb::Peer* Context::mutable_peer() { +inline ::metapb::Peer* Context::mutable_peer() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::metapb::Peer* _msg = _internal_mutable_peer(); // @@protoc_insertion_point(field_mutable:kvrpcpb.Context.peer) return _msg; } -inline void Context::set_allocated_peer(::metapb::Peer* peer) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Context::set_allocated_peer(::metapb::Peer* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.peer_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.peer_); } - if (peer) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(peer)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - peer = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, peer, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } - _impl_.peer_ = peer; + + _impl_.peer_ = reinterpret_cast<::metapb::Peer*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.Context.peer) } // bool read_quorum = 4; inline void Context::clear_read_quorum() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.read_quorum_ = false; } -inline bool Context::_internal_read_quorum() const { - return _impl_.read_quorum_; -} inline bool Context::read_quorum() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.read_quorum) return _internal_read_quorum(); } -inline void Context::_internal_set_read_quorum(bool value) { - - _impl_.read_quorum_ = value; -} inline void Context::set_read_quorum(bool value) { _internal_set_read_quorum(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.read_quorum) } +inline bool Context::_internal_read_quorum() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.read_quorum_; +} +inline void Context::_internal_set_read_quorum(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.read_quorum_ = value; +} // uint64 term = 5; inline void Context::clear_term() { - _impl_.term_ = uint64_t{0u}; -} -inline uint64_t Context::_internal_term() const { - return _impl_.term_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.term_ = ::uint64_t{0u}; } -inline uint64_t Context::term() const { +inline ::uint64_t Context::term() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.term) return _internal_term(); } -inline void Context::_internal_set_term(uint64_t value) { - - _impl_.term_ = value; -} -inline void Context::set_term(uint64_t value) { +inline void Context::set_term(::uint64_t value) { _internal_set_term(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.term) } +inline ::uint64_t Context::_internal_term() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.term_; +} +inline void Context::_internal_set_term(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.term_ = value; +} // .kvrpcpb.CommandPri priority = 6; inline void Context::clear_priority() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.priority_ = 0; } -inline ::kvrpcpb::CommandPri Context::_internal_priority() const { - return static_cast< ::kvrpcpb::CommandPri >(_impl_.priority_); -} inline ::kvrpcpb::CommandPri Context::priority() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.priority) return _internal_priority(); } -inline void Context::_internal_set_priority(::kvrpcpb::CommandPri value) { - - _impl_.priority_ = value; -} inline void Context::set_priority(::kvrpcpb::CommandPri value) { _internal_set_priority(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.priority) } +inline ::kvrpcpb::CommandPri Context::_internal_priority() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::kvrpcpb::CommandPri>(_impl_.priority_); +} +inline void Context::_internal_set_priority(::kvrpcpb::CommandPri value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.priority_ = value; +} // .kvrpcpb.IsolationLevel isolation_level = 7; inline void Context::clear_isolation_level() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.isolation_level_ = 0; } -inline ::kvrpcpb::IsolationLevel Context::_internal_isolation_level() const { - return static_cast< ::kvrpcpb::IsolationLevel >(_impl_.isolation_level_); -} inline ::kvrpcpb::IsolationLevel Context::isolation_level() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.isolation_level) return _internal_isolation_level(); } -inline void Context::_internal_set_isolation_level(::kvrpcpb::IsolationLevel value) { - - _impl_.isolation_level_ = value; -} inline void Context::set_isolation_level(::kvrpcpb::IsolationLevel value) { _internal_set_isolation_level(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.isolation_level) } +inline ::kvrpcpb::IsolationLevel Context::_internal_isolation_level() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::kvrpcpb::IsolationLevel>(_impl_.isolation_level_); +} +inline void Context::_internal_set_isolation_level(::kvrpcpb::IsolationLevel value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.isolation_level_ = value; +} // bool not_fill_cache = 8; inline void Context::clear_not_fill_cache() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.not_fill_cache_ = false; } -inline bool Context::_internal_not_fill_cache() const { - return _impl_.not_fill_cache_; -} inline bool Context::not_fill_cache() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.not_fill_cache) return _internal_not_fill_cache(); } -inline void Context::_internal_set_not_fill_cache(bool value) { - - _impl_.not_fill_cache_ = value; -} inline void Context::set_not_fill_cache(bool value) { _internal_set_not_fill_cache(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.not_fill_cache) } +inline bool Context::_internal_not_fill_cache() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.not_fill_cache_; +} +inline void Context::_internal_set_not_fill_cache(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.not_fill_cache_ = value; +} // bool sync_log = 9; inline void Context::clear_sync_log() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.sync_log_ = false; } -inline bool Context::_internal_sync_log() const { - return _impl_.sync_log_; -} inline bool Context::sync_log() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.sync_log) return _internal_sync_log(); } -inline void Context::_internal_set_sync_log(bool value) { - - _impl_.sync_log_ = value; -} inline void Context::set_sync_log(bool value) { _internal_set_sync_log(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.sync_log) } +inline bool Context::_internal_sync_log() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.sync_log_; +} +inline void Context::_internal_set_sync_log(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.sync_log_ = value; +} // bool stale_read = 10; inline void Context::clear_stale_read() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.stale_read_ = false; } -inline bool Context::_internal_stale_read() const { - return _impl_.stale_read_; -} inline bool Context::stale_read() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.stale_read) return _internal_stale_read(); } -inline void Context::_internal_set_stale_read(bool value) { - - _impl_.stale_read_ = value; -} inline void Context::set_stale_read(bool value) { _internal_set_stale_read(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.stale_read) } +inline bool Context::_internal_stale_read() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.stale_read_; +} +inline void Context::_internal_set_stale_read(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.stale_read_ = value; +} // uint64 resource_group_tag = 11; inline void Context::clear_resource_group_tag() { - _impl_.resource_group_tag_ = uint64_t{0u}; -} -inline uint64_t Context::_internal_resource_group_tag() const { - return _impl_.resource_group_tag_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.resource_group_tag_ = ::uint64_t{0u}; } -inline uint64_t Context::resource_group_tag() const { +inline ::uint64_t Context::resource_group_tag() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.resource_group_tag) return _internal_resource_group_tag(); } -inline void Context::_internal_set_resource_group_tag(uint64_t value) { - - _impl_.resource_group_tag_ = value; -} -inline void Context::set_resource_group_tag(uint64_t value) { +inline void Context::set_resource_group_tag(::uint64_t value) { _internal_set_resource_group_tag(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.resource_group_tag) } +inline ::uint64_t Context::_internal_resource_group_tag() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.resource_group_tag_; +} +inline void Context::_internal_set_resource_group_tag(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.resource_group_tag_ = value; +} // bool replica_read = 12; inline void Context::clear_replica_read() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.replica_read_ = false; } -inline bool Context::_internal_replica_read() const { - return _impl_.replica_read_; -} inline bool Context::replica_read() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.replica_read) return _internal_replica_read(); } -inline void Context::_internal_set_replica_read(bool value) { - - _impl_.replica_read_ = value; -} inline void Context::set_replica_read(bool value) { _internal_set_replica_read(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.replica_read) } +inline bool Context::_internal_replica_read() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.replica_read_; +} +inline void Context::_internal_set_replica_read(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.replica_read_ = value; +} // repeated uint64 resolved_locks = 13; inline int Context::_internal_resolved_locks_size() const { - return _impl_.resolved_locks_.size(); + return _internal_resolved_locks().size(); } inline int Context::resolved_locks_size() const { return _internal_resolved_locks_size(); } inline void Context::clear_resolved_locks() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.resolved_locks_.Clear(); } -inline uint64_t Context::_internal_resolved_locks(int index) const { - return _impl_.resolved_locks_.Get(index); -} -inline uint64_t Context::resolved_locks(int index) const { +inline ::uint64_t Context::resolved_locks(int index) const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.resolved_locks) - return _internal_resolved_locks(index); + return _internal_resolved_locks().Get(index); } -inline void Context::set_resolved_locks(int index, uint64_t value) { - _impl_.resolved_locks_.Set(index, value); +inline void Context::set_resolved_locks(int index, ::uint64_t value) { + _internal_mutable_resolved_locks()->Set(index, value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.resolved_locks) } -inline void Context::_internal_add_resolved_locks(uint64_t value) { - _impl_.resolved_locks_.Add(value); -} -inline void Context::add_resolved_locks(uint64_t value) { - _internal_add_resolved_locks(value); +inline void Context::add_resolved_locks(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_resolved_locks()->Add(value); // @@protoc_insertion_point(field_add:kvrpcpb.Context.resolved_locks) } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& -Context::_internal_resolved_locks() const { - return _impl_.resolved_locks_; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >& -Context::resolved_locks() const { +inline const ::google::protobuf::RepeatedField<::uint64_t>& Context::resolved_locks() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:kvrpcpb.Context.resolved_locks) return _internal_resolved_locks(); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* -Context::_internal_mutable_resolved_locks() { - return &_impl_.resolved_locks_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* -Context::mutable_resolved_locks() { +inline ::google::protobuf::RepeatedField<::uint64_t>* Context::mutable_resolved_locks() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:kvrpcpb.Context.resolved_locks) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_resolved_locks(); } +inline const ::google::protobuf::RepeatedField<::uint64_t>& Context::_internal_resolved_locks() + const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.resolved_locks_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* Context::_internal_mutable_resolved_locks() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.resolved_locks_; +} // uint64 max_execution_duration_ms = 14; inline void Context::clear_max_execution_duration_ms() { - _impl_.max_execution_duration_ms_ = uint64_t{0u}; -} -inline uint64_t Context::_internal_max_execution_duration_ms() const { - return _impl_.max_execution_duration_ms_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.max_execution_duration_ms_ = ::uint64_t{0u}; } -inline uint64_t Context::max_execution_duration_ms() const { +inline ::uint64_t Context::max_execution_duration_ms() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.max_execution_duration_ms) return _internal_max_execution_duration_ms(); } -inline void Context::_internal_set_max_execution_duration_ms(uint64_t value) { - - _impl_.max_execution_duration_ms_ = value; -} -inline void Context::set_max_execution_duration_ms(uint64_t value) { +inline void Context::set_max_execution_duration_ms(::uint64_t value) { _internal_set_max_execution_duration_ms(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.max_execution_duration_ms) } +inline ::uint64_t Context::_internal_max_execution_duration_ms() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.max_execution_duration_ms_; +} +inline void Context::_internal_set_max_execution_duration_ms(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.max_execution_duration_ms_ = value; +} // string resource_group_name = 15; inline void Context::clear_resource_group_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.resource_group_name_.ClearToEmpty(); } -inline const std::string& Context::resource_group_name() const { +inline const std::string& Context::resource_group_name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.Context.resource_group_name) return _internal_resource_group_name(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Context::set_resource_group_name(ArgT0&& arg0, ArgT... args) { - - _impl_.resource_group_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Context::set_resource_group_name(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.resource_group_name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.Context.resource_group_name) } -inline std::string* Context::mutable_resource_group_name() { +inline std::string* Context::mutable_resource_group_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_resource_group_name(); // @@protoc_insertion_point(field_mutable:kvrpcpb.Context.resource_group_name) return _s; } inline const std::string& Context::_internal_resource_group_name() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.resource_group_name_.Get(); } inline void Context::_internal_set_resource_group_name(const std::string& value) { - - _impl_.resource_group_name_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.resource_group_name_.Set(value, GetArena()); } inline std::string* Context::_internal_mutable_resource_group_name() { - - return _impl_.resource_group_name_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.resource_group_name_.Mutable( GetArena()); } inline std::string* Context::release_resource_group_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.Context.resource_group_name) return _impl_.resource_group_name_.Release(); } -inline void Context::set_allocated_resource_group_name(std::string* resource_group_name) { - if (resource_group_name != nullptr) { - - } else { - - } - _impl_.resource_group_name_.SetAllocated(resource_group_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.resource_group_name_.IsDefault()) { - _impl_.resource_group_name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Context::set_allocated_resource_group_name(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.resource_group_name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.resource_group_name_.IsDefault()) { + _impl_.resource_group_name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.Context.resource_group_name) } // bytes source_stmt = 16; inline void Context::clear_source_stmt() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.source_stmt_.ClearToEmpty(); } -inline const std::string& Context::source_stmt() const { +inline const std::string& Context::source_stmt() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.Context.source_stmt) return _internal_source_stmt(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Context::set_source_stmt(ArgT0&& arg0, ArgT... args) { - - _impl_.source_stmt_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Context::set_source_stmt(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.source_stmt_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.Context.source_stmt) } -inline std::string* Context::mutable_source_stmt() { +inline std::string* Context::mutable_source_stmt() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_source_stmt(); // @@protoc_insertion_point(field_mutable:kvrpcpb.Context.source_stmt) return _s; } inline const std::string& Context::_internal_source_stmt() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.source_stmt_.Get(); } inline void Context::_internal_set_source_stmt(const std::string& value) { - - _impl_.source_stmt_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.source_stmt_.Set(value, GetArena()); } inline std::string* Context::_internal_mutable_source_stmt() { - - return _impl_.source_stmt_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.source_stmt_.Mutable( GetArena()); } inline std::string* Context::release_source_stmt() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.Context.source_stmt) return _impl_.source_stmt_.Release(); } -inline void Context::set_allocated_source_stmt(std::string* source_stmt) { - if (source_stmt != nullptr) { - - } else { - - } - _impl_.source_stmt_.SetAllocated(source_stmt, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.source_stmt_.IsDefault()) { - _impl_.source_stmt_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Context::set_allocated_source_stmt(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.source_stmt_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.source_stmt_.IsDefault()) { + _impl_.source_stmt_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.Context.source_stmt) } // uint64 request_source = 17; inline void Context::clear_request_source() { - _impl_.request_source_ = uint64_t{0u}; -} -inline uint64_t Context::_internal_request_source() const { - return _impl_.request_source_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.request_source_ = ::uint64_t{0u}; } -inline uint64_t Context::request_source() const { +inline ::uint64_t Context::request_source() const { // @@protoc_insertion_point(field_get:kvrpcpb.Context.request_source) return _internal_request_source(); } -inline void Context::_internal_set_request_source(uint64_t value) { - - _impl_.request_source_ = value; -} -inline void Context::set_request_source(uint64_t value) { +inline void Context::set_request_source(::uint64_t value) { _internal_set_request_source(value); // @@protoc_insertion_point(field_set:kvrpcpb.Context.request_source) } +inline ::uint64_t Context::_internal_request_source() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.request_source_; +} +inline void Context::_internal_set_request_source(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.request_source_ = value; +} // ------------------------------------------------------------------- // KvPair // .errorpb.Error error = 1; -inline bool KvPair::_internal_has_error() const { - return this != internal_default_instance() && _impl_.error_ != nullptr; -} inline bool KvPair::has_error() const { - return _internal_has_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.error_ != nullptr); + return value; } inline const ::errorpb::Error& KvPair::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& KvPair::error() const { +inline const ::errorpb::Error& KvPair::error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.KvPair.error) return _internal_error(); } -inline void KvPair::unsafe_arena_set_allocated_error( - ::errorpb::Error* error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.error_); +inline void KvPair::unsafe_arena_set_allocated_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.error_); } - _impl_.error_ = error; - if (error) { - + _impl_.error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.KvPair.error) } inline ::errorpb::Error* KvPair::release_error() { - - ::errorpb::Error* temp = _impl_.error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.error_; _impl_.error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* KvPair::unsafe_arena_release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.KvPair.error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.error_; _impl_.error_ = nullptr; return temp; } inline ::errorpb::Error* KvPair::_internal_mutable_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.error_; } -inline ::errorpb::Error* KvPair::mutable_error() { +inline ::errorpb::Error* KvPair::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.KvPair.error) return _msg; } -inline void KvPair::set_allocated_error(::errorpb::Error* error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void KvPair::set_allocated_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.error_); } - if (error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.error_ = error; + + _impl_.error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.KvPair.error) } // bytes key = 2; inline void KvPair::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_.ClearToEmpty(); } -inline const std::string& KvPair::key() const { +inline const std::string& KvPair::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.KvPair.key) return _internal_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void KvPair::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void KvPair::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.KvPair.key) } -inline std::string* KvPair::mutable_key() { +inline std::string* KvPair::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.KvPair.key) return _s; } inline const std::string& KvPair::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.key_.Get(); } inline void KvPair::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(value, GetArena()); } inline std::string* KvPair::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.key_.Mutable( GetArena()); } inline std::string* KvPair::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.KvPair.key) return _impl_.key_.Release(); } -inline void KvPair::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KvPair::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.KvPair.key) } // bytes value = 3; inline void KvPair::clear_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.value_.ClearToEmpty(); } -inline const std::string& KvPair::value() const { +inline const std::string& KvPair::value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.KvPair.value) return _internal_value(); } -template -inline PROTOBUF_ALWAYS_INLINE -void KvPair::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void KvPair::set_value(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.KvPair.value) } -inline std::string* KvPair::mutable_value() { +inline std::string* KvPair::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_value(); // @@protoc_insertion_point(field_mutable:kvrpcpb.KvPair.value) return _s; } inline const std::string& KvPair::_internal_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.value_.Get(); } inline void KvPair::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.Set(value, GetArena()); } inline std::string* KvPair::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.value_.Mutable( GetArena()); } inline std::string* KvPair::release_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.KvPair.value) return _impl_.value_.Release(); } inline void KvPair::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - - } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.value_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.KvPair.value) } @@ -5653,192 +6395,204 @@ inline void KvPair::set_allocated_value(std::string* value) { // RawGetRequest // .kvrpcpb.Context context = 1; -inline bool RawGetRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawGetRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawGetRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawGetRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawGetRequest::context() const { +inline const ::kvrpcpb::Context& RawGetRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawGetRequest.context) return _internal_context(); } -inline void RawGetRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawGetRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawGetRequest.context) } inline ::kvrpcpb::Context* RawGetRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawGetRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawGetRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawGetRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawGetRequest::mutable_context() { +inline ::kvrpcpb::Context* RawGetRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawGetRequest.context) return _msg; } -inline void RawGetRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawGetRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawGetRequest.context) } // bytes key = 2; inline void RawGetRequest::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_.ClearToEmpty(); } -inline const std::string& RawGetRequest::key() const { +inline const std::string& RawGetRequest::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawGetRequest.key) return _internal_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawGetRequest::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawGetRequest::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawGetRequest.key) } -inline std::string* RawGetRequest::mutable_key() { +inline std::string* RawGetRequest::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawGetRequest.key) return _s; } inline const std::string& RawGetRequest::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.key_.Get(); } inline void RawGetRequest::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(value, GetArena()); } inline std::string* RawGetRequest::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.key_.Mutable( GetArena()); } inline std::string* RawGetRequest::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawGetRequest.key) return _impl_.key_.Release(); } -inline void RawGetRequest::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawGetRequest::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawGetRequest.key) } // string cf = 3; inline void RawGetRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawGetRequest::cf() const { +inline const std::string& RawGetRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawGetRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawGetRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawGetRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawGetRequest.cf) } -inline std::string* RawGetRequest::mutable_cf() { +inline std::string* RawGetRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawGetRequest.cf) return _s; } inline const std::string& RawGetRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawGetRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawGetRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawGetRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawGetRequest.cf) return _impl_.cf_.Release(); } -inline void RawGetRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawGetRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawGetRequest.cf) } @@ -5847,426 +6601,476 @@ inline void RawGetRequest::set_allocated_cf(std::string* cf) { // RawGetResponse // .errorpb.Error region_error = 1; -inline bool RawGetResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawGetResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawGetResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawGetResponse::region_error() const { +inline const ::errorpb::Error& RawGetResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawGetResponse.region_error) return _internal_region_error(); } -inline void RawGetResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawGetResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawGetResponse.region_error) } inline ::errorpb::Error* RawGetResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawGetResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawGetResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawGetResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawGetResponse::mutable_region_error() { +inline ::errorpb::Error* RawGetResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawGetResponse.region_error) return _msg; } -inline void RawGetResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawGetResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawGetResponse.region_error) } // string error = 2; inline void RawGetResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawGetResponse::error() const { +inline const std::string& RawGetResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawGetResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawGetResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawGetResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawGetResponse.error) } -inline std::string* RawGetResponse::mutable_error() { +inline std::string* RawGetResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawGetResponse.error) return _s; } inline const std::string& RawGetResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawGetResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawGetResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawGetResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawGetResponse.error) return _impl_.error_.Release(); } -inline void RawGetResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawGetResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawGetResponse.error) } // bytes value = 3; inline void RawGetResponse::clear_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.value_.ClearToEmpty(); } -inline const std::string& RawGetResponse::value() const { +inline const std::string& RawGetResponse::value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawGetResponse.value) return _internal_value(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawGetResponse::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawGetResponse::set_value(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawGetResponse.value) } -inline std::string* RawGetResponse::mutable_value() { +inline std::string* RawGetResponse::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_value(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawGetResponse.value) return _s; } inline const std::string& RawGetResponse::_internal_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.value_.Get(); } inline void RawGetResponse::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.Set(value, GetArena()); } inline std::string* RawGetResponse::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.value_.Mutable( GetArena()); } inline std::string* RawGetResponse::release_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawGetResponse.value) return _impl_.value_.Release(); } inline void RawGetResponse::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - - } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.value_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawGetResponse.value) } // bool not_found = 4; inline void RawGetResponse::clear_not_found() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.not_found_ = false; } -inline bool RawGetResponse::_internal_not_found() const { - return _impl_.not_found_; -} inline bool RawGetResponse::not_found() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawGetResponse.not_found) return _internal_not_found(); } -inline void RawGetResponse::_internal_set_not_found(bool value) { - - _impl_.not_found_ = value; -} inline void RawGetResponse::set_not_found(bool value) { _internal_set_not_found(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawGetResponse.not_found) } +inline bool RawGetResponse::_internal_not_found() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.not_found_; +} +inline void RawGetResponse::_internal_set_not_found(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.not_found_ = value; +} // ------------------------------------------------------------------- // RawBatchGetRequest // .kvrpcpb.Context context = 1; -inline bool RawBatchGetRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawBatchGetRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawBatchGetRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawBatchGetRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawBatchGetRequest::context() const { +inline const ::kvrpcpb::Context& RawBatchGetRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchGetRequest.context) return _internal_context(); } -inline void RawBatchGetRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawBatchGetRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawBatchGetRequest.context) } inline ::kvrpcpb::Context* RawBatchGetRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawBatchGetRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchGetRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawBatchGetRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawBatchGetRequest::mutable_context() { +inline ::kvrpcpb::Context* RawBatchGetRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchGetRequest.context) return _msg; } -inline void RawBatchGetRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawBatchGetRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchGetRequest.context) } // repeated bytes keys = 2; inline int RawBatchGetRequest::_internal_keys_size() const { - return _impl_.keys_.size(); + return _internal_keys().size(); } inline int RawBatchGetRequest::keys_size() const { return _internal_keys_size(); } inline void RawBatchGetRequest::clear_keys() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.keys_.Clear(); } -inline std::string* RawBatchGetRequest::add_keys() { - std::string* _s = _internal_add_keys(); +inline std::string* RawBatchGetRequest::add_keys() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_keys()->Add(); // @@protoc_insertion_point(field_add_mutable:kvrpcpb.RawBatchGetRequest.keys) return _s; } -inline const std::string& RawBatchGetRequest::_internal_keys(int index) const { - return _impl_.keys_.Get(index); -} -inline const std::string& RawBatchGetRequest::keys(int index) const { +inline const std::string& RawBatchGetRequest::keys(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchGetRequest.keys) - return _internal_keys(index); + return _internal_keys().Get(index); } -inline std::string* RawBatchGetRequest::mutable_keys(int index) { +inline std::string* RawBatchGetRequest::mutable_keys(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchGetRequest.keys) - return _impl_.keys_.Mutable(index); + return _internal_mutable_keys()->Mutable(index); } inline void RawBatchGetRequest::set_keys(int index, const std::string& value) { - _impl_.keys_.Mutable(index)->assign(value); + _internal_mutable_keys()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchGetRequest.keys) } inline void RawBatchGetRequest::set_keys(int index, std::string&& value) { - _impl_.keys_.Mutable(index)->assign(std::move(value)); + _internal_mutable_keys()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchGetRequest.keys) } inline void RawBatchGetRequest::set_keys(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.keys_.Mutable(index)->assign(value); + ABSL_DCHECK(value != nullptr); + _internal_mutable_keys()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:kvrpcpb.RawBatchGetRequest.keys) } -inline void RawBatchGetRequest::set_keys(int index, const void* value, size_t size) { - _impl_.keys_.Mutable(index)->assign( - reinterpret_cast(value), size); +inline void RawBatchGetRequest::set_keys(int index, const void* value, + std::size_t size) { + _internal_mutable_keys()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:kvrpcpb.RawBatchGetRequest.keys) } -inline std::string* RawBatchGetRequest::_internal_add_keys() { - return _impl_.keys_.Add(); +inline void RawBatchGetRequest::set_keys(int index, absl::string_view value) { + _internal_mutable_keys()->Mutable(index)->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_set_string_piece:kvrpcpb.RawBatchGetRequest.keys) } inline void RawBatchGetRequest::add_keys(const std::string& value) { - _impl_.keys_.Add()->assign(value); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign(value); // @@protoc_insertion_point(field_add:kvrpcpb.RawBatchGetRequest.keys) } inline void RawBatchGetRequest::add_keys(std::string&& value) { - _impl_.keys_.Add(std::move(value)); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add(std::move(value)); // @@protoc_insertion_point(field_add:kvrpcpb.RawBatchGetRequest.keys) } inline void RawBatchGetRequest::add_keys(const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.keys_.Add()->assign(value); + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:kvrpcpb.RawBatchGetRequest.keys) } -inline void RawBatchGetRequest::add_keys(const void* value, size_t size) { - _impl_.keys_.Add()->assign(reinterpret_cast(value), size); +inline void RawBatchGetRequest::add_keys(const void* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:kvrpcpb.RawBatchGetRequest.keys) } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -RawBatchGetRequest::keys() const { +inline void RawBatchGetRequest::add_keys(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign(value.data(), value.size()); + // @@protoc_insertion_point(field_add_string_piece:kvrpcpb.RawBatchGetRequest.keys) +} +inline const ::google::protobuf::RepeatedPtrField& +RawBatchGetRequest::keys() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:kvrpcpb.RawBatchGetRequest.keys) - return _impl_.keys_; + return _internal_keys(); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -RawBatchGetRequest::mutable_keys() { +inline ::google::protobuf::RepeatedPtrField* +RawBatchGetRequest::mutable_keys() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:kvrpcpb.RawBatchGetRequest.keys) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_keys(); +} +inline const ::google::protobuf::RepeatedPtrField& +RawBatchGetRequest::_internal_keys() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.keys_; +} +inline ::google::protobuf::RepeatedPtrField* +RawBatchGetRequest::_internal_mutable_keys() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.keys_; } // string cf = 3; inline void RawBatchGetRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawBatchGetRequest::cf() const { +inline const std::string& RawBatchGetRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchGetRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawBatchGetRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawBatchGetRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchGetRequest.cf) } -inline std::string* RawBatchGetRequest::mutable_cf() { +inline std::string* RawBatchGetRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchGetRequest.cf) return _s; } inline const std::string& RawBatchGetRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawBatchGetRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawBatchGetRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawBatchGetRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchGetRequest.cf) return _impl_.cf_.Release(); } -inline void RawBatchGetRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchGetRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchGetRequest.cf) } @@ -6275,550 +7079,595 @@ inline void RawBatchGetRequest::set_allocated_cf(std::string* cf) { // RawBatchGetResponse // .errorpb.Error region_error = 1; -inline bool RawBatchGetResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawBatchGetResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawBatchGetResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawBatchGetResponse::region_error() const { +inline const ::errorpb::Error& RawBatchGetResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchGetResponse.region_error) return _internal_region_error(); } -inline void RawBatchGetResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawBatchGetResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawBatchGetResponse.region_error) } inline ::errorpb::Error* RawBatchGetResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawBatchGetResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchGetResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawBatchGetResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawBatchGetResponse::mutable_region_error() { +inline ::errorpb::Error* RawBatchGetResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchGetResponse.region_error) return _msg; } -inline void RawBatchGetResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawBatchGetResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchGetResponse.region_error) } // repeated .kvrpcpb.KvPair pairs = 2; inline int RawBatchGetResponse::_internal_pairs_size() const { - return _impl_.pairs_.size(); + return _internal_pairs().size(); } inline int RawBatchGetResponse::pairs_size() const { return _internal_pairs_size(); } inline void RawBatchGetResponse::clear_pairs() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.pairs_.Clear(); } -inline ::kvrpcpb::KvPair* RawBatchGetResponse::mutable_pairs(int index) { +inline ::kvrpcpb::KvPair* RawBatchGetResponse::mutable_pairs(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchGetResponse.pairs) - return _impl_.pairs_.Mutable(index); + return _internal_mutable_pairs()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >* -RawBatchGetResponse::mutable_pairs() { +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* RawBatchGetResponse::mutable_pairs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:kvrpcpb.RawBatchGetResponse.pairs) - return &_impl_.pairs_; -} -inline const ::kvrpcpb::KvPair& RawBatchGetResponse::_internal_pairs(int index) const { - return _impl_.pairs_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_pairs(); } -inline const ::kvrpcpb::KvPair& RawBatchGetResponse::pairs(int index) const { +inline const ::kvrpcpb::KvPair& RawBatchGetResponse::pairs(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchGetResponse.pairs) - return _internal_pairs(index); + return _internal_pairs().Get(index); } -inline ::kvrpcpb::KvPair* RawBatchGetResponse::_internal_add_pairs() { - return _impl_.pairs_.Add(); -} -inline ::kvrpcpb::KvPair* RawBatchGetResponse::add_pairs() { - ::kvrpcpb::KvPair* _add = _internal_add_pairs(); +inline ::kvrpcpb::KvPair* RawBatchGetResponse::add_pairs() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::kvrpcpb::KvPair* _add = _internal_mutable_pairs()->Add(); // @@protoc_insertion_point(field_add:kvrpcpb.RawBatchGetResponse.pairs) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >& -RawBatchGetResponse::pairs() const { +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& RawBatchGetResponse::pairs() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:kvrpcpb.RawBatchGetResponse.pairs) + return _internal_pairs(); +} +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& +RawBatchGetResponse::_internal_pairs() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.pairs_; } +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* +RawBatchGetResponse::_internal_mutable_pairs() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.pairs_; +} // ------------------------------------------------------------------- // RawPutRequest // .kvrpcpb.Context context = 1; -inline bool RawPutRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawPutRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawPutRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawPutRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawPutRequest::context() const { +inline const ::kvrpcpb::Context& RawPutRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutRequest.context) return _internal_context(); } -inline void RawPutRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawPutRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawPutRequest.context) } inline ::kvrpcpb::Context* RawPutRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawPutRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawPutRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawPutRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawPutRequest::mutable_context() { +inline ::kvrpcpb::Context* RawPutRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawPutRequest.context) return _msg; } -inline void RawPutRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawPutRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawPutRequest.context) } // bytes key = 2; inline void RawPutRequest::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_.ClearToEmpty(); } -inline const std::string& RawPutRequest::key() const { +inline const std::string& RawPutRequest::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutRequest.key) return _internal_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawPutRequest::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawPutRequest::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawPutRequest.key) } -inline std::string* RawPutRequest::mutable_key() { +inline std::string* RawPutRequest::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawPutRequest.key) return _s; } inline const std::string& RawPutRequest::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.key_.Get(); } inline void RawPutRequest::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(value, GetArena()); } inline std::string* RawPutRequest::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.key_.Mutable( GetArena()); } inline std::string* RawPutRequest::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawPutRequest.key) return _impl_.key_.Release(); } -inline void RawPutRequest::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawPutRequest::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawPutRequest.key) } // bytes value = 3; inline void RawPutRequest::clear_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.value_.ClearToEmpty(); } -inline const std::string& RawPutRequest::value() const { +inline const std::string& RawPutRequest::value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutRequest.value) return _internal_value(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawPutRequest::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawPutRequest::set_value(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawPutRequest.value) } -inline std::string* RawPutRequest::mutable_value() { +inline std::string* RawPutRequest::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_value(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawPutRequest.value) return _s; } inline const std::string& RawPutRequest::_internal_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.value_.Get(); } inline void RawPutRequest::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.Set(value, GetArena()); } inline std::string* RawPutRequest::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.value_.Mutable( GetArena()); } inline std::string* RawPutRequest::release_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawPutRequest.value) return _impl_.value_.Release(); } inline void RawPutRequest::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - - } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.value_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawPutRequest.value) } // string cf = 4; inline void RawPutRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawPutRequest::cf() const { +inline const std::string& RawPutRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawPutRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawPutRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawPutRequest.cf) } -inline std::string* RawPutRequest::mutable_cf() { +inline std::string* RawPutRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawPutRequest.cf) return _s; } inline const std::string& RawPutRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawPutRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawPutRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawPutRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawPutRequest.cf) return _impl_.cf_.Release(); } -inline void RawPutRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawPutRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawPutRequest.cf) } // uint64 ttl = 5; inline void RawPutRequest::clear_ttl() { - _impl_.ttl_ = uint64_t{0u}; -} -inline uint64_t RawPutRequest::_internal_ttl() const { - return _impl_.ttl_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.ttl_ = ::uint64_t{0u}; } -inline uint64_t RawPutRequest::ttl() const { +inline ::uint64_t RawPutRequest::ttl() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutRequest.ttl) return _internal_ttl(); } -inline void RawPutRequest::_internal_set_ttl(uint64_t value) { - - _impl_.ttl_ = value; -} -inline void RawPutRequest::set_ttl(uint64_t value) { +inline void RawPutRequest::set_ttl(::uint64_t value) { _internal_set_ttl(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawPutRequest.ttl) } +inline ::uint64_t RawPutRequest::_internal_ttl() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.ttl_; +} +inline void RawPutRequest::_internal_set_ttl(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.ttl_ = value; +} // bool for_cas = 6; inline void RawPutRequest::clear_for_cas() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.for_cas_ = false; } -inline bool RawPutRequest::_internal_for_cas() const { - return _impl_.for_cas_; -} inline bool RawPutRequest::for_cas() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutRequest.for_cas) return _internal_for_cas(); } -inline void RawPutRequest::_internal_set_for_cas(bool value) { - - _impl_.for_cas_ = value; -} inline void RawPutRequest::set_for_cas(bool value) { _internal_set_for_cas(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawPutRequest.for_cas) } +inline bool RawPutRequest::_internal_for_cas() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.for_cas_; +} +inline void RawPutRequest::_internal_set_for_cas(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.for_cas_ = value; +} // ------------------------------------------------------------------- // RawPutResponse // .errorpb.Error region_error = 1; -inline bool RawPutResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawPutResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawPutResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawPutResponse::region_error() const { +inline const ::errorpb::Error& RawPutResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutResponse.region_error) return _internal_region_error(); } -inline void RawPutResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawPutResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawPutResponse.region_error) } inline ::errorpb::Error* RawPutResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawPutResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawPutResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawPutResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawPutResponse::mutable_region_error() { +inline ::errorpb::Error* RawPutResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawPutResponse.region_error) return _msg; } -inline void RawPutResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawPutResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawPutResponse.region_error) } // string error = 2; inline void RawPutResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawPutResponse::error() const { +inline const std::string& RawPutResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawPutResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawPutResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawPutResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawPutResponse.error) } -inline std::string* RawPutResponse::mutable_error() { +inline std::string* RawPutResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawPutResponse.error) return _s; } inline const std::string& RawPutResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawPutResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawPutResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawPutResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawPutResponse.error) return _impl_.error_.Release(); } -inline void RawPutResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawPutResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawPutResponse.error) } @@ -6827,361 +7676,394 @@ inline void RawPutResponse::set_allocated_error(std::string* error) { // RawBatchPutRequest // .kvrpcpb.Context context = 1; -inline bool RawBatchPutRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawBatchPutRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawBatchPutRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawBatchPutRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawBatchPutRequest::context() const { +inline const ::kvrpcpb::Context& RawBatchPutRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchPutRequest.context) return _internal_context(); } -inline void RawBatchPutRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawBatchPutRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawBatchPutRequest.context) } inline ::kvrpcpb::Context* RawBatchPutRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawBatchPutRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchPutRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawBatchPutRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawBatchPutRequest::mutable_context() { +inline ::kvrpcpb::Context* RawBatchPutRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchPutRequest.context) return _msg; } -inline void RawBatchPutRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawBatchPutRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchPutRequest.context) } // repeated .kvrpcpb.KvPair pairs = 2; inline int RawBatchPutRequest::_internal_pairs_size() const { - return _impl_.pairs_.size(); + return _internal_pairs().size(); } inline int RawBatchPutRequest::pairs_size() const { return _internal_pairs_size(); } inline void RawBatchPutRequest::clear_pairs() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.pairs_.Clear(); } -inline ::kvrpcpb::KvPair* RawBatchPutRequest::mutable_pairs(int index) { +inline ::kvrpcpb::KvPair* RawBatchPutRequest::mutable_pairs(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchPutRequest.pairs) - return _impl_.pairs_.Mutable(index); + return _internal_mutable_pairs()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >* -RawBatchPutRequest::mutable_pairs() { +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* RawBatchPutRequest::mutable_pairs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:kvrpcpb.RawBatchPutRequest.pairs) - return &_impl_.pairs_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_pairs(); } -inline const ::kvrpcpb::KvPair& RawBatchPutRequest::_internal_pairs(int index) const { - return _impl_.pairs_.Get(index); -} -inline const ::kvrpcpb::KvPair& RawBatchPutRequest::pairs(int index) const { +inline const ::kvrpcpb::KvPair& RawBatchPutRequest::pairs(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchPutRequest.pairs) - return _internal_pairs(index); -} -inline ::kvrpcpb::KvPair* RawBatchPutRequest::_internal_add_pairs() { - return _impl_.pairs_.Add(); + return _internal_pairs().Get(index); } -inline ::kvrpcpb::KvPair* RawBatchPutRequest::add_pairs() { - ::kvrpcpb::KvPair* _add = _internal_add_pairs(); +inline ::kvrpcpb::KvPair* RawBatchPutRequest::add_pairs() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::kvrpcpb::KvPair* _add = _internal_mutable_pairs()->Add(); // @@protoc_insertion_point(field_add:kvrpcpb.RawBatchPutRequest.pairs) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >& -RawBatchPutRequest::pairs() const { +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& RawBatchPutRequest::pairs() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:kvrpcpb.RawBatchPutRequest.pairs) + return _internal_pairs(); +} +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& +RawBatchPutRequest::_internal_pairs() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.pairs_; } +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* +RawBatchPutRequest::_internal_mutable_pairs() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.pairs_; +} // string cf = 3; inline void RawBatchPutRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawBatchPutRequest::cf() const { +inline const std::string& RawBatchPutRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchPutRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawBatchPutRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawBatchPutRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchPutRequest.cf) } -inline std::string* RawBatchPutRequest::mutable_cf() { +inline std::string* RawBatchPutRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchPutRequest.cf) return _s; } inline const std::string& RawBatchPutRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawBatchPutRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawBatchPutRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawBatchPutRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchPutRequest.cf) return _impl_.cf_.Release(); } -inline void RawBatchPutRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchPutRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchPutRequest.cf) } // uint64 ttl = 4; inline void RawBatchPutRequest::clear_ttl() { - _impl_.ttl_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.ttl_ = ::uint64_t{0u}; } -inline uint64_t RawBatchPutRequest::_internal_ttl() const { - return _impl_.ttl_; -} -inline uint64_t RawBatchPutRequest::ttl() const { +inline ::uint64_t RawBatchPutRequest::ttl() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchPutRequest.ttl) return _internal_ttl(); } -inline void RawBatchPutRequest::_internal_set_ttl(uint64_t value) { - - _impl_.ttl_ = value; -} -inline void RawBatchPutRequest::set_ttl(uint64_t value) { +inline void RawBatchPutRequest::set_ttl(::uint64_t value) { _internal_set_ttl(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchPutRequest.ttl) } +inline ::uint64_t RawBatchPutRequest::_internal_ttl() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.ttl_; +} +inline void RawBatchPutRequest::_internal_set_ttl(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.ttl_ = value; +} // bool for_cas = 5; inline void RawBatchPutRequest::clear_for_cas() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.for_cas_ = false; } -inline bool RawBatchPutRequest::_internal_for_cas() const { - return _impl_.for_cas_; -} inline bool RawBatchPutRequest::for_cas() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchPutRequest.for_cas) return _internal_for_cas(); } -inline void RawBatchPutRequest::_internal_set_for_cas(bool value) { - - _impl_.for_cas_ = value; -} inline void RawBatchPutRequest::set_for_cas(bool value) { _internal_set_for_cas(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchPutRequest.for_cas) } +inline bool RawBatchPutRequest::_internal_for_cas() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.for_cas_; +} +inline void RawBatchPutRequest::_internal_set_for_cas(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.for_cas_ = value; +} // ------------------------------------------------------------------- // RawBatchPutResponse // .errorpb.Error region_error = 1; -inline bool RawBatchPutResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawBatchPutResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawBatchPutResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawBatchPutResponse::region_error() const { +inline const ::errorpb::Error& RawBatchPutResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchPutResponse.region_error) return _internal_region_error(); } -inline void RawBatchPutResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawBatchPutResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawBatchPutResponse.region_error) } inline ::errorpb::Error* RawBatchPutResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawBatchPutResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchPutResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawBatchPutResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawBatchPutResponse::mutable_region_error() { +inline ::errorpb::Error* RawBatchPutResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchPutResponse.region_error) return _msg; } -inline void RawBatchPutResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawBatchPutResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchPutResponse.region_error) } // string error = 2; inline void RawBatchPutResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawBatchPutResponse::error() const { +inline const std::string& RawBatchPutResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchPutResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawBatchPutResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawBatchPutResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchPutResponse.error) } -inline std::string* RawBatchPutResponse::mutable_error() { +inline std::string* RawBatchPutResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchPutResponse.error) return _s; } inline const std::string& RawBatchPutResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawBatchPutResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawBatchPutResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawBatchPutResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchPutResponse.error) return _impl_.error_.Release(); } -inline void RawBatchPutResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchPutResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchPutResponse.error) } @@ -7190,351 +8072,375 @@ inline void RawBatchPutResponse::set_allocated_error(std::string* error) { // RawDeleteRequest // .kvrpcpb.Context context = 1; -inline bool RawDeleteRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawDeleteRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawDeleteRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawDeleteRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawDeleteRequest::context() const { +inline const ::kvrpcpb::Context& RawDeleteRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRequest.context) return _internal_context(); } -inline void RawDeleteRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawDeleteRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawDeleteRequest.context) } inline ::kvrpcpb::Context* RawDeleteRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawDeleteRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawDeleteRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawDeleteRequest::mutable_context() { +inline ::kvrpcpb::Context* RawDeleteRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRequest.context) return _msg; } -inline void RawDeleteRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawDeleteRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRequest.context) } // bytes key = 2; inline void RawDeleteRequest::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_.ClearToEmpty(); } -inline const std::string& RawDeleteRequest::key() const { +inline const std::string& RawDeleteRequest::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRequest.key) return _internal_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawDeleteRequest::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawDeleteRequest::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteRequest.key) } -inline std::string* RawDeleteRequest::mutable_key() { +inline std::string* RawDeleteRequest::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRequest.key) return _s; } inline const std::string& RawDeleteRequest::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.key_.Get(); } inline void RawDeleteRequest::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(value, GetArena()); } inline std::string* RawDeleteRequest::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.key_.Mutable( GetArena()); } inline std::string* RawDeleteRequest::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRequest.key) return _impl_.key_.Release(); } -inline void RawDeleteRequest::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRequest::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRequest.key) } // string cf = 3; inline void RawDeleteRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawDeleteRequest::cf() const { +inline const std::string& RawDeleteRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawDeleteRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawDeleteRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteRequest.cf) } -inline std::string* RawDeleteRequest::mutable_cf() { +inline std::string* RawDeleteRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRequest.cf) return _s; } inline const std::string& RawDeleteRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawDeleteRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawDeleteRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawDeleteRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRequest.cf) return _impl_.cf_.Release(); } -inline void RawDeleteRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRequest.cf) } // bool for_cas = 4; inline void RawDeleteRequest::clear_for_cas() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.for_cas_ = false; } -inline bool RawDeleteRequest::_internal_for_cas() const { - return _impl_.for_cas_; -} inline bool RawDeleteRequest::for_cas() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRequest.for_cas) return _internal_for_cas(); } -inline void RawDeleteRequest::_internal_set_for_cas(bool value) { - - _impl_.for_cas_ = value; -} inline void RawDeleteRequest::set_for_cas(bool value) { _internal_set_for_cas(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteRequest.for_cas) } +inline bool RawDeleteRequest::_internal_for_cas() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.for_cas_; +} +inline void RawDeleteRequest::_internal_set_for_cas(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.for_cas_ = value; +} // ------------------------------------------------------------------- // RawDeleteResponse // .errorpb.Error region_error = 1; -inline bool RawDeleteResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawDeleteResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawDeleteResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawDeleteResponse::region_error() const { +inline const ::errorpb::Error& RawDeleteResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteResponse.region_error) return _internal_region_error(); } -inline void RawDeleteResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawDeleteResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawDeleteResponse.region_error) } inline ::errorpb::Error* RawDeleteResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawDeleteResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawDeleteResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawDeleteResponse::mutable_region_error() { +inline ::errorpb::Error* RawDeleteResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteResponse.region_error) return _msg; } -inline void RawDeleteResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawDeleteResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteResponse.region_error) } // string error = 2; inline void RawDeleteResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawDeleteResponse::error() const { +inline const std::string& RawDeleteResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawDeleteResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawDeleteResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteResponse.error) } -inline std::string* RawDeleteResponse::mutable_error() { +inline std::string* RawDeleteResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteResponse.error) return _s; } inline const std::string& RawDeleteResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawDeleteResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawDeleteResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawDeleteResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteResponse.error) return _impl_.error_.Release(); } -inline void RawDeleteResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteResponse.error) } @@ -7543,217 +8449,252 @@ inline void RawDeleteResponse::set_allocated_error(std::string* error) { // RawBatchDeleteRequest // .kvrpcpb.Context context = 1; -inline bool RawBatchDeleteRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawBatchDeleteRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawBatchDeleteRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawBatchDeleteRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawBatchDeleteRequest::context() const { +inline const ::kvrpcpb::Context& RawBatchDeleteRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchDeleteRequest.context) return _internal_context(); } -inline void RawBatchDeleteRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawBatchDeleteRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawBatchDeleteRequest.context) } inline ::kvrpcpb::Context* RawBatchDeleteRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawBatchDeleteRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchDeleteRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawBatchDeleteRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawBatchDeleteRequest::mutable_context() { +inline ::kvrpcpb::Context* RawBatchDeleteRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchDeleteRequest.context) return _msg; } -inline void RawBatchDeleteRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawBatchDeleteRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchDeleteRequest.context) } // repeated bytes keys = 2; inline int RawBatchDeleteRequest::_internal_keys_size() const { - return _impl_.keys_.size(); + return _internal_keys().size(); } inline int RawBatchDeleteRequest::keys_size() const { return _internal_keys_size(); } inline void RawBatchDeleteRequest::clear_keys() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.keys_.Clear(); } -inline std::string* RawBatchDeleteRequest::add_keys() { - std::string* _s = _internal_add_keys(); +inline std::string* RawBatchDeleteRequest::add_keys() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_keys()->Add(); // @@protoc_insertion_point(field_add_mutable:kvrpcpb.RawBatchDeleteRequest.keys) return _s; } -inline const std::string& RawBatchDeleteRequest::_internal_keys(int index) const { - return _impl_.keys_.Get(index); -} -inline const std::string& RawBatchDeleteRequest::keys(int index) const { +inline const std::string& RawBatchDeleteRequest::keys(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchDeleteRequest.keys) - return _internal_keys(index); + return _internal_keys().Get(index); } -inline std::string* RawBatchDeleteRequest::mutable_keys(int index) { +inline std::string* RawBatchDeleteRequest::mutable_keys(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchDeleteRequest.keys) - return _impl_.keys_.Mutable(index); + return _internal_mutable_keys()->Mutable(index); } inline void RawBatchDeleteRequest::set_keys(int index, const std::string& value) { - _impl_.keys_.Mutable(index)->assign(value); + _internal_mutable_keys()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchDeleteRequest.keys) } inline void RawBatchDeleteRequest::set_keys(int index, std::string&& value) { - _impl_.keys_.Mutable(index)->assign(std::move(value)); + _internal_mutable_keys()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchDeleteRequest.keys) } inline void RawBatchDeleteRequest::set_keys(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.keys_.Mutable(index)->assign(value); + ABSL_DCHECK(value != nullptr); + _internal_mutable_keys()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:kvrpcpb.RawBatchDeleteRequest.keys) } -inline void RawBatchDeleteRequest::set_keys(int index, const void* value, size_t size) { - _impl_.keys_.Mutable(index)->assign( - reinterpret_cast(value), size); +inline void RawBatchDeleteRequest::set_keys(int index, const void* value, + std::size_t size) { + _internal_mutable_keys()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:kvrpcpb.RawBatchDeleteRequest.keys) } -inline std::string* RawBatchDeleteRequest::_internal_add_keys() { - return _impl_.keys_.Add(); +inline void RawBatchDeleteRequest::set_keys(int index, absl::string_view value) { + _internal_mutable_keys()->Mutable(index)->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_set_string_piece:kvrpcpb.RawBatchDeleteRequest.keys) } inline void RawBatchDeleteRequest::add_keys(const std::string& value) { - _impl_.keys_.Add()->assign(value); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign(value); // @@protoc_insertion_point(field_add:kvrpcpb.RawBatchDeleteRequest.keys) } inline void RawBatchDeleteRequest::add_keys(std::string&& value) { - _impl_.keys_.Add(std::move(value)); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add(std::move(value)); // @@protoc_insertion_point(field_add:kvrpcpb.RawBatchDeleteRequest.keys) } inline void RawBatchDeleteRequest::add_keys(const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.keys_.Add()->assign(value); + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:kvrpcpb.RawBatchDeleteRequest.keys) } -inline void RawBatchDeleteRequest::add_keys(const void* value, size_t size) { - _impl_.keys_.Add()->assign(reinterpret_cast(value), size); +inline void RawBatchDeleteRequest::add_keys(const void* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:kvrpcpb.RawBatchDeleteRequest.keys) } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -RawBatchDeleteRequest::keys() const { +inline void RawBatchDeleteRequest::add_keys(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_keys()->Add()->assign(value.data(), value.size()); + // @@protoc_insertion_point(field_add_string_piece:kvrpcpb.RawBatchDeleteRequest.keys) +} +inline const ::google::protobuf::RepeatedPtrField& +RawBatchDeleteRequest::keys() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:kvrpcpb.RawBatchDeleteRequest.keys) - return _impl_.keys_; + return _internal_keys(); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -RawBatchDeleteRequest::mutable_keys() { +inline ::google::protobuf::RepeatedPtrField* +RawBatchDeleteRequest::mutable_keys() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:kvrpcpb.RawBatchDeleteRequest.keys) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_keys(); +} +inline const ::google::protobuf::RepeatedPtrField& +RawBatchDeleteRequest::_internal_keys() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.keys_; +} +inline ::google::protobuf::RepeatedPtrField* +RawBatchDeleteRequest::_internal_mutable_keys() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.keys_; } // string cf = 3; inline void RawBatchDeleteRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawBatchDeleteRequest::cf() const { +inline const std::string& RawBatchDeleteRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchDeleteRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawBatchDeleteRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawBatchDeleteRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchDeleteRequest.cf) } -inline std::string* RawBatchDeleteRequest::mutable_cf() { +inline std::string* RawBatchDeleteRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchDeleteRequest.cf) return _s; } inline const std::string& RawBatchDeleteRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawBatchDeleteRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawBatchDeleteRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawBatchDeleteRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchDeleteRequest.cf) return _impl_.cf_.Release(); } -inline void RawBatchDeleteRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchDeleteRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchDeleteRequest.cf) } @@ -7762,137 +8703,146 @@ inline void RawBatchDeleteRequest::set_allocated_cf(std::string* cf) { // RawBatchDeleteResponse // .errorpb.Error region_error = 1; -inline bool RawBatchDeleteResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawBatchDeleteResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawBatchDeleteResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawBatchDeleteResponse::region_error() const { +inline const ::errorpb::Error& RawBatchDeleteResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchDeleteResponse.region_error) return _internal_region_error(); } -inline void RawBatchDeleteResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawBatchDeleteResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawBatchDeleteResponse.region_error) } inline ::errorpb::Error* RawBatchDeleteResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawBatchDeleteResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchDeleteResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawBatchDeleteResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawBatchDeleteResponse::mutable_region_error() { +inline ::errorpb::Error* RawBatchDeleteResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchDeleteResponse.region_error) return _msg; } -inline void RawBatchDeleteResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawBatchDeleteResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchDeleteResponse.region_error) } // string error = 2; inline void RawBatchDeleteResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawBatchDeleteResponse::error() const { +inline const std::string& RawBatchDeleteResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawBatchDeleteResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawBatchDeleteResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawBatchDeleteResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawBatchDeleteResponse.error) } -inline std::string* RawBatchDeleteResponse::mutable_error() { +inline std::string* RawBatchDeleteResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawBatchDeleteResponse.error) return _s; } inline const std::string& RawBatchDeleteResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawBatchDeleteResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawBatchDeleteResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawBatchDeleteResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawBatchDeleteResponse.error) return _impl_.error_.Release(); } -inline void RawBatchDeleteResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawBatchDeleteResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawBatchDeleteResponse.error) } @@ -7901,242 +8851,257 @@ inline void RawBatchDeleteResponse::set_allocated_error(std::string* error) { // RawDeleteRangeRequest // .kvrpcpb.Context context = 1; -inline bool RawDeleteRangeRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawDeleteRangeRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawDeleteRangeRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawDeleteRangeRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawDeleteRangeRequest::context() const { +inline const ::kvrpcpb::Context& RawDeleteRangeRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRangeRequest.context) return _internal_context(); } -inline void RawDeleteRangeRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawDeleteRangeRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawDeleteRangeRequest.context) } inline ::kvrpcpb::Context* RawDeleteRangeRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawDeleteRangeRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRangeRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawDeleteRangeRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawDeleteRangeRequest::mutable_context() { +inline ::kvrpcpb::Context* RawDeleteRangeRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRangeRequest.context) return _msg; } -inline void RawDeleteRangeRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawDeleteRangeRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRangeRequest.context) } // bytes start_key = 2; inline void RawDeleteRangeRequest::clear_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.start_key_.ClearToEmpty(); } -inline const std::string& RawDeleteRangeRequest::start_key() const { +inline const std::string& RawDeleteRangeRequest::start_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRangeRequest.start_key) return _internal_start_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawDeleteRangeRequest::set_start_key(ArgT0&& arg0, ArgT... args) { - - _impl_.start_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawDeleteRangeRequest::set_start_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteRangeRequest.start_key) } -inline std::string* RawDeleteRangeRequest::mutable_start_key() { +inline std::string* RawDeleteRangeRequest::mutable_start_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_start_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRangeRequest.start_key) return _s; } inline const std::string& RawDeleteRangeRequest::_internal_start_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.start_key_.Get(); } inline void RawDeleteRangeRequest::_internal_set_start_key(const std::string& value) { - - _impl_.start_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.Set(value, GetArena()); } inline std::string* RawDeleteRangeRequest::_internal_mutable_start_key() { - - return _impl_.start_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.start_key_.Mutable( GetArena()); } inline std::string* RawDeleteRangeRequest::release_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRangeRequest.start_key) return _impl_.start_key_.Release(); } -inline void RawDeleteRangeRequest::set_allocated_start_key(std::string* start_key) { - if (start_key != nullptr) { - - } else { - - } - _impl_.start_key_.SetAllocated(start_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.start_key_.IsDefault()) { - _impl_.start_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRangeRequest::set_allocated_start_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.start_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.start_key_.IsDefault()) { + _impl_.start_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRangeRequest.start_key) } // bytes end_key = 3; inline void RawDeleteRangeRequest::clear_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.end_key_.ClearToEmpty(); } -inline const std::string& RawDeleteRangeRequest::end_key() const { +inline const std::string& RawDeleteRangeRequest::end_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRangeRequest.end_key) return _internal_end_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawDeleteRangeRequest::set_end_key(ArgT0&& arg0, ArgT... args) { - - _impl_.end_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawDeleteRangeRequest::set_end_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteRangeRequest.end_key) } -inline std::string* RawDeleteRangeRequest::mutable_end_key() { +inline std::string* RawDeleteRangeRequest::mutable_end_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_end_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRangeRequest.end_key) return _s; } inline const std::string& RawDeleteRangeRequest::_internal_end_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.end_key_.Get(); } inline void RawDeleteRangeRequest::_internal_set_end_key(const std::string& value) { - - _impl_.end_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.Set(value, GetArena()); } inline std::string* RawDeleteRangeRequest::_internal_mutable_end_key() { - - return _impl_.end_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.end_key_.Mutable( GetArena()); } inline std::string* RawDeleteRangeRequest::release_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRangeRequest.end_key) return _impl_.end_key_.Release(); } -inline void RawDeleteRangeRequest::set_allocated_end_key(std::string* end_key) { - if (end_key != nullptr) { - - } else { - - } - _impl_.end_key_.SetAllocated(end_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.end_key_.IsDefault()) { - _impl_.end_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRangeRequest::set_allocated_end_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.end_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.end_key_.IsDefault()) { + _impl_.end_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRangeRequest.end_key) } // string cf = 4; inline void RawDeleteRangeRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawDeleteRangeRequest::cf() const { +inline const std::string& RawDeleteRangeRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRangeRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawDeleteRangeRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawDeleteRangeRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteRangeRequest.cf) } -inline std::string* RawDeleteRangeRequest::mutable_cf() { +inline std::string* RawDeleteRangeRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRangeRequest.cf) return _s; } inline const std::string& RawDeleteRangeRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawDeleteRangeRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawDeleteRangeRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawDeleteRangeRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRangeRequest.cf) return _impl_.cf_.Release(); } -inline void RawDeleteRangeRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRangeRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRangeRequest.cf) } @@ -8145,137 +9110,146 @@ inline void RawDeleteRangeRequest::set_allocated_cf(std::string* cf) { // RawDeleteRangeResponse // .errorpb.Error region_error = 1; -inline bool RawDeleteRangeResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawDeleteRangeResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawDeleteRangeResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawDeleteRangeResponse::region_error() const { +inline const ::errorpb::Error& RawDeleteRangeResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRangeResponse.region_error) return _internal_region_error(); } -inline void RawDeleteRangeResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawDeleteRangeResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawDeleteRangeResponse.region_error) } inline ::errorpb::Error* RawDeleteRangeResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawDeleteRangeResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRangeResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawDeleteRangeResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawDeleteRangeResponse::mutable_region_error() { +inline ::errorpb::Error* RawDeleteRangeResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRangeResponse.region_error) return _msg; } -inline void RawDeleteRangeResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawDeleteRangeResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRangeResponse.region_error) } // string error = 2; inline void RawDeleteRangeResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawDeleteRangeResponse::error() const { +inline const std::string& RawDeleteRangeResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawDeleteRangeResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawDeleteRangeResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawDeleteRangeResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawDeleteRangeResponse.error) } -inline std::string* RawDeleteRangeResponse::mutable_error() { +inline std::string* RawDeleteRangeResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawDeleteRangeResponse.error) return _s; } inline const std::string& RawDeleteRangeResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawDeleteRangeResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawDeleteRangeResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawDeleteRangeResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawDeleteRangeResponse.error) return _impl_.error_.Release(); } -inline void RawDeleteRangeResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawDeleteRangeResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawDeleteRangeResponse.error) } @@ -8284,581 +9258,626 @@ inline void RawDeleteRangeResponse::set_allocated_error(std::string* error) { // RawCASRequest // .kvrpcpb.Context context = 1; -inline bool RawCASRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawCASRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawCASRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawCASRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawCASRequest::context() const { +inline const ::kvrpcpb::Context& RawCASRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.context) return _internal_context(); } -inline void RawCASRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawCASRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawCASRequest.context) } inline ::kvrpcpb::Context* RawCASRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawCASRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawCASRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawCASRequest::mutable_context() { +inline ::kvrpcpb::Context* RawCASRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASRequest.context) return _msg; } -inline void RawCASRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawCASRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASRequest.context) } // bytes key = 2; inline void RawCASRequest::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_.ClearToEmpty(); } -inline const std::string& RawCASRequest::key() const { +inline const std::string& RawCASRequest::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.key) return _internal_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCASRequest::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCASRequest::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASRequest.key) } -inline std::string* RawCASRequest::mutable_key() { +inline std::string* RawCASRequest::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASRequest.key) return _s; } inline const std::string& RawCASRequest::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.key_.Get(); } inline void RawCASRequest::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(value, GetArena()); } inline std::string* RawCASRequest::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.key_.Mutable( GetArena()); } inline std::string* RawCASRequest::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASRequest.key) return _impl_.key_.Release(); } -inline void RawCASRequest::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCASRequest::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASRequest.key) } // bytes value = 3; inline void RawCASRequest::clear_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.value_.ClearToEmpty(); } -inline const std::string& RawCASRequest::value() const { +inline const std::string& RawCASRequest::value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.value) return _internal_value(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCASRequest::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCASRequest::set_value(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASRequest.value) } -inline std::string* RawCASRequest::mutable_value() { +inline std::string* RawCASRequest::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_value(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASRequest.value) return _s; } inline const std::string& RawCASRequest::_internal_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.value_.Get(); } inline void RawCASRequest::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.Set(value, GetArena()); } inline std::string* RawCASRequest::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.value_.Mutable( GetArena()); } inline std::string* RawCASRequest::release_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASRequest.value) return _impl_.value_.Release(); } inline void RawCASRequest::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - - } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.value_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASRequest.value) } // bool previous_not_exist = 4; inline void RawCASRequest::clear_previous_not_exist() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.previous_not_exist_ = false; } -inline bool RawCASRequest::_internal_previous_not_exist() const { - return _impl_.previous_not_exist_; -} inline bool RawCASRequest::previous_not_exist() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.previous_not_exist) return _internal_previous_not_exist(); } -inline void RawCASRequest::_internal_set_previous_not_exist(bool value) { - - _impl_.previous_not_exist_ = value; -} inline void RawCASRequest::set_previous_not_exist(bool value) { _internal_set_previous_not_exist(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASRequest.previous_not_exist) } +inline bool RawCASRequest::_internal_previous_not_exist() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.previous_not_exist_; +} +inline void RawCASRequest::_internal_set_previous_not_exist(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.previous_not_exist_ = value; +} // bytes previous_value = 5; inline void RawCASRequest::clear_previous_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.previous_value_.ClearToEmpty(); } -inline const std::string& RawCASRequest::previous_value() const { +inline const std::string& RawCASRequest::previous_value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.previous_value) return _internal_previous_value(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCASRequest::set_previous_value(ArgT0&& arg0, ArgT... args) { - - _impl_.previous_value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCASRequest::set_previous_value(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.previous_value_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASRequest.previous_value) } -inline std::string* RawCASRequest::mutable_previous_value() { +inline std::string* RawCASRequest::mutable_previous_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_previous_value(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASRequest.previous_value) return _s; } inline const std::string& RawCASRequest::_internal_previous_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.previous_value_.Get(); } inline void RawCASRequest::_internal_set_previous_value(const std::string& value) { - - _impl_.previous_value_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.previous_value_.Set(value, GetArena()); } inline std::string* RawCASRequest::_internal_mutable_previous_value() { - - return _impl_.previous_value_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.previous_value_.Mutable( GetArena()); } inline std::string* RawCASRequest::release_previous_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASRequest.previous_value) return _impl_.previous_value_.Release(); } -inline void RawCASRequest::set_allocated_previous_value(std::string* previous_value) { - if (previous_value != nullptr) { - - } else { - - } - _impl_.previous_value_.SetAllocated(previous_value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.previous_value_.IsDefault()) { - _impl_.previous_value_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCASRequest::set_allocated_previous_value(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.previous_value_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.previous_value_.IsDefault()) { + _impl_.previous_value_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASRequest.previous_value) } // string cf = 6; inline void RawCASRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawCASRequest::cf() const { +inline const std::string& RawCASRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCASRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCASRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASRequest.cf) } -inline std::string* RawCASRequest::mutable_cf() { +inline std::string* RawCASRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASRequest.cf) return _s; } inline const std::string& RawCASRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawCASRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawCASRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawCASRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASRequest.cf) return _impl_.cf_.Release(); } -inline void RawCASRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCASRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASRequest.cf) } // uint64 ttl = 7; inline void RawCASRequest::clear_ttl() { - _impl_.ttl_ = uint64_t{0u}; -} -inline uint64_t RawCASRequest::_internal_ttl() const { - return _impl_.ttl_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.ttl_ = ::uint64_t{0u}; } -inline uint64_t RawCASRequest::ttl() const { +inline ::uint64_t RawCASRequest::ttl() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.ttl) return _internal_ttl(); } -inline void RawCASRequest::_internal_set_ttl(uint64_t value) { - - _impl_.ttl_ = value; -} -inline void RawCASRequest::set_ttl(uint64_t value) { +inline void RawCASRequest::set_ttl(::uint64_t value) { _internal_set_ttl(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASRequest.ttl) } +inline ::uint64_t RawCASRequest::_internal_ttl() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.ttl_; +} +inline void RawCASRequest::_internal_set_ttl(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.ttl_ = value; +} // bool delete = 8; inline void RawCASRequest::clear_delete_() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.delete__ = false; } -inline bool RawCASRequest::_internal_delete_() const { - return _impl_.delete__; -} inline bool RawCASRequest::delete_() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASRequest.delete) return _internal_delete_(); } -inline void RawCASRequest::_internal_set_delete_(bool value) { - - _impl_.delete__ = value; -} inline void RawCASRequest::set_delete_(bool value) { _internal_set_delete_(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASRequest.delete) } +inline bool RawCASRequest::_internal_delete_() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.delete__; +} +inline void RawCASRequest::_internal_set_delete_(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.delete__ = value; +} // ------------------------------------------------------------------- // RawCASResponse // .errorpb.Error region_error = 1; -inline bool RawCASResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawCASResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawCASResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawCASResponse::region_error() const { +inline const ::errorpb::Error& RawCASResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASResponse.region_error) return _internal_region_error(); } -inline void RawCASResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawCASResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawCASResponse.region_error) } inline ::errorpb::Error* RawCASResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawCASResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawCASResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawCASResponse::mutable_region_error() { +inline ::errorpb::Error* RawCASResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASResponse.region_error) return _msg; } -inline void RawCASResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawCASResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASResponse.region_error) } // string error = 2; inline void RawCASResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawCASResponse::error() const { +inline const std::string& RawCASResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCASResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCASResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASResponse.error) } -inline std::string* RawCASResponse::mutable_error() { +inline std::string* RawCASResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASResponse.error) return _s; } inline const std::string& RawCASResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawCASResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawCASResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawCASResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASResponse.error) return _impl_.error_.Release(); } -inline void RawCASResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCASResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASResponse.error) } // bool succeed = 3; inline void RawCASResponse::clear_succeed() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.succeed_ = false; } -inline bool RawCASResponse::_internal_succeed() const { - return _impl_.succeed_; -} inline bool RawCASResponse::succeed() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASResponse.succeed) return _internal_succeed(); } -inline void RawCASResponse::_internal_set_succeed(bool value) { - - _impl_.succeed_ = value; -} inline void RawCASResponse::set_succeed(bool value) { _internal_set_succeed(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASResponse.succeed) } +inline bool RawCASResponse::_internal_succeed() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.succeed_; +} +inline void RawCASResponse::_internal_set_succeed(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.succeed_ = value; +} // bool previous_not_exist = 4; inline void RawCASResponse::clear_previous_not_exist() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.previous_not_exist_ = false; } -inline bool RawCASResponse::_internal_previous_not_exist() const { - return _impl_.previous_not_exist_; -} inline bool RawCASResponse::previous_not_exist() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASResponse.previous_not_exist) return _internal_previous_not_exist(); } -inline void RawCASResponse::_internal_set_previous_not_exist(bool value) { - - _impl_.previous_not_exist_ = value; -} inline void RawCASResponse::set_previous_not_exist(bool value) { _internal_set_previous_not_exist(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASResponse.previous_not_exist) } +inline bool RawCASResponse::_internal_previous_not_exist() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.previous_not_exist_; +} +inline void RawCASResponse::_internal_set_previous_not_exist(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.previous_not_exist_ = value; +} // bytes previous_value = 5; inline void RawCASResponse::clear_previous_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.previous_value_.ClearToEmpty(); } -inline const std::string& RawCASResponse::previous_value() const { +inline const std::string& RawCASResponse::previous_value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCASResponse.previous_value) return _internal_previous_value(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCASResponse::set_previous_value(ArgT0&& arg0, ArgT... args) { - - _impl_.previous_value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCASResponse::set_previous_value(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.previous_value_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCASResponse.previous_value) } -inline std::string* RawCASResponse::mutable_previous_value() { +inline std::string* RawCASResponse::mutable_previous_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_previous_value(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCASResponse.previous_value) return _s; } inline const std::string& RawCASResponse::_internal_previous_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.previous_value_.Get(); } inline void RawCASResponse::_internal_set_previous_value(const std::string& value) { - - _impl_.previous_value_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.previous_value_.Set(value, GetArena()); } inline std::string* RawCASResponse::_internal_mutable_previous_value() { - - return _impl_.previous_value_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.previous_value_.Mutable( GetArena()); } inline std::string* RawCASResponse::release_previous_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCASResponse.previous_value) return _impl_.previous_value_.Release(); } -inline void RawCASResponse::set_allocated_previous_value(std::string* previous_value) { - if (previous_value != nullptr) { - - } else { - - } - _impl_.previous_value_.SetAllocated(previous_value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.previous_value_.IsDefault()) { - _impl_.previous_value_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCASResponse::set_allocated_previous_value(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.previous_value_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.previous_value_.IsDefault()) { + _impl_.previous_value_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCASResponse.previous_value) } @@ -8867,302 +9886,326 @@ inline void RawCASResponse::set_allocated_previous_value(std::string* previous_v // RawScanRequest // .kvrpcpb.Context context = 1; -inline bool RawScanRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawScanRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawScanRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawScanRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawScanRequest::context() const { +inline const ::kvrpcpb::Context& RawScanRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanRequest.context) return _internal_context(); } -inline void RawScanRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawScanRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawScanRequest.context) } inline ::kvrpcpb::Context* RawScanRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawScanRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawScanRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawScanRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawScanRequest::mutable_context() { +inline ::kvrpcpb::Context* RawScanRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawScanRequest.context) return _msg; } -inline void RawScanRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawScanRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawScanRequest.context) } // bytes start_key = 2; inline void RawScanRequest::clear_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.start_key_.ClearToEmpty(); } -inline const std::string& RawScanRequest::start_key() const { +inline const std::string& RawScanRequest::start_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanRequest.start_key) return _internal_start_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawScanRequest::set_start_key(ArgT0&& arg0, ArgT... args) { - - _impl_.start_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawScanRequest::set_start_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawScanRequest.start_key) } -inline std::string* RawScanRequest::mutable_start_key() { +inline std::string* RawScanRequest::mutable_start_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_start_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawScanRequest.start_key) return _s; } inline const std::string& RawScanRequest::_internal_start_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.start_key_.Get(); } inline void RawScanRequest::_internal_set_start_key(const std::string& value) { - - _impl_.start_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.Set(value, GetArena()); } inline std::string* RawScanRequest::_internal_mutable_start_key() { - - return _impl_.start_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.start_key_.Mutable( GetArena()); } inline std::string* RawScanRequest::release_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawScanRequest.start_key) return _impl_.start_key_.Release(); } -inline void RawScanRequest::set_allocated_start_key(std::string* start_key) { - if (start_key != nullptr) { - - } else { - - } - _impl_.start_key_.SetAllocated(start_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.start_key_.IsDefault()) { - _impl_.start_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawScanRequest::set_allocated_start_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.start_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.start_key_.IsDefault()) { + _impl_.start_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawScanRequest.start_key) } // uint32 limit = 3; inline void RawScanRequest::clear_limit() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.limit_ = 0u; } -inline uint32_t RawScanRequest::_internal_limit() const { - return _impl_.limit_; -} -inline uint32_t RawScanRequest::limit() const { +inline ::uint32_t RawScanRequest::limit() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanRequest.limit) return _internal_limit(); } -inline void RawScanRequest::_internal_set_limit(uint32_t value) { - - _impl_.limit_ = value; -} -inline void RawScanRequest::set_limit(uint32_t value) { +inline void RawScanRequest::set_limit(::uint32_t value) { _internal_set_limit(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawScanRequest.limit) } +inline ::uint32_t RawScanRequest::_internal_limit() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.limit_; +} +inline void RawScanRequest::_internal_set_limit(::uint32_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.limit_ = value; +} // bool key_only = 4; inline void RawScanRequest::clear_key_only() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_only_ = false; } -inline bool RawScanRequest::_internal_key_only() const { - return _impl_.key_only_; -} inline bool RawScanRequest::key_only() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanRequest.key_only) return _internal_key_only(); } -inline void RawScanRequest::_internal_set_key_only(bool value) { - - _impl_.key_only_ = value; -} inline void RawScanRequest::set_key_only(bool value) { _internal_set_key_only(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawScanRequest.key_only) } +inline bool RawScanRequest::_internal_key_only() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.key_only_; +} +inline void RawScanRequest::_internal_set_key_only(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_only_ = value; +} // string cf = 5; inline void RawScanRequest::clear_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.cf_.ClearToEmpty(); } -inline const std::string& RawScanRequest::cf() const { +inline const std::string& RawScanRequest::cf() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanRequest.cf) return _internal_cf(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawScanRequest::set_cf(ArgT0&& arg0, ArgT... args) { - - _impl_.cf_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawScanRequest::set_cf(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawScanRequest.cf) } -inline std::string* RawScanRequest::mutable_cf() { +inline std::string* RawScanRequest::mutable_cf() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_cf(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawScanRequest.cf) return _s; } inline const std::string& RawScanRequest::_internal_cf() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.cf_.Get(); } inline void RawScanRequest::_internal_set_cf(const std::string& value) { - - _impl_.cf_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cf_.Set(value, GetArena()); } inline std::string* RawScanRequest::_internal_mutable_cf() { - - return _impl_.cf_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.cf_.Mutable( GetArena()); } inline std::string* RawScanRequest::release_cf() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawScanRequest.cf) return _impl_.cf_.Release(); } -inline void RawScanRequest::set_allocated_cf(std::string* cf) { - if (cf != nullptr) { - - } else { - - } - _impl_.cf_.SetAllocated(cf, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.cf_.IsDefault()) { - _impl_.cf_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawScanRequest::set_allocated_cf(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cf_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.cf_.IsDefault()) { + _impl_.cf_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawScanRequest.cf) } // bool reverse = 6; inline void RawScanRequest::clear_reverse() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.reverse_ = false; } -inline bool RawScanRequest::_internal_reverse() const { - return _impl_.reverse_; -} inline bool RawScanRequest::reverse() const { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanRequest.reverse) return _internal_reverse(); } -inline void RawScanRequest::_internal_set_reverse(bool value) { - - _impl_.reverse_ = value; -} inline void RawScanRequest::set_reverse(bool value) { _internal_set_reverse(value); // @@protoc_insertion_point(field_set:kvrpcpb.RawScanRequest.reverse) } +inline bool RawScanRequest::_internal_reverse() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.reverse_; +} +inline void RawScanRequest::_internal_set_reverse(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.reverse_ = value; +} // bytes end_key = 7; inline void RawScanRequest::clear_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.end_key_.ClearToEmpty(); } -inline const std::string& RawScanRequest::end_key() const { +inline const std::string& RawScanRequest::end_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanRequest.end_key) return _internal_end_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawScanRequest::set_end_key(ArgT0&& arg0, ArgT... args) { - - _impl_.end_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawScanRequest::set_end_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawScanRequest.end_key) } -inline std::string* RawScanRequest::mutable_end_key() { +inline std::string* RawScanRequest::mutable_end_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_end_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawScanRequest.end_key) return _s; } inline const std::string& RawScanRequest::_internal_end_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.end_key_.Get(); } inline void RawScanRequest::_internal_set_end_key(const std::string& value) { - - _impl_.end_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.Set(value, GetArena()); } inline std::string* RawScanRequest::_internal_mutable_end_key() { - - return _impl_.end_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.end_key_.Mutable( GetArena()); } inline std::string* RawScanRequest::release_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawScanRequest.end_key) return _impl_.end_key_.Release(); } -inline void RawScanRequest::set_allocated_end_key(std::string* end_key) { - if (end_key != nullptr) { - - } else { - - } - _impl_.end_key_.SetAllocated(end_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.end_key_.IsDefault()) { - _impl_.end_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawScanRequest::set_allocated_end_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.end_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.end_key_.IsDefault()) { + _impl_.end_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawScanRequest.end_key) } @@ -9171,129 +10214,144 @@ inline void RawScanRequest::set_allocated_end_key(std::string* end_key) { // RawScanResponse // .errorpb.Error region_error = 1; -inline bool RawScanResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawScanResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawScanResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawScanResponse::region_error() const { +inline const ::errorpb::Error& RawScanResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanResponse.region_error) return _internal_region_error(); } -inline void RawScanResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawScanResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawScanResponse.region_error) } inline ::errorpb::Error* RawScanResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawScanResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawScanResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawScanResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawScanResponse::mutable_region_error() { +inline ::errorpb::Error* RawScanResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawScanResponse.region_error) return _msg; } -inline void RawScanResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawScanResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawScanResponse.region_error) } // repeated .kvrpcpb.KvPair kvs = 2; inline int RawScanResponse::_internal_kvs_size() const { - return _impl_.kvs_.size(); + return _internal_kvs().size(); } inline int RawScanResponse::kvs_size() const { return _internal_kvs_size(); } inline void RawScanResponse::clear_kvs() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.kvs_.Clear(); } -inline ::kvrpcpb::KvPair* RawScanResponse::mutable_kvs(int index) { +inline ::kvrpcpb::KvPair* RawScanResponse::mutable_kvs(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:kvrpcpb.RawScanResponse.kvs) - return _impl_.kvs_.Mutable(index); + return _internal_mutable_kvs()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >* -RawScanResponse::mutable_kvs() { +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* RawScanResponse::mutable_kvs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:kvrpcpb.RawScanResponse.kvs) - return &_impl_.kvs_; -} -inline const ::kvrpcpb::KvPair& RawScanResponse::_internal_kvs(int index) const { - return _impl_.kvs_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_kvs(); } -inline const ::kvrpcpb::KvPair& RawScanResponse::kvs(int index) const { +inline const ::kvrpcpb::KvPair& RawScanResponse::kvs(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawScanResponse.kvs) - return _internal_kvs(index); + return _internal_kvs().Get(index); } -inline ::kvrpcpb::KvPair* RawScanResponse::_internal_add_kvs() { - return _impl_.kvs_.Add(); -} -inline ::kvrpcpb::KvPair* RawScanResponse::add_kvs() { - ::kvrpcpb::KvPair* _add = _internal_add_kvs(); +inline ::kvrpcpb::KvPair* RawScanResponse::add_kvs() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::kvrpcpb::KvPair* _add = _internal_mutable_kvs()->Add(); // @@protoc_insertion_point(field_add:kvrpcpb.RawScanResponse.kvs) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KvPair >& -RawScanResponse::kvs() const { +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& RawScanResponse::kvs() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:kvrpcpb.RawScanResponse.kvs) + return _internal_kvs(); +} +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>& +RawScanResponse::_internal_kvs() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.kvs_; } +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KvPair>* +RawScanResponse::_internal_mutable_kvs() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.kvs_; +} // ------------------------------------------------------------------- @@ -9301,101 +10359,107 @@ RawScanResponse::kvs() const { // bytes start_key = 1; inline void KeyRange::clear_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.start_key_.ClearToEmpty(); } -inline const std::string& KeyRange::start_key() const { +inline const std::string& KeyRange::start_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.KeyRange.start_key) return _internal_start_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void KeyRange::set_start_key(ArgT0&& arg0, ArgT... args) { - - _impl_.start_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void KeyRange::set_start_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.KeyRange.start_key) } -inline std::string* KeyRange::mutable_start_key() { +inline std::string* KeyRange::mutable_start_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_start_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.KeyRange.start_key) return _s; } inline const std::string& KeyRange::_internal_start_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.start_key_.Get(); } inline void KeyRange::_internal_set_start_key(const std::string& value) { - - _impl_.start_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.Set(value, GetArena()); } inline std::string* KeyRange::_internal_mutable_start_key() { - - return _impl_.start_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.start_key_.Mutable( GetArena()); } inline std::string* KeyRange::release_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.KeyRange.start_key) return _impl_.start_key_.Release(); } -inline void KeyRange::set_allocated_start_key(std::string* start_key) { - if (start_key != nullptr) { - - } else { - - } - _impl_.start_key_.SetAllocated(start_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.start_key_.IsDefault()) { - _impl_.start_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KeyRange::set_allocated_start_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.start_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.start_key_.IsDefault()) { + _impl_.start_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.KeyRange.start_key) } // bytes end_key = 2; inline void KeyRange::clear_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.end_key_.ClearToEmpty(); } -inline const std::string& KeyRange::end_key() const { +inline const std::string& KeyRange::end_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.KeyRange.end_key) return _internal_end_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void KeyRange::set_end_key(ArgT0&& arg0, ArgT... args) { - - _impl_.end_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void KeyRange::set_end_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.KeyRange.end_key) } -inline std::string* KeyRange::mutable_end_key() { +inline std::string* KeyRange::mutable_end_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_end_key(); // @@protoc_insertion_point(field_mutable:kvrpcpb.KeyRange.end_key) return _s; } inline const std::string& KeyRange::_internal_end_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.end_key_.Get(); } inline void KeyRange::_internal_set_end_key(const std::string& value) { - - _impl_.end_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.Set(value, GetArena()); } inline std::string* KeyRange::_internal_mutable_end_key() { - - return _impl_.end_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.end_key_.Mutable( GetArena()); } inline std::string* KeyRange::release_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.KeyRange.end_key) return _impl_.end_key_.Release(); } -inline void KeyRange::set_allocated_end_key(std::string* end_key) { - if (end_key != nullptr) { - - } else { - - } - _impl_.end_key_.SetAllocated(end_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.end_key_.IsDefault()) { - _impl_.end_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void KeyRange::set_allocated_end_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.end_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.end_key_.IsDefault()) { + _impl_.end_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.KeyRange.end_key) } @@ -9404,282 +10468,306 @@ inline void KeyRange::set_allocated_end_key(std::string* end_key) { // RawCoprocessorRequest // .kvrpcpb.Context context = 1; -inline bool RawCoprocessorRequest::_internal_has_context() const { - return this != internal_default_instance() && _impl_.context_ != nullptr; -} inline bool RawCoprocessorRequest::has_context() const { - return _internal_has_context(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.context_ != nullptr); + return value; } inline void RawCoprocessorRequest::clear_context() { - if (GetArenaForAllocation() == nullptr && _impl_.context_ != nullptr) { - delete _impl_.context_; - } - _impl_.context_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.context_ != nullptr) _impl_.context_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::kvrpcpb::Context& RawCoprocessorRequest::_internal_context() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::kvrpcpb::Context* p = _impl_.context_; - return p != nullptr ? *p : reinterpret_cast( - ::kvrpcpb::_Context_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::kvrpcpb::_Context_default_instance_); } -inline const ::kvrpcpb::Context& RawCoprocessorRequest::context() const { +inline const ::kvrpcpb::Context& RawCoprocessorRequest::context() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorRequest.context) return _internal_context(); } -inline void RawCoprocessorRequest::unsafe_arena_set_allocated_context( - ::kvrpcpb::Context* context) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.context_); +inline void RawCoprocessorRequest::unsafe_arena_set_allocated_context(::kvrpcpb::Context* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.context_); } - _impl_.context_ = context; - if (context) { - + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawCoprocessorRequest.context) } inline ::kvrpcpb::Context* RawCoprocessorRequest::release_context() { - - ::kvrpcpb::Context* temp = _impl_.context_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::kvrpcpb::Context* released = _impl_.context_; _impl_.context_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::kvrpcpb::Context* RawCoprocessorRequest::unsafe_arena_release_context() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCoprocessorRequest.context) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::kvrpcpb::Context* temp = _impl_.context_; _impl_.context_ = nullptr; return temp; } inline ::kvrpcpb::Context* RawCoprocessorRequest::_internal_mutable_context() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.context_ == nullptr) { - auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArenaForAllocation()); - _impl_.context_ = p; + auto* p = CreateMaybeMessage<::kvrpcpb::Context>(GetArena()); + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(p); } return _impl_.context_; } -inline ::kvrpcpb::Context* RawCoprocessorRequest::mutable_context() { +inline ::kvrpcpb::Context* RawCoprocessorRequest::mutable_context() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::kvrpcpb::Context* _msg = _internal_mutable_context(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorRequest.context) return _msg; } -inline void RawCoprocessorRequest::set_allocated_context(::kvrpcpb::Context* context) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawCoprocessorRequest::set_allocated_context(::kvrpcpb::Context* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.context_; + delete reinterpret_cast<::kvrpcpb::Context*>(_impl_.context_); } - if (context) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(context); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::kvrpcpb::Context*>(value)->GetArena(); if (message_arena != submessage_arena) { - context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, context, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.context_ = context; + + _impl_.context_ = reinterpret_cast<::kvrpcpb::Context*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCoprocessorRequest.context) } // string copr_name = 2; inline void RawCoprocessorRequest::clear_copr_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.copr_name_.ClearToEmpty(); } -inline const std::string& RawCoprocessorRequest::copr_name() const { +inline const std::string& RawCoprocessorRequest::copr_name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorRequest.copr_name) return _internal_copr_name(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCoprocessorRequest::set_copr_name(ArgT0&& arg0, ArgT... args) { - - _impl_.copr_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCoprocessorRequest::set_copr_name(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.copr_name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCoprocessorRequest.copr_name) } -inline std::string* RawCoprocessorRequest::mutable_copr_name() { +inline std::string* RawCoprocessorRequest::mutable_copr_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_copr_name(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorRequest.copr_name) return _s; } inline const std::string& RawCoprocessorRequest::_internal_copr_name() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.copr_name_.Get(); } inline void RawCoprocessorRequest::_internal_set_copr_name(const std::string& value) { - - _impl_.copr_name_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.copr_name_.Set(value, GetArena()); } inline std::string* RawCoprocessorRequest::_internal_mutable_copr_name() { - - return _impl_.copr_name_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.copr_name_.Mutable( GetArena()); } inline std::string* RawCoprocessorRequest::release_copr_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCoprocessorRequest.copr_name) return _impl_.copr_name_.Release(); } -inline void RawCoprocessorRequest::set_allocated_copr_name(std::string* copr_name) { - if (copr_name != nullptr) { - - } else { - - } - _impl_.copr_name_.SetAllocated(copr_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.copr_name_.IsDefault()) { - _impl_.copr_name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCoprocessorRequest::set_allocated_copr_name(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.copr_name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.copr_name_.IsDefault()) { + _impl_.copr_name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCoprocessorRequest.copr_name) } // string copr_version_req = 3; inline void RawCoprocessorRequest::clear_copr_version_req() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.copr_version_req_.ClearToEmpty(); } -inline const std::string& RawCoprocessorRequest::copr_version_req() const { +inline const std::string& RawCoprocessorRequest::copr_version_req() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorRequest.copr_version_req) return _internal_copr_version_req(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCoprocessorRequest::set_copr_version_req(ArgT0&& arg0, ArgT... args) { - - _impl_.copr_version_req_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCoprocessorRequest::set_copr_version_req(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.copr_version_req_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCoprocessorRequest.copr_version_req) } -inline std::string* RawCoprocessorRequest::mutable_copr_version_req() { +inline std::string* RawCoprocessorRequest::mutable_copr_version_req() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_copr_version_req(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorRequest.copr_version_req) return _s; } inline const std::string& RawCoprocessorRequest::_internal_copr_version_req() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.copr_version_req_.Get(); } inline void RawCoprocessorRequest::_internal_set_copr_version_req(const std::string& value) { - - _impl_.copr_version_req_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.copr_version_req_.Set(value, GetArena()); } inline std::string* RawCoprocessorRequest::_internal_mutable_copr_version_req() { - - return _impl_.copr_version_req_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.copr_version_req_.Mutable( GetArena()); } inline std::string* RawCoprocessorRequest::release_copr_version_req() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCoprocessorRequest.copr_version_req) return _impl_.copr_version_req_.Release(); } -inline void RawCoprocessorRequest::set_allocated_copr_version_req(std::string* copr_version_req) { - if (copr_version_req != nullptr) { - - } else { - - } - _impl_.copr_version_req_.SetAllocated(copr_version_req, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.copr_version_req_.IsDefault()) { - _impl_.copr_version_req_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCoprocessorRequest::set_allocated_copr_version_req(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.copr_version_req_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.copr_version_req_.IsDefault()) { + _impl_.copr_version_req_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCoprocessorRequest.copr_version_req) } // repeated .kvrpcpb.KeyRange ranges = 4; inline int RawCoprocessorRequest::_internal_ranges_size() const { - return _impl_.ranges_.size(); + return _internal_ranges().size(); } inline int RawCoprocessorRequest::ranges_size() const { return _internal_ranges_size(); } inline void RawCoprocessorRequest::clear_ranges() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.ranges_.Clear(); } -inline ::kvrpcpb::KeyRange* RawCoprocessorRequest::mutable_ranges(int index) { +inline ::kvrpcpb::KeyRange* RawCoprocessorRequest::mutable_ranges(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorRequest.ranges) - return _impl_.ranges_.Mutable(index); + return _internal_mutable_ranges()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KeyRange >* -RawCoprocessorRequest::mutable_ranges() { +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KeyRange>* RawCoprocessorRequest::mutable_ranges() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:kvrpcpb.RawCoprocessorRequest.ranges) - return &_impl_.ranges_; -} -inline const ::kvrpcpb::KeyRange& RawCoprocessorRequest::_internal_ranges(int index) const { - return _impl_.ranges_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_ranges(); } -inline const ::kvrpcpb::KeyRange& RawCoprocessorRequest::ranges(int index) const { +inline const ::kvrpcpb::KeyRange& RawCoprocessorRequest::ranges(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorRequest.ranges) - return _internal_ranges(index); + return _internal_ranges().Get(index); } -inline ::kvrpcpb::KeyRange* RawCoprocessorRequest::_internal_add_ranges() { - return _impl_.ranges_.Add(); -} -inline ::kvrpcpb::KeyRange* RawCoprocessorRequest::add_ranges() { - ::kvrpcpb::KeyRange* _add = _internal_add_ranges(); +inline ::kvrpcpb::KeyRange* RawCoprocessorRequest::add_ranges() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::kvrpcpb::KeyRange* _add = _internal_mutable_ranges()->Add(); // @@protoc_insertion_point(field_add:kvrpcpb.RawCoprocessorRequest.ranges) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::kvrpcpb::KeyRange >& -RawCoprocessorRequest::ranges() const { +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KeyRange>& RawCoprocessorRequest::ranges() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:kvrpcpb.RawCoprocessorRequest.ranges) + return _internal_ranges(); +} +inline const ::google::protobuf::RepeatedPtrField<::kvrpcpb::KeyRange>& +RawCoprocessorRequest::_internal_ranges() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.ranges_; } +inline ::google::protobuf::RepeatedPtrField<::kvrpcpb::KeyRange>* +RawCoprocessorRequest::_internal_mutable_ranges() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.ranges_; +} // bytes data = 5; inline void RawCoprocessorRequest::clear_data() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.data_.ClearToEmpty(); } -inline const std::string& RawCoprocessorRequest::data() const { +inline const std::string& RawCoprocessorRequest::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorRequest.data) return _internal_data(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCoprocessorRequest::set_data(ArgT0&& arg0, ArgT... args) { - - _impl_.data_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCoprocessorRequest::set_data(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCoprocessorRequest.data) } -inline std::string* RawCoprocessorRequest::mutable_data() { +inline std::string* RawCoprocessorRequest::mutable_data() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_data(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorRequest.data) return _s; } inline const std::string& RawCoprocessorRequest::_internal_data() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.data_.Get(); } inline void RawCoprocessorRequest::_internal_set_data(const std::string& value) { - - _impl_.data_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.data_.Set(value, GetArena()); } inline std::string* RawCoprocessorRequest::_internal_mutable_data() { - - return _impl_.data_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.data_.Mutable( GetArena()); } inline std::string* RawCoprocessorRequest::release_data() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCoprocessorRequest.data) return _impl_.data_.Release(); } -inline void RawCoprocessorRequest::set_allocated_data(std::string* data) { - if (data != nullptr) { - - } else { - - } - _impl_.data_.SetAllocated(data, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.data_.IsDefault()) { - _impl_.data_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCoprocessorRequest::set_allocated_data(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.data_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCoprocessorRequest.data) } @@ -9688,258 +10776,231 @@ inline void RawCoprocessorRequest::set_allocated_data(std::string* data) { // RawCoprocessorResponse // .errorpb.Error region_error = 1; -inline bool RawCoprocessorResponse::_internal_has_region_error() const { - return this != internal_default_instance() && _impl_.region_error_ != nullptr; -} inline bool RawCoprocessorResponse::has_region_error() const { - return _internal_has_region_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_error_ != nullptr); + return value; } inline const ::errorpb::Error& RawCoprocessorResponse::_internal_region_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::errorpb::Error* p = _impl_.region_error_; - return p != nullptr ? *p : reinterpret_cast( - ::errorpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::errorpb::_Error_default_instance_); } -inline const ::errorpb::Error& RawCoprocessorResponse::region_error() const { +inline const ::errorpb::Error& RawCoprocessorResponse::region_error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorResponse.region_error) return _internal_region_error(); } -inline void RawCoprocessorResponse::unsafe_arena_set_allocated_region_error( - ::errorpb::Error* region_error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); +inline void RawCoprocessorResponse::unsafe_arena_set_allocated_region_error(::errorpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - _impl_.region_error_ = region_error; - if (region_error) { - + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:kvrpcpb.RawCoprocessorResponse.region_error) } inline ::errorpb::Error* RawCoprocessorResponse::release_region_error() { - - ::errorpb::Error* temp = _impl_.region_error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::errorpb::Error* released = _impl_.region_error_; _impl_.region_error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::errorpb::Error* RawCoprocessorResponse::unsafe_arena_release_region_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCoprocessorResponse.region_error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::errorpb::Error* temp = _impl_.region_error_; _impl_.region_error_ = nullptr; return temp; } inline ::errorpb::Error* RawCoprocessorResponse::_internal_mutable_region_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_error_ == nullptr) { - auto* p = CreateMaybeMessage<::errorpb::Error>(GetArenaForAllocation()); - _impl_.region_error_ = p; + auto* p = CreateMaybeMessage<::errorpb::Error>(GetArena()); + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(p); } return _impl_.region_error_; } -inline ::errorpb::Error* RawCoprocessorResponse::mutable_region_error() { +inline ::errorpb::Error* RawCoprocessorResponse::mutable_region_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::errorpb::Error* _msg = _internal_mutable_region_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorResponse.region_error) return _msg; } -inline void RawCoprocessorResponse::set_allocated_region_error(::errorpb::Error* region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void RawCoprocessorResponse::set_allocated_region_error(::errorpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_error_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_error_); } - if (region_error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region_error)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_error_ = region_error; + + _impl_.region_error_ = reinterpret_cast<::errorpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCoprocessorResponse.region_error) } // string error = 2; inline void RawCoprocessorResponse::clear_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.error_.ClearToEmpty(); } -inline const std::string& RawCoprocessorResponse::error() const { +inline const std::string& RawCoprocessorResponse::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorResponse.error) return _internal_error(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCoprocessorResponse::set_error(ArgT0&& arg0, ArgT... args) { - - _impl_.error_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCoprocessorResponse::set_error(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCoprocessorResponse.error) } -inline std::string* RawCoprocessorResponse::mutable_error() { +inline std::string* RawCoprocessorResponse::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorResponse.error) return _s; } inline const std::string& RawCoprocessorResponse::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.error_.Get(); } inline void RawCoprocessorResponse::_internal_set_error(const std::string& value) { - - _impl_.error_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.error_.Set(value, GetArena()); } inline std::string* RawCoprocessorResponse::_internal_mutable_error() { - - return _impl_.error_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.error_.Mutable( GetArena()); } inline std::string* RawCoprocessorResponse::release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCoprocessorResponse.error) return _impl_.error_.Release(); } -inline void RawCoprocessorResponse::set_allocated_error(std::string* error) { - if (error != nullptr) { - - } else { - - } - _impl_.error_.SetAllocated(error, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.error_.IsDefault()) { - _impl_.error_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCoprocessorResponse::set_allocated_error(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.error_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.error_.IsDefault()) { + _impl_.error_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCoprocessorResponse.error) } // bytes data = 3; inline void RawCoprocessorResponse::clear_data() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.data_.ClearToEmpty(); } -inline const std::string& RawCoprocessorResponse::data() const { +inline const std::string& RawCoprocessorResponse::data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:kvrpcpb.RawCoprocessorResponse.data) return _internal_data(); } -template -inline PROTOBUF_ALWAYS_INLINE -void RawCoprocessorResponse::set_data(ArgT0&& arg0, ArgT... args) { - - _impl_.data_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void RawCoprocessorResponse::set_data(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.data_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:kvrpcpb.RawCoprocessorResponse.data) } -inline std::string* RawCoprocessorResponse::mutable_data() { +inline std::string* RawCoprocessorResponse::mutable_data() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_data(); // @@protoc_insertion_point(field_mutable:kvrpcpb.RawCoprocessorResponse.data) return _s; } inline const std::string& RawCoprocessorResponse::_internal_data() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.data_.Get(); } inline void RawCoprocessorResponse::_internal_set_data(const std::string& value) { - - _impl_.data_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.data_.Set(value, GetArena()); } inline std::string* RawCoprocessorResponse::_internal_mutable_data() { - - return _impl_.data_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.data_.Mutable( GetArena()); } inline std::string* RawCoprocessorResponse::release_data() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:kvrpcpb.RawCoprocessorResponse.data) return _impl_.data_.Release(); } -inline void RawCoprocessorResponse::set_allocated_data(std::string* data) { - if (data != nullptr) { - - } else { - - } - _impl_.data_.SetAllocated(data, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.data_.IsDefault()) { - _impl_.data_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void RawCoprocessorResponse::set_allocated_data(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.data_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.data_.IsDefault()) { + _impl_.data_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:kvrpcpb.RawCoprocessorResponse.data) } #ifdef __GNUC__ - #pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) - } // namespace kvrpcpb -PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::kvrpcpb::CommandPri> : ::std::true_type {}; +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::kvrpcpb::CommandPri> : std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::kvrpcpb::CommandPri>() { +inline const EnumDescriptor* GetEnumDescriptor<::kvrpcpb::CommandPri>() { return ::kvrpcpb::CommandPri_descriptor(); } -template <> struct is_proto_enum< ::kvrpcpb::IsolationLevel> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::kvrpcpb::IsolationLevel>() { +struct is_proto_enum<::kvrpcpb::IsolationLevel> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::kvrpcpb::IsolationLevel>() { return ::kvrpcpb::IsolationLevel_descriptor(); } -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_kvrpcpb_2eproto +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_kvrpcpb_2eproto_2epb_2eh diff --git a/ThirdParty/kvproto/generated/kvproto/metapb.pb.cc b/ThirdParty/kvproto/generated/kvproto/metapb.pb.cc index 70dce45a1..0e8be0b3e 100644 --- a/ThirdParty/kvproto/generated/kvproto/metapb.pb.cc +++ b/ThirdParty/kvproto/generated/kvproto/metapb.pb.cc @@ -4,453 +4,530 @@ #include "metapb.pb.h" #include - -#include -#include -#include -#include -#include -#include -#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) -#include +// Must be included last. +#include "google/protobuf/port_def.inc" PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace metapb { + +inline constexpr StoreLabel::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR StoreLabel::StoreLabel(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct StoreLabelDefaultTypeInternal { + PROTOBUF_CONSTEXPR StoreLabelDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~StoreLabelDefaultTypeInternal() {} + union { + StoreLabel _instance; + }; +}; -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StoreLabelDefaultTypeInternal _StoreLabel_default_instance_; -namespace metapb { -PROTOBUF_CONSTEXPR Cluster::Cluster( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.id_)*/uint64_t{0u} - , /*decltype(_impl_.max_peer_count_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} +inline constexpr RegionEpoch::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : conf_ver_{::uint64_t{0u}}, + version_{::uint64_t{0u}}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR RegionEpoch::RegionEpoch(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct RegionEpochDefaultTypeInternal { + PROTOBUF_CONSTEXPR RegionEpochDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~RegionEpochDefaultTypeInternal() {} + union { + RegionEpoch _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionEpochDefaultTypeInternal _RegionEpoch_default_instance_; + +inline constexpr Peer::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : id_{::uint64_t{0u}}, + store_id_{::uint64_t{0u}}, + role_{static_cast< ::metapb::PeerRole >(0)}, + is_witness_{false}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Peer::Peer(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct PeerDefaultTypeInternal { + PROTOBUF_CONSTEXPR PeerDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~PeerDefaultTypeInternal() {} + union { + Peer _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PeerDefaultTypeInternal _Peer_default_instance_; + +inline constexpr Cluster::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : id_{::uint64_t{0u}}, + max_peer_count_{::uint64_t{0u}}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Cluster::Cluster(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct ClusterDefaultTypeInternal { - PROTOBUF_CONSTEXPR ClusterDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR ClusterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ClusterDefaultTypeInternal() {} union { Cluster _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClusterDefaultTypeInternal _Cluster_default_instance_; -PROTOBUF_CONSTEXPR Store::Store( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.labels_)*/{} - , /*decltype(_impl_.address_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.status_address_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.git_hash_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.deploy_path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.peer_address_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.id_)*/uint64_t{0u} - , /*decltype(_impl_.physically_destroyed_)*/int64_t{0} - , /*decltype(_impl_.state_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClusterDefaultTypeInternal _Cluster_default_instance_; + +inline constexpr Store::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : labels_{}, + address_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + version_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + status_address_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + git_hash_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + deploy_path_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + peer_address_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + id_{::uint64_t{0u}}, + physically_destroyed_{::int64_t{0}}, + state_{static_cast< ::metapb::StoreState >(0)}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Store::Store(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct StoreDefaultTypeInternal { - PROTOBUF_CONSTEXPR StoreDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR StoreDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~StoreDefaultTypeInternal() {} union { Store _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StoreDefaultTypeInternal _Store_default_instance_; -PROTOBUF_CONSTEXPR StoreLabel::StoreLabel( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct StoreLabelDefaultTypeInternal { - PROTOBUF_CONSTEXPR StoreLabelDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~StoreLabelDefaultTypeInternal() {} - union { - StoreLabel _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StoreLabelDefaultTypeInternal _StoreLabel_default_instance_; -PROTOBUF_CONSTEXPR Region::Region( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.peers_)*/{} - , /*decltype(_impl_.start_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.end_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.encryption_meta_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_epoch_)*/nullptr - , /*decltype(_impl_.id_)*/uint64_t{0u} - , /*decltype(_impl_.is_in_flashback_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StoreDefaultTypeInternal _Store_default_instance_; + +inline constexpr Region::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + peers_{}, + start_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + end_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + encryption_meta_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + region_epoch_{nullptr}, + id_{::uint64_t{0u}}, + is_in_flashback_{false} {} + +template +PROTOBUF_CONSTEXPR Region::Region(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct RegionDefaultTypeInternal { - PROTOBUF_CONSTEXPR RegionDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR RegionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RegionDefaultTypeInternal() {} union { Region _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionDefaultTypeInternal _Region_default_instance_; -PROTOBUF_CONSTEXPR RegionEpoch::RegionEpoch( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.conf_ver_)*/uint64_t{0u} - , /*decltype(_impl_.version_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RegionEpochDefaultTypeInternal { - PROTOBUF_CONSTEXPR RegionEpochDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RegionEpochDefaultTypeInternal() {} - union { - RegionEpoch _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionEpochDefaultTypeInternal _RegionEpoch_default_instance_; -PROTOBUF_CONSTEXPR Peer::Peer( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.id_)*/uint64_t{0u} - , /*decltype(_impl_.store_id_)*/uint64_t{0u} - , /*decltype(_impl_.role_)*/0 - , /*decltype(_impl_.is_witness_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct PeerDefaultTypeInternal { - PROTOBUF_CONSTEXPR PeerDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~PeerDefaultTypeInternal() {} - union { - Peer _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PeerDefaultTypeInternal _Peer_default_instance_; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionDefaultTypeInternal _Region_default_instance_; } // namespace metapb static ::_pb::Metadata file_level_metadata_metapb_2eproto[6]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_metapb_2eproto[2]; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_metapb_2eproto = nullptr; - -const uint32_t TableStruct_metapb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::metapb::Cluster, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::metapb::Cluster, _impl_.id_), - PROTOBUF_FIELD_OFFSET(::metapb::Cluster, _impl_.max_peer_count_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::metapb::Store, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.id_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.address_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.state_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.labels_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.version_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.status_address_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.git_hash_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.deploy_path_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.physically_destroyed_), - PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.peer_address_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::metapb::StoreLabel, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::metapb::StoreLabel, _impl_.key_), - PROTOBUF_FIELD_OFFSET(::metapb::StoreLabel, _impl_.value_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::metapb::Region, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.id_), - PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.start_key_), - PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.end_key_), - PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.region_epoch_), - PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.peers_), - PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.encryption_meta_), - PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.is_in_flashback_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::metapb::RegionEpoch, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::metapb::RegionEpoch, _impl_.conf_ver_), - PROTOBUF_FIELD_OFFSET(::metapb::RegionEpoch, _impl_.version_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::metapb::Peer, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.id_), - PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.store_id_), - PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.role_), - PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.is_witness_), +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_metapb_2eproto = nullptr; +const ::uint32_t TableStruct_metapb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::metapb::Cluster, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::metapb::Cluster, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::metapb::Cluster, _impl_.max_peer_count_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::metapb::Store, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.address_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.state_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.labels_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.version_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.status_address_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.git_hash_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.deploy_path_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.physically_destroyed_), + PROTOBUF_FIELD_OFFSET(::metapb::Store, _impl_.peer_address_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::metapb::StoreLabel, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::metapb::StoreLabel, _impl_.key_), + PROTOBUF_FIELD_OFFSET(::metapb::StoreLabel, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.start_key_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.end_key_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.region_epoch_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.peers_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.encryption_meta_), + PROTOBUF_FIELD_OFFSET(::metapb::Region, _impl_.is_in_flashback_), + ~0u, + ~0u, + ~0u, + 0, + ~0u, + ~0u, + ~0u, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::metapb::RegionEpoch, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::metapb::RegionEpoch, _impl_.conf_ver_), + PROTOBUF_FIELD_OFFSET(::metapb::RegionEpoch, _impl_.version_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::metapb::Peer, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.store_id_), + PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.role_), + PROTOBUF_FIELD_OFFSET(::metapb::Peer, _impl_.is_witness_), }; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::metapb::Cluster)}, - { 8, -1, -1, sizeof(::metapb::Store)}, - { 24, -1, -1, sizeof(::metapb::StoreLabel)}, - { 32, -1, -1, sizeof(::metapb::Region)}, - { 45, -1, -1, sizeof(::metapb::RegionEpoch)}, - { 53, -1, -1, sizeof(::metapb::Peer)}, + +static const ::_pbi::MigrationSchema + schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::metapb::Cluster)}, + {10, -1, -1, sizeof(::metapb::Store)}, + {28, -1, -1, sizeof(::metapb::StoreLabel)}, + {38, 53, -1, sizeof(::metapb::Region)}, + {60, -1, -1, sizeof(::metapb::RegionEpoch)}, + {70, -1, -1, sizeof(::metapb::Peer)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::metapb::_Cluster_default_instance_._instance, - &::metapb::_Store_default_instance_._instance, - &::metapb::_StoreLabel_default_instance_._instance, - &::metapb::_Region_default_instance_._instance, - &::metapb::_RegionEpoch_default_instance_._instance, - &::metapb::_Peer_default_instance_._instance, + &::metapb::_Cluster_default_instance_._instance, + &::metapb::_Store_default_instance_._instance, + &::metapb::_StoreLabel_default_instance_._instance, + &::metapb::_Region_default_instance_._instance, + &::metapb::_RegionEpoch_default_instance_._instance, + &::metapb::_Peer_default_instance_._instance, }; - -const char descriptor_table_protodef_metapb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\014metapb.proto\022\006metapb\"-\n\007Cluster\022\n\n\002id\030" - "\001 \001(\004\022\026\n\016max_peer_count\030\002 \001(\004\"\357\001\n\005Store\022" - "\n\n\002id\030\001 \001(\004\022\017\n\007address\030\002 \001(\t\022!\n\005state\030\003 " - "\001(\0162\022.metapb.StoreState\022\"\n\006labels\030\004 \003(\0132" - "\022.metapb.StoreLabel\022\017\n\007version\030\005 \001(\t\022\026\n\016" - "status_address\030\006 \001(\t\022\020\n\010git_hash\030\007 \001(\t\022\023" - "\n\013deploy_path\030\010 \001(\t\022\034\n\024physically_destro" - "yed\030\t \001(\003\022\024\n\014peer_address\030\n \001(\t\"(\n\nStore" - "Label\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\262\001\n\006Re" - "gion\022\n\n\002id\030\001 \001(\004\022\021\n\tstart_key\030\002 \001(\014\022\017\n\007e" - "nd_key\030\003 \001(\014\022)\n\014region_epoch\030\004 \001(\0132\023.met" - "apb.RegionEpoch\022\033\n\005peers\030\005 \003(\0132\014.metapb." - "Peer\022\027\n\017encryption_meta\030\006 \001(\014\022\027\n\017is_in_f" - "lashback\030\007 \001(\010\"0\n\013RegionEpoch\022\020\n\010conf_ve" - "r\030\001 \001(\004\022\017\n\007version\030\002 \001(\004\"X\n\004Peer\022\n\n\002id\030\001" - " \001(\004\022\020\n\010store_id\030\002 \001(\004\022\036\n\004role\030\003 \001(\0162\020.m" - "etapb.PeerRole\022\022\n\nis_witness\030\004 \001(\010*0\n\nSt" - "oreState\022\006\n\002Up\020\000\022\013\n\007Offline\020\001\022\r\n\tTombsto" - "ne\020\002*H\n\010PeerRole\022\t\n\005Voter\020\000\022\013\n\007Learner\020\001" - "\022\021\n\rIncomingVoter\020\002\022\021\n\rDemotingVoter\020\003B\022" - "\n\020org.tikv.kvprotob\006proto3" - ; -static ::_pbi::once_flag descriptor_table_metapb_2eproto_once; +const char descriptor_table_protodef_metapb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + "\n\014metapb.proto\022\006metapb\"-\n\007Cluster\022\n\n\002id\030" + "\001 \001(\004\022\026\n\016max_peer_count\030\002 \001(\004\"\357\001\n\005Store\022" + "\n\n\002id\030\001 \001(\004\022\017\n\007address\030\002 \001(\t\022!\n\005state\030\003 " + "\001(\0162\022.metapb.StoreState\022\"\n\006labels\030\004 \003(\0132" + "\022.metapb.StoreLabel\022\017\n\007version\030\005 \001(\t\022\026\n\016" + "status_address\030\006 \001(\t\022\020\n\010git_hash\030\007 \001(\t\022\023" + "\n\013deploy_path\030\010 \001(\t\022\034\n\024physically_destro" + "yed\030\t \001(\003\022\024\n\014peer_address\030\n \001(\t\"(\n\nStore" + "Label\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\262\001\n\006Re" + "gion\022\n\n\002id\030\001 \001(\004\022\021\n\tstart_key\030\002 \001(\014\022\017\n\007e" + "nd_key\030\003 \001(\014\022)\n\014region_epoch\030\004 \001(\0132\023.met" + "apb.RegionEpoch\022\033\n\005peers\030\005 \003(\0132\014.metapb." + "Peer\022\027\n\017encryption_meta\030\006 \001(\014\022\027\n\017is_in_f" + "lashback\030\007 \001(\010\"0\n\013RegionEpoch\022\020\n\010conf_ve" + "r\030\001 \001(\004\022\017\n\007version\030\002 \001(\004\"X\n\004Peer\022\n\n\002id\030\001" + " \001(\004\022\020\n\010store_id\030\002 \001(\004\022\036\n\004role\030\003 \001(\0162\020.m" + "etapb.PeerRole\022\022\n\nis_witness\030\004 \001(\010*0\n\nSt" + "oreState\022\006\n\002Up\020\000\022\013\n\007Offline\020\001\022\r\n\tTombsto" + "ne\020\002*H\n\010PeerRole\022\t\n\005Voter\020\000\022\013\n\007Learner\020\001" + "\022\021\n\rIncomingVoter\020\002\022\021\n\rDemotingVoter\020\003B\022" + "\n\020org.tikv.kvprotob\006proto3" +}; +static ::absl::once_flag descriptor_table_metapb_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_metapb_2eproto = { - false, false, 826, descriptor_table_protodef_metapb_2eproto, + false, + false, + 826, + descriptor_table_protodef_metapb_2eproto, "metapb.proto", - &descriptor_table_metapb_2eproto_once, nullptr, 0, 6, - schemas, file_default_instances, TableStruct_metapb_2eproto::offsets, - file_level_metadata_metapb_2eproto, file_level_enum_descriptors_metapb_2eproto, + &descriptor_table_metapb_2eproto_once, + nullptr, + 0, + 6, + schemas, + file_default_instances, + TableStruct_metapb_2eproto::offsets, + file_level_metadata_metapb_2eproto, + file_level_enum_descriptors_metapb_2eproto, file_level_service_descriptors_metapb_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_metapb_2eproto_getter() { return &descriptor_table_metapb_2eproto; } - // Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_metapb_2eproto(&descriptor_table_metapb_2eproto); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_metapb_2eproto(&descriptor_table_metapb_2eproto); namespace metapb { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StoreState_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_metapb_2eproto); +const ::google::protobuf::EnumDescriptor* StoreState_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_metapb_2eproto); return file_level_enum_descriptors_metapb_2eproto[0]; } +PROTOBUF_CONSTINIT const uint32_t StoreState_internal_data_[] = { + 196608u, 0u, }; bool StoreState_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } + return 0 <= value && value <= 2; } - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PeerRole_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_metapb_2eproto); +const ::google::protobuf::EnumDescriptor* PeerRole_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_metapb_2eproto); return file_level_enum_descriptors_metapb_2eproto[1]; } +PROTOBUF_CONSTINIT const uint32_t PeerRole_internal_data_[] = { + 262144u, 0u, }; bool PeerRole_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - return true; - default: - return false; - } + return 0 <= value && value <= 3; } - - // =================================================================== class Cluster::_Internal { public: }; -Cluster::Cluster(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Cluster::Cluster(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:metapb.Cluster) } -Cluster::Cluster(const Cluster& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Cluster* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.id_){} - , decltype(_impl_.max_peer_count_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.id_, &from._impl_.id_, - static_cast(reinterpret_cast(&_impl_.max_peer_count_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.max_peer_count_)); - // @@protoc_insertion_point(copy_constructor:metapb.Cluster) -} - -inline void Cluster::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.id_){uint64_t{0u}} - , decltype(_impl_.max_peer_count_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +Cluster::Cluster( + ::google::protobuf::Arena* arena, const Cluster& from) + : Cluster(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE Cluster::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} +inline void Cluster::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + 0, + offsetof(Impl_, max_peer_count_) - + offsetof(Impl_, id_) + + sizeof(Impl_::max_peer_count_)); +} Cluster::~Cluster() { // @@protoc_insertion_point(destructor:metapb.Cluster) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Cluster::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void Cluster::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Cluster::Clear() { +PROTOBUF_NOINLINE void Cluster::Clear() { // @@protoc_insertion_point(message_clear_start:metapb.Cluster) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.id_, 0, static_cast( + ::memset(&_impl_.id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.max_peer_count_) - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.max_peer_count_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Cluster::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 max_peer_count = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.max_peer_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Cluster::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Cluster::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Cluster::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Cluster_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 max_peer_count = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Cluster, _impl_.max_peer_count_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(Cluster, _impl_.max_peer_count_)}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Cluster, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Cluster, _impl_.id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(Cluster, _impl_.id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 max_peer_count = 2; + {PROTOBUF_FIELD_OFFSET(Cluster, _impl_.max_peer_count_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* Cluster::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:metapb.Cluster) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 id = 1; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); } // uint64 max_peer_count = 2; if (this->_internal_max_peer_count() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_max_peer_count(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_max_peer_count(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:metapb.Cluster) return target; } -size_t Cluster::ByteSizeLong() const { +::size_t Cluster::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:metapb.Cluster) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // uint64 id = 1; if (this->_internal_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); } // uint64 max_peer_count = 2; if (this->_internal_max_peer_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_max_peer_count()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_max_peer_count()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Cluster::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Cluster::MergeImpl +const ::google::protobuf::Message::ClassData Cluster::_class_data_ = { + Cluster::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Cluster::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Cluster::GetClassData() const { + return &_class_data_; +} -void Cluster::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Cluster::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:metapb.Cluster) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (from._internal_id() != 0) { @@ -459,7 +536,7 @@ void Cluster::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOB if (from._internal_max_peer_count() != 0) { _this->_internal_set_max_peer_count(from._internal_max_peer_count()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Cluster::CopyFrom(const Cluster& from) { @@ -469,14 +546,17 @@ void Cluster::CopyFrom(const Cluster& from) { MergeFrom(from); } -bool Cluster::IsInitialized() const { +PROTOBUF_NOINLINE bool Cluster::IsInitialized() const { return true; } -void Cluster::InternalSwap(Cluster* other) { +::_pbi::CachedSize* Cluster::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Cluster::InternalSwap(Cluster* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(Cluster, _impl_.max_peer_count_) + sizeof(Cluster::_impl_.max_peer_count_) - PROTOBUF_FIELD_OFFSET(Cluster, _impl_.id_)>( @@ -484,165 +564,94 @@ void Cluster::InternalSwap(Cluster* other) { reinterpret_cast(&other->_impl_.id_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Cluster::GetMetadata() const { +::google::protobuf::Metadata Cluster::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_metapb_2eproto_getter, &descriptor_table_metapb_2eproto_once, file_level_metadata_metapb_2eproto[0]); } - // =================================================================== class Store::_Internal { public: }; -Store::Store(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Store::Store(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:metapb.Store) } -Store::Store(const Store& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Store* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.labels_){from._impl_.labels_} - , decltype(_impl_.address_){} - , decltype(_impl_.version_){} - , decltype(_impl_.status_address_){} - , decltype(_impl_.git_hash_){} - , decltype(_impl_.deploy_path_){} - , decltype(_impl_.peer_address_){} - , decltype(_impl_.id_){} - , decltype(_impl_.physically_destroyed_){} - , decltype(_impl_.state_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.address_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.address_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_address().empty()) { - _this->_impl_.address_.Set(from._internal_address(), - _this->GetArenaForAllocation()); - } - _impl_.version_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_version().empty()) { - _this->_impl_.version_.Set(from._internal_version(), - _this->GetArenaForAllocation()); - } - _impl_.status_address_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.status_address_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_status_address().empty()) { - _this->_impl_.status_address_.Set(from._internal_status_address(), - _this->GetArenaForAllocation()); - } - _impl_.git_hash_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.git_hash_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_git_hash().empty()) { - _this->_impl_.git_hash_.Set(from._internal_git_hash(), - _this->GetArenaForAllocation()); - } - _impl_.deploy_path_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.deploy_path_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_deploy_path().empty()) { - _this->_impl_.deploy_path_.Set(from._internal_deploy_path(), - _this->GetArenaForAllocation()); - } - _impl_.peer_address_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.peer_address_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_peer_address().empty()) { - _this->_impl_.peer_address_.Set(from._internal_peer_address(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.id_, &from._impl_.id_, - static_cast(reinterpret_cast(&_impl_.state_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.state_)); +inline PROTOBUF_NDEBUG_INLINE Store::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : labels_{visibility, arena, from.labels_}, + address_(arena, from.address_), + version_(arena, from.version_), + status_address_(arena, from.status_address_), + git_hash_(arena, from.git_hash_), + deploy_path_(arena, from.deploy_path_), + peer_address_(arena, from.peer_address_), + _cached_size_{0} {} + +Store::Store( + ::google::protobuf::Arena* arena, + const Store& from) + : ::google::protobuf::Message(arena) { + Store* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, id_), + offsetof(Impl_, state_) - + offsetof(Impl_, id_) + + sizeof(Impl_::state_)); + // @@protoc_insertion_point(copy_constructor:metapb.Store) } - -inline void Store::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.labels_){arena} - , decltype(_impl_.address_){} - , decltype(_impl_.version_){} - , decltype(_impl_.status_address_){} - , decltype(_impl_.git_hash_){} - , decltype(_impl_.deploy_path_){} - , decltype(_impl_.peer_address_){} - , decltype(_impl_.id_){uint64_t{0u}} - , decltype(_impl_.physically_destroyed_){int64_t{0}} - , decltype(_impl_.state_){0} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.address_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.address_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.status_address_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.status_address_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.git_hash_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.git_hash_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.deploy_path_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.deploy_path_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.peer_address_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.peer_address_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE Store::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : labels_{visibility, arena}, + address_(arena), + version_(arena), + status_address_(arena), + git_hash_(arena), + deploy_path_(arena), + peer_address_(arena), + _cached_size_{0} {} + +inline void Store::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + 0, + offsetof(Impl_, state_) - + offsetof(Impl_, id_) + + sizeof(Impl_::state_)); } - Store::~Store() { // @@protoc_insertion_point(destructor:metapb.Store) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Store::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.labels_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.address_.Destroy(); _impl_.version_.Destroy(); _impl_.status_address_.Destroy(); _impl_.git_hash_.Destroy(); _impl_.deploy_path_.Destroy(); _impl_.peer_address_.Destroy(); + _impl_.~Impl_(); } -void Store::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Store::Clear() { +PROTOBUF_NOINLINE void Store::Clear() { // @@protoc_insertion_point(message_clear_start:metapb.Store) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -653,332 +662,299 @@ void Store::Clear() { _impl_.git_hash_.ClearToEmpty(); _impl_.deploy_path_.ClearToEmpty(); _impl_.peer_address_.ClearToEmpty(); - ::memset(&_impl_.id_, 0, static_cast( + ::memset(&_impl_.id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.state_) - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.state_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Store::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string address = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_address(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.Store.address")); - } else - goto handle_unusual; - continue; - // .metapb.StoreState state = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_state(static_cast<::metapb::StoreState>(val)); - } else - goto handle_unusual; - continue; - // repeated .metapb.StoreLabel labels = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_labels(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else - goto handle_unusual; - continue; - // string version = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_version(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.Store.version")); - } else - goto handle_unusual; - continue; - // string status_address = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - auto str = _internal_mutable_status_address(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.Store.status_address")); - } else - goto handle_unusual; - continue; - // string git_hash = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { - auto str = _internal_mutable_git_hash(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.Store.git_hash")); - } else - goto handle_unusual; - continue; - // string deploy_path = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { - auto str = _internal_mutable_deploy_path(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.Store.deploy_path")); - } else - goto handle_unusual; - continue; - // int64 physically_destroyed = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _impl_.physically_destroyed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string peer_address = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { - auto str = _internal_mutable_peer_address(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.Store.peer_address")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Store::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Store::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 10, 1, 88, 2> Store::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 10, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294966272, // skipmap + offsetof(decltype(_table_), field_entries), + 10, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Store_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Store, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.id_)}}, + // string address = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.address_)}}, + // .metapb.StoreState state = 3; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Store, _impl_.state_), 63>(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.state_)}}, + // repeated .metapb.StoreLabel labels = 4; + {::_pbi::TcParser::FastMtR1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.labels_)}}, + // string version = 5; + {::_pbi::TcParser::FastUS1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.version_)}}, + // string status_address = 6; + {::_pbi::TcParser::FastUS1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.status_address_)}}, + // string git_hash = 7; + {::_pbi::TcParser::FastUS1, + {58, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.git_hash_)}}, + // string deploy_path = 8; + {::_pbi::TcParser::FastUS1, + {66, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.deploy_path_)}}, + // int64 physically_destroyed = 9; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Store, _impl_.physically_destroyed_), 63>(), + {72, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.physically_destroyed_)}}, + // string peer_address = 10; + {::_pbi::TcParser::FastUS1, + {82, 63, 0, PROTOBUF_FIELD_OFFSET(Store, _impl_.peer_address_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // string address = 2; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.address_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // .metapb.StoreState state = 3; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.state_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // repeated .metapb.StoreLabel labels = 4; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.labels_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // string version = 5; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.version_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string status_address = 6; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.status_address_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string git_hash = 7; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.git_hash_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string deploy_path = 8; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.deploy_path_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int64 physically_destroyed = 9; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.physically_destroyed_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt64)}, + // string peer_address = 10; + {PROTOBUF_FIELD_OFFSET(Store, _impl_.peer_address_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::metapb::StoreLabel>()}, + }}, {{ + "\14\0\7\0\0\7\16\10\13\0\14\0\0\0\0\0" + "metapb.Store" + "address" + "version" + "status_address" + "git_hash" + "deploy_path" + "peer_address" + }}, +}; + +::uint8_t* Store::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:metapb.Store) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 id = 1; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); } // string address = 2; if (!this->_internal_address().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_address().data(), static_cast(this->_internal_address().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.Store.address"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_address(), target); + const std::string& _s = this->_internal_address(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.Store.address"); + target = stream->WriteStringMaybeAliased(2, _s, target); } // .metapb.StoreState state = 3; if (this->_internal_state() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_state(), target); + 3, this->_internal_state(), target); } // repeated .metapb.StoreLabel labels = 4; for (unsigned i = 0, n = static_cast(this->_internal_labels_size()); i < n; i++) { - const auto& repfield = this->_internal_labels(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_labels().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); } // string version = 5; if (!this->_internal_version().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_version().data(), static_cast(this->_internal_version().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.Store.version"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_version(), target); + const std::string& _s = this->_internal_version(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.Store.version"); + target = stream->WriteStringMaybeAliased(5, _s, target); } // string status_address = 6; if (!this->_internal_status_address().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_status_address().data(), static_cast(this->_internal_status_address().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.Store.status_address"); - target = stream->WriteStringMaybeAliased( - 6, this->_internal_status_address(), target); + const std::string& _s = this->_internal_status_address(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.Store.status_address"); + target = stream->WriteStringMaybeAliased(6, _s, target); } // string git_hash = 7; if (!this->_internal_git_hash().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_git_hash().data(), static_cast(this->_internal_git_hash().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.Store.git_hash"); - target = stream->WriteStringMaybeAliased( - 7, this->_internal_git_hash(), target); + const std::string& _s = this->_internal_git_hash(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.Store.git_hash"); + target = stream->WriteStringMaybeAliased(7, _s, target); } // string deploy_path = 8; if (!this->_internal_deploy_path().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_deploy_path().data(), static_cast(this->_internal_deploy_path().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.Store.deploy_path"); - target = stream->WriteStringMaybeAliased( - 8, this->_internal_deploy_path(), target); + const std::string& _s = this->_internal_deploy_path(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.Store.deploy_path"); + target = stream->WriteStringMaybeAliased(8, _s, target); } // int64 physically_destroyed = 9; if (this->_internal_physically_destroyed() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt64ToArray(9, this->_internal_physically_destroyed(), target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<9>( + stream, this->_internal_physically_destroyed(), target); } // string peer_address = 10; if (!this->_internal_peer_address().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_peer_address().data(), static_cast(this->_internal_peer_address().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.Store.peer_address"); - target = stream->WriteStringMaybeAliased( - 10, this->_internal_peer_address(), target); + const std::string& _s = this->_internal_peer_address(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.Store.peer_address"); + target = stream->WriteStringMaybeAliased(10, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:metapb.Store) return target; } -size_t Store::ByteSizeLong() const { +::size_t Store::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:metapb.Store) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .metapb.StoreLabel labels = 4; total_size += 1UL * this->_internal_labels_size(); - for (const auto& msg : this->_impl_.labels_) { + for (const auto& msg : this->_internal_labels()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // string address = 2; if (!this->_internal_address().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_address()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_address()); } // string version = 5; if (!this->_internal_version().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_version()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_version()); } // string status_address = 6; if (!this->_internal_status_address().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_status_address()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_status_address()); } // string git_hash = 7; if (!this->_internal_git_hash().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_git_hash()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_git_hash()); } // string deploy_path = 8; if (!this->_internal_deploy_path().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_deploy_path()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_deploy_path()); } // string peer_address = 10; if (!this->_internal_peer_address().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_peer_address()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_peer_address()); } // uint64 id = 1; if (this->_internal_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); } // int64 physically_destroyed = 9; if (this->_internal_physically_destroyed() != 0) { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_physically_destroyed()); + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this->_internal_physically_destroyed()); } // .metapb.StoreState state = 3; if (this->_internal_state() != 0) { total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_state()); + ::_pbi::WireFormatLite::EnumSize(this->_internal_state()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Store::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Store::MergeImpl +const ::google::protobuf::Message::ClassData Store::_class_data_ = { + Store::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Store::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Store::GetClassData() const { + return &_class_data_; +} -void Store::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Store::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:metapb.Store) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.labels_.MergeFrom(from._impl_.labels_); + _this->_internal_mutable_labels()->MergeFrom( + from._internal_labels()); if (!from._internal_address().empty()) { _this->_internal_set_address(from._internal_address()); } @@ -1006,7 +982,7 @@ void Store::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF if (from._internal_state() != 0) { _this->_internal_set_state(from._internal_state()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Store::CopyFrom(const Store& from) { @@ -1016,41 +992,26 @@ void Store::CopyFrom(const Store& from) { MergeFrom(from); } -bool Store::IsInitialized() const { +PROTOBUF_NOINLINE bool Store::IsInitialized() const { return true; } -void Store::InternalSwap(Store* other) { +::_pbi::CachedSize* Store::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Store::InternalSwap(Store* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.labels_.InternalSwap(&other->_impl_.labels_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.address_, lhs_arena, - &other->_impl_.address_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.version_, lhs_arena, - &other->_impl_.version_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.status_address_, lhs_arena, - &other->_impl_.status_address_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.git_hash_, lhs_arena, - &other->_impl_.git_hash_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.deploy_path_, lhs_arena, - &other->_impl_.deploy_path_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.peer_address_, lhs_arena, - &other->_impl_.peer_address_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.address_, &other->_impl_.address_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.version_, &other->_impl_.version_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.status_address_, &other->_impl_.status_address_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.git_hash_, &other->_impl_.git_hash_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.deploy_path_, &other->_impl_.deploy_path_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.peer_address_, &other->_impl_.peer_address_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(Store, _impl_.state_) + sizeof(Store::_impl_.state_) - PROTOBUF_FIELD_OFFSET(Store, _impl_.id_)>( @@ -1058,222 +1019,191 @@ void Store::InternalSwap(Store* other) { reinterpret_cast(&other->_impl_.id_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Store::GetMetadata() const { +::google::protobuf::Metadata Store::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_metapb_2eproto_getter, &descriptor_table_metapb_2eproto_once, file_level_metadata_metapb_2eproto[1]); } - // =================================================================== class StoreLabel::_Internal { public: }; -StoreLabel::StoreLabel(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +StoreLabel::StoreLabel(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:metapb.StoreLabel) } -StoreLabel::StoreLabel(const StoreLabel& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - StoreLabel* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } +inline PROTOBUF_NDEBUG_INLINE StoreLabel::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : key_(arena, from.key_), + value_(arena, from.value_), + _cached_size_{0} {} + +StoreLabel::StoreLabel( + ::google::protobuf::Arena* arena, + const StoreLabel& from) + : ::google::protobuf::Message(arena) { + StoreLabel* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + // @@protoc_insertion_point(copy_constructor:metapb.StoreLabel) } +inline PROTOBUF_NDEBUG_INLINE StoreLabel::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : key_(arena), + value_(arena), + _cached_size_{0} {} -inline void StoreLabel::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void StoreLabel::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); } - StoreLabel::~StoreLabel() { // @@protoc_insertion_point(destructor:metapb.StoreLabel) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void StoreLabel::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.key_.Destroy(); _impl_.value_.Destroy(); + _impl_.~Impl_(); } -void StoreLabel::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void StoreLabel::Clear() { +PROTOBUF_NOINLINE void StoreLabel::Clear() { // @@protoc_insertion_point(message_clear_start:metapb.StoreLabel) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.key_.ClearToEmpty(); _impl_.value_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* StoreLabel::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string key = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.StoreLabel.key")); - } else - goto handle_unusual; - continue; - // string value = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_value(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "metapb.StoreLabel.value")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* StoreLabel::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* StoreLabel::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 34, 2> StoreLabel::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_StoreLabel_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string value = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(StoreLabel, _impl_.value_)}}, + // string key = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(StoreLabel, _impl_.key_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string key = 1; + {PROTOBUF_FIELD_OFFSET(StoreLabel, _impl_.key_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string value = 2; + {PROTOBUF_FIELD_OFFSET(StoreLabel, _impl_.value_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\21\3\5\0\0\0\0\0" + "metapb.StoreLabel" + "key" + "value" + }}, +}; + +::uint8_t* StoreLabel::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:metapb.StoreLabel) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // string key = 1; if (!this->_internal_key().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_key().data(), static_cast(this->_internal_key().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.StoreLabel.key"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_key(), target); + const std::string& _s = this->_internal_key(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.StoreLabel.key"); + target = stream->WriteStringMaybeAliased(1, _s, target); } // string value = 2; if (!this->_internal_value().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_value().data(), static_cast(this->_internal_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "metapb.StoreLabel.value"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_value(), target); + const std::string& _s = this->_internal_value(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "metapb.StoreLabel.value"); + target = stream->WriteStringMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:metapb.StoreLabel) return target; } -size_t StoreLabel::ByteSizeLong() const { +::size_t StoreLabel::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:metapb.StoreLabel) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string key = 1; if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_key()); } // string value = 2; if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_value()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_value()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StoreLabel::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - StoreLabel::MergeImpl +const ::google::protobuf::Message::ClassData StoreLabel::_class_data_ = { + StoreLabel::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StoreLabel::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* StoreLabel::GetClassData() const { + return &_class_data_; +} -void StoreLabel::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void StoreLabel::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:metapb.StoreLabel) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_key().empty()) { @@ -1282,7 +1212,7 @@ void StoreLabel::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PRO if (!from._internal_value().empty()) { _this->_internal_set_value(from._internal_value()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void StoreLabel::CopyFrom(const StoreLabel& from) { @@ -1292,148 +1222,117 @@ void StoreLabel::CopyFrom(const StoreLabel& from) { MergeFrom(from); } -bool StoreLabel::IsInitialized() const { +PROTOBUF_NOINLINE bool StoreLabel::IsInitialized() const { return true; } -void StoreLabel::InternalSwap(StoreLabel* other) { +::_pbi::CachedSize* StoreLabel::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void StoreLabel::InternalSwap(StoreLabel* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); } -::PROTOBUF_NAMESPACE_ID::Metadata StoreLabel::GetMetadata() const { +::google::protobuf::Metadata StoreLabel::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_metapb_2eproto_getter, &descriptor_table_metapb_2eproto_once, file_level_metadata_metapb_2eproto[2]); } - // =================================================================== class Region::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Region, _impl_._has_bits_); static const ::metapb::RegionEpoch& region_epoch(const Region* msg); + static void set_has_region_epoch(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::metapb::RegionEpoch& -Region::_Internal::region_epoch(const Region* msg) { +const ::metapb::RegionEpoch& Region::_Internal::region_epoch(const Region* msg) { return *msg->_impl_.region_epoch_; } -Region::Region(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Region::Region(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:metapb.Region) } -Region::Region(const Region& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Region* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.peers_){from._impl_.peers_} - , decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.encryption_meta_){} - , decltype(_impl_.region_epoch_){nullptr} - , decltype(_impl_.id_){} - , decltype(_impl_.is_in_flashback_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_start_key().empty()) { - _this->_impl_.start_key_.Set(from._internal_start_key(), - _this->GetArenaForAllocation()); - } - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_end_key().empty()) { - _this->_impl_.end_key_.Set(from._internal_end_key(), - _this->GetArenaForAllocation()); - } - _impl_.encryption_meta_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.encryption_meta_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_encryption_meta().empty()) { - _this->_impl_.encryption_meta_.Set(from._internal_encryption_meta(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_region_epoch()) { - _this->_impl_.region_epoch_ = new ::metapb::RegionEpoch(*from._impl_.region_epoch_); - } - ::memcpy(&_impl_.id_, &from._impl_.id_, - static_cast(reinterpret_cast(&_impl_.is_in_flashback_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.is_in_flashback_)); +inline PROTOBUF_NDEBUG_INLINE Region::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + peers_{visibility, arena, from.peers_}, + start_key_(arena, from.start_key_), + end_key_(arena, from.end_key_), + encryption_meta_(arena, from.encryption_meta_) {} + +Region::Region( + ::google::protobuf::Arena* arena, + const Region& from) + : ::google::protobuf::Message(arena) { + Region* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.region_epoch_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::metapb::RegionEpoch>(arena, *from._impl_.region_epoch_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, id_), + offsetof(Impl_, is_in_flashback_) - + offsetof(Impl_, id_) + + sizeof(Impl_::is_in_flashback_)); + // @@protoc_insertion_point(copy_constructor:metapb.Region) } - -inline void Region::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.peers_){arena} - , decltype(_impl_.start_key_){} - , decltype(_impl_.end_key_){} - , decltype(_impl_.encryption_meta_){} - , decltype(_impl_.region_epoch_){nullptr} - , decltype(_impl_.id_){uint64_t{0u}} - , decltype(_impl_.is_in_flashback_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.start_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.start_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.end_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.encryption_meta_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.encryption_meta_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE Region::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + peers_{visibility, arena}, + start_key_(arena), + end_key_(arena), + encryption_meta_(arena) {} + +inline void Region::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, region_epoch_), + 0, + offsetof(Impl_, is_in_flashback_) - + offsetof(Impl_, region_epoch_) + + sizeof(Impl_::is_in_flashback_)); } - Region::~Region() { // @@protoc_insertion_point(destructor:metapb.Region) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Region::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.peers_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.start_key_.Destroy(); _impl_.end_key_.Destroy(); _impl_.encryption_meta_.Destroy(); - if (this != internal_default_instance()) delete _impl_.region_epoch_; + delete _impl_.region_epoch_; + _impl_.~Impl_(); } -void Region::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Region::Clear() { +PROTOBUF_NOINLINE void Region::Clear() { // @@protoc_insertion_point(message_clear_start:metapb.Region) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1441,240 +1340,228 @@ void Region::Clear() { _impl_.start_key_.ClearToEmpty(); _impl_.end_key_.ClearToEmpty(); _impl_.encryption_meta_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.region_epoch_ != nullptr) { - delete _impl_.region_epoch_; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.region_epoch_ != nullptr); + _impl_.region_epoch_->Clear(); } - _impl_.region_epoch_ = nullptr; - ::memset(&_impl_.id_, 0, static_cast( + ::memset(&_impl_.id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.is_in_flashback_) - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.is_in_flashback_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Region::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes start_key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_start_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes end_key = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_end_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.RegionEpoch region_epoch = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_region_epoch(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .metapb.Peer peers = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_peers(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); - } else - goto handle_unusual; - continue; - // bytes encryption_meta = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - auto str = _internal_mutable_encryption_meta(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool is_in_flashback = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.is_in_flashback_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Region::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Region::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 2, 0, 2> Region::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Region, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Region_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Region, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Region, _impl_.id_)}}, + // bytes start_key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(Region, _impl_.start_key_)}}, + // bytes end_key = 3; + {::_pbi::TcParser::FastBS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(Region, _impl_.end_key_)}}, + // .metapb.RegionEpoch region_epoch = 4; + {::_pbi::TcParser::FastMtS1, + {34, 0, 0, PROTOBUF_FIELD_OFFSET(Region, _impl_.region_epoch_)}}, + // repeated .metapb.Peer peers = 5; + {::_pbi::TcParser::FastMtR1, + {42, 63, 1, PROTOBUF_FIELD_OFFSET(Region, _impl_.peers_)}}, + // bytes encryption_meta = 6; + {::_pbi::TcParser::FastBS1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(Region, _impl_.encryption_meta_)}}, + // bool is_in_flashback = 7; + {::_pbi::TcParser::SingularVarintNoZag1(), + {56, 63, 0, PROTOBUF_FIELD_OFFSET(Region, _impl_.is_in_flashback_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(Region, _impl_.id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // bytes start_key = 2; + {PROTOBUF_FIELD_OFFSET(Region, _impl_.start_key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bytes end_key = 3; + {PROTOBUF_FIELD_OFFSET(Region, _impl_.end_key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // .metapb.RegionEpoch region_epoch = 4; + {PROTOBUF_FIELD_OFFSET(Region, _impl_.region_epoch_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .metapb.Peer peers = 5; + {PROTOBUF_FIELD_OFFSET(Region, _impl_.peers_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes encryption_meta = 6; + {PROTOBUF_FIELD_OFFSET(Region, _impl_.encryption_meta_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + // bool is_in_flashback = 7; + {PROTOBUF_FIELD_OFFSET(Region, _impl_.is_in_flashback_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + }}, {{ + {::_pbi::TcParser::GetTable<::metapb::RegionEpoch>()}, + {::_pbi::TcParser::GetTable<::metapb::Peer>()}, + }}, {{ + }}, +}; + +::uint8_t* Region::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:metapb.Region) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 id = 1; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); } // bytes start_key = 2; if (!this->_internal_start_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_start_key(), target); + const std::string& _s = this->_internal_start_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } // bytes end_key = 3; if (!this->_internal_end_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_end_key(), target); + const std::string& _s = this->_internal_end_key(); + target = stream->WriteBytesMaybeAliased(3, _s, target); } + cached_has_bits = _impl_._has_bits_[0]; // .metapb.RegionEpoch region_epoch = 4; - if (this->_internal_has_region_epoch()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::region_epoch(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, _Internal::region_epoch(this), _Internal::region_epoch(this).GetCachedSize(), target, stream); } // repeated .metapb.Peer peers = 5; for (unsigned i = 0, n = static_cast(this->_internal_peers_size()); i < n; i++) { - const auto& repfield = this->_internal_peers(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_peers().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream); } // bytes encryption_meta = 6; if (!this->_internal_encryption_meta().empty()) { - target = stream->WriteBytesMaybeAliased( - 6, this->_internal_encryption_meta(), target); + const std::string& _s = this->_internal_encryption_meta(); + target = stream->WriteBytesMaybeAliased(6, _s, target); } // bool is_in_flashback = 7; if (this->_internal_is_in_flashback() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_is_in_flashback(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 7, this->_internal_is_in_flashback(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:metapb.Region) return target; } -size_t Region::ByteSizeLong() const { +::size_t Region::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:metapb.Region) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .metapb.Peer peers = 5; total_size += 1UL * this->_internal_peers_size(); - for (const auto& msg : this->_impl_.peers_) { + for (const auto& msg : this->_internal_peers()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // bytes start_key = 2; if (!this->_internal_start_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_start_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_start_key()); } // bytes end_key = 3; if (!this->_internal_end_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_end_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_end_key()); } // bytes encryption_meta = 6; if (!this->_internal_encryption_meta().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_encryption_meta()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_encryption_meta()); } // .metapb.RegionEpoch region_epoch = 4; - if (this->_internal_has_region_epoch()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_epoch_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_epoch_); } // uint64 id = 1; if (this->_internal_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); } // bool is_in_flashback = 7; if (this->_internal_is_in_flashback() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Region::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Region::MergeImpl +const ::google::protobuf::Message::ClassData Region::_class_data_ = { + Region::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Region::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Region::GetClassData() const { + return &_class_data_; +} -void Region::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Region::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:metapb.Region) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.peers_.MergeFrom(from._impl_.peers_); + _this->_internal_mutable_peers()->MergeFrom( + from._internal_peers()); if (!from._internal_start_key().empty()) { _this->_internal_set_start_key(from._internal_start_key()); } @@ -1684,7 +1571,7 @@ void Region::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBU if (!from._internal_encryption_meta().empty()) { _this->_internal_set_encryption_meta(from._internal_encryption_meta()); } - if (from._internal_has_region_epoch()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_region_epoch()->::metapb::RegionEpoch::MergeFrom( from._internal_region_epoch()); } @@ -1694,7 +1581,7 @@ void Region::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBU if (from._internal_is_in_flashback() != 0) { _this->_internal_set_is_in_flashback(from._internal_is_in_flashback()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Region::CopyFrom(const Region& from) { @@ -1704,29 +1591,24 @@ void Region::CopyFrom(const Region& from) { MergeFrom(from); } -bool Region::IsInitialized() const { +PROTOBUF_NOINLINE bool Region::IsInitialized() const { return true; } -void Region::InternalSwap(Region* other) { +::_pbi::CachedSize* Region::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Region::InternalSwap(Region* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.peers_.InternalSwap(&other->_impl_.peers_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.start_key_, lhs_arena, - &other->_impl_.start_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.end_key_, lhs_arena, - &other->_impl_.end_key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.encryption_meta_, lhs_arena, - &other->_impl_.encryption_meta_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.start_key_, &other->_impl_.start_key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.end_key_, &other->_impl_.end_key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.encryption_meta_, &other->_impl_.encryption_meta_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(Region, _impl_.is_in_flashback_) + sizeof(Region::_impl_.is_in_flashback_) - PROTOBUF_FIELD_OFFSET(Region, _impl_.region_epoch_)>( @@ -1734,184 +1616,174 @@ void Region::InternalSwap(Region* other) { reinterpret_cast(&other->_impl_.region_epoch_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Region::GetMetadata() const { +::google::protobuf::Metadata Region::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_metapb_2eproto_getter, &descriptor_table_metapb_2eproto_once, file_level_metadata_metapb_2eproto[3]); } - // =================================================================== class RegionEpoch::_Internal { public: }; -RegionEpoch::RegionEpoch(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RegionEpoch::RegionEpoch(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:metapb.RegionEpoch) } -RegionEpoch::RegionEpoch(const RegionEpoch& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RegionEpoch* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.conf_ver_){} - , decltype(_impl_.version_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.conf_ver_, &from._impl_.conf_ver_, - static_cast(reinterpret_cast(&_impl_.version_) - - reinterpret_cast(&_impl_.conf_ver_)) + sizeof(_impl_.version_)); - // @@protoc_insertion_point(copy_constructor:metapb.RegionEpoch) -} - -inline void RegionEpoch::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.conf_ver_){uint64_t{0u}} - , decltype(_impl_.version_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +RegionEpoch::RegionEpoch( + ::google::protobuf::Arena* arena, const RegionEpoch& from) + : RegionEpoch(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE RegionEpoch::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} +inline void RegionEpoch::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, conf_ver_), + 0, + offsetof(Impl_, version_) - + offsetof(Impl_, conf_ver_) + + sizeof(Impl_::version_)); +} RegionEpoch::~RegionEpoch() { // @@protoc_insertion_point(destructor:metapb.RegionEpoch) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RegionEpoch::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void RegionEpoch::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void RegionEpoch::Clear() { +PROTOBUF_NOINLINE void RegionEpoch::Clear() { // @@protoc_insertion_point(message_clear_start:metapb.RegionEpoch) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.conf_ver_, 0, static_cast( + ::memset(&_impl_.conf_ver_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.version_) - reinterpret_cast(&_impl_.conf_ver_)) + sizeof(_impl_.version_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RegionEpoch::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 conf_ver = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.conf_ver_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 version = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RegionEpoch::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RegionEpoch::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> RegionEpoch::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_RegionEpoch_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 version = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RegionEpoch, _impl_.version_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(RegionEpoch, _impl_.version_)}}, + // uint64 conf_ver = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RegionEpoch, _impl_.conf_ver_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(RegionEpoch, _impl_.conf_ver_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 conf_ver = 1; + {PROTOBUF_FIELD_OFFSET(RegionEpoch, _impl_.conf_ver_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 version = 2; + {PROTOBUF_FIELD_OFFSET(RegionEpoch, _impl_.version_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* RegionEpoch::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:metapb.RegionEpoch) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 conf_ver = 1; if (this->_internal_conf_ver() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_conf_ver(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_conf_ver(), target); } // uint64 version = 2; if (this->_internal_version() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_version(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_version(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:metapb.RegionEpoch) return target; } -size_t RegionEpoch::ByteSizeLong() const { +::size_t RegionEpoch::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:metapb.RegionEpoch) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // uint64 conf_ver = 1; if (this->_internal_conf_ver() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_conf_ver()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_conf_ver()); } // uint64 version = 2; if (this->_internal_version() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_version()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_version()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RegionEpoch::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RegionEpoch::MergeImpl +const ::google::protobuf::Message::ClassData RegionEpoch::_class_data_ = { + RegionEpoch::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RegionEpoch::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RegionEpoch::GetClassData() const { + return &_class_data_; +} -void RegionEpoch::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RegionEpoch::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:metapb.RegionEpoch) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (from._internal_conf_ver() != 0) { @@ -1920,7 +1792,7 @@ void RegionEpoch::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PR if (from._internal_version() != 0) { _this->_internal_set_version(from._internal_version()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RegionEpoch::CopyFrom(const RegionEpoch& from) { @@ -1930,14 +1802,17 @@ void RegionEpoch::CopyFrom(const RegionEpoch& from) { MergeFrom(from); } -bool RegionEpoch::IsInitialized() const { +PROTOBUF_NOINLINE bool RegionEpoch::IsInitialized() const { return true; } -void RegionEpoch::InternalSwap(RegionEpoch* other) { +::_pbi::CachedSize* RegionEpoch::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RegionEpoch::InternalSwap(RegionEpoch* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RegionEpoch, _impl_.version_) + sizeof(RegionEpoch::_impl_.version_) - PROTOBUF_FIELD_OFFSET(RegionEpoch, _impl_.conf_ver_)>( @@ -1945,229 +1820,211 @@ void RegionEpoch::InternalSwap(RegionEpoch* other) { reinterpret_cast(&other->_impl_.conf_ver_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RegionEpoch::GetMetadata() const { +::google::protobuf::Metadata RegionEpoch::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_metapb_2eproto_getter, &descriptor_table_metapb_2eproto_once, file_level_metadata_metapb_2eproto[4]); } - // =================================================================== class Peer::_Internal { public: }; -Peer::Peer(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Peer::Peer(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:metapb.Peer) } -Peer::Peer(const Peer& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Peer* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.id_){} - , decltype(_impl_.store_id_){} - , decltype(_impl_.role_){} - , decltype(_impl_.is_witness_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.id_, &from._impl_.id_, - static_cast(reinterpret_cast(&_impl_.is_witness_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.is_witness_)); - // @@protoc_insertion_point(copy_constructor:metapb.Peer) -} - -inline void Peer::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.id_){uint64_t{0u}} - , decltype(_impl_.store_id_){uint64_t{0u}} - , decltype(_impl_.role_){0} - , decltype(_impl_.is_witness_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; +Peer::Peer( + ::google::protobuf::Arena* arena, const Peer& from) + : Peer(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE Peer::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} +inline void Peer::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + 0, + offsetof(Impl_, is_witness_) - + offsetof(Impl_, id_) + + sizeof(Impl_::is_witness_)); +} Peer::~Peer() { // @@protoc_insertion_point(destructor:metapb.Peer) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Peer::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void Peer::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Peer::Clear() { +PROTOBUF_NOINLINE void Peer::Clear() { // @@protoc_insertion_point(message_clear_start:metapb.Peer) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.id_, 0, static_cast( + ::memset(&_impl_.id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.is_witness_) - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.is_witness_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Peer::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 store_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.store_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.PeerRole role = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_role(static_cast<::metapb::PeerRole>(val)); - } else - goto handle_unusual; - continue; - // bool is_witness = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.is_witness_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Peer::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Peer::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 0, 2> Peer::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Peer_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // bool is_witness = 4; + {::_pbi::TcParser::SingularVarintNoZag1(), + {32, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.is_witness_)}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Peer, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.id_)}}, + // uint64 store_id = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Peer, _impl_.store_id_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.store_id_)}}, + // .metapb.PeerRole role = 3; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Peer, _impl_.role_), 63>(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.role_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(Peer, _impl_.id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 store_id = 2; + {PROTOBUF_FIELD_OFFSET(Peer, _impl_.store_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .metapb.PeerRole role = 3; + {PROTOBUF_FIELD_OFFSET(Peer, _impl_.role_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // bool is_witness = 4; + {PROTOBUF_FIELD_OFFSET(Peer, _impl_.is_witness_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* Peer::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:metapb.Peer) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 id = 1; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); } // uint64 store_id = 2; if (this->_internal_store_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_store_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_store_id(), target); } // .metapb.PeerRole role = 3; if (this->_internal_role() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 3, this->_internal_role(), target); + 3, this->_internal_role(), target); } // bool is_witness = 4; if (this->_internal_is_witness() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_is_witness(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 4, this->_internal_is_witness(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:metapb.Peer) return target; } -size_t Peer::ByteSizeLong() const { +::size_t Peer::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:metapb.Peer) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // uint64 id = 1; if (this->_internal_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); } // uint64 store_id = 2; if (this->_internal_store_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_store_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_store_id()); } // .metapb.PeerRole role = 3; if (this->_internal_role() != 0) { total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_role()); + ::_pbi::WireFormatLite::EnumSize(this->_internal_role()); } // bool is_witness = 4; if (this->_internal_is_witness() != 0) { - total_size += 1 + 1; + total_size += 2; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Peer::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Peer::MergeImpl +const ::google::protobuf::Message::ClassData Peer::_class_data_ = { + Peer::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Peer::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Peer::GetClassData() const { + return &_class_data_; +} -void Peer::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Peer::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:metapb.Peer) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (from._internal_id() != 0) { @@ -2182,7 +2039,7 @@ void Peer::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_ if (from._internal_is_witness() != 0) { _this->_internal_set_is_witness(from._internal_is_witness()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Peer::CopyFrom(const Peer& from) { @@ -2192,14 +2049,17 @@ void Peer::CopyFrom(const Peer& from) { MergeFrom(from); } -bool Peer::IsInitialized() const { +PROTOBUF_NOINLINE bool Peer::IsInitialized() const { return true; } -void Peer::InternalSwap(Peer* other) { +::_pbi::CachedSize* Peer::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Peer::InternalSwap(Peer* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(Peer, _impl_.is_witness_) + sizeof(Peer::_impl_.is_witness_) - PROTOBUF_FIELD_OFFSET(Peer, _impl_.id_)>( @@ -2207,40 +2067,16 @@ void Peer::InternalSwap(Peer* other) { reinterpret_cast(&other->_impl_.id_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Peer::GetMetadata() const { +::google::protobuf::Metadata Peer::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_metapb_2eproto_getter, &descriptor_table_metapb_2eproto_once, file_level_metadata_metapb_2eproto[5]); } - // @@protoc_insertion_point(namespace_scope) } // namespace metapb -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::metapb::Cluster* -Arena::CreateMaybeMessage< ::metapb::Cluster >(Arena* arena) { - return Arena::CreateMessageInternal< ::metapb::Cluster >(arena); -} -template<> PROTOBUF_NOINLINE ::metapb::Store* -Arena::CreateMaybeMessage< ::metapb::Store >(Arena* arena) { - return Arena::CreateMessageInternal< ::metapb::Store >(arena); -} -template<> PROTOBUF_NOINLINE ::metapb::StoreLabel* -Arena::CreateMaybeMessage< ::metapb::StoreLabel >(Arena* arena) { - return Arena::CreateMessageInternal< ::metapb::StoreLabel >(arena); -} -template<> PROTOBUF_NOINLINE ::metapb::Region* -Arena::CreateMaybeMessage< ::metapb::Region >(Arena* arena) { - return Arena::CreateMessageInternal< ::metapb::Region >(arena); -} -template<> PROTOBUF_NOINLINE ::metapb::RegionEpoch* -Arena::CreateMaybeMessage< ::metapb::RegionEpoch >(Arena* arena) { - return Arena::CreateMessageInternal< ::metapb::RegionEpoch >(arena); -} -template<> PROTOBUF_NOINLINE ::metapb::Peer* -Arena::CreateMaybeMessage< ::metapb::Peer >(Arena* arena) { - return Arena::CreateMessageInternal< ::metapb::Peer >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include +#include "google/protobuf/port_undef.inc" diff --git a/ThirdParty/kvproto/generated/kvproto/metapb.pb.h b/ThirdParty/kvproto/generated/kvproto/metapb.pb.h index dd29345ad..5ff7617c8 100644 --- a/ThirdParty/kvproto/generated/kvproto/metapb.pb.h +++ b/ThirdParty/kvproto/generated/kvproto/metapb.pb.h @@ -1,50 +1,61 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: metapb.proto +// Protobuf C++ Version: 4.25.3 -#ifndef GOOGLE_PROTOBUF_INCLUDED_metapb_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_metapb_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_metapb_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_metapb_2eproto_2epb_2eh #include #include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION < 4025000 +#error "This file was generated by a newer version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please update" +#error "your headers." +#endif // PROTOBUF_VERSION + +#if 4025003 < PROTOBUF_MIN_PROTOC_VERSION +#error "This file was generated by an older version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please" +#error "regenerate this file with a newer version of protoc." +#endif // PROTOBUF_MIN_PROTOC_VERSION +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" // @@protoc_insertion_point(includes) -#include + +// Must be included last. +#include "google/protobuf/port_def.inc" + #define PROTOBUF_INTERNAL_EXPORT_metapb_2eproto -PROTOBUF_NAMESPACE_OPEN + +namespace google { +namespace protobuf { namespace internal { class AnyMetadata; } // namespace internal -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // Internal implementation detail -- do not use these members. struct TableStruct_metapb_2eproto { - static const uint32_t offsets[]; + static const ::uint32_t offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_metapb_2eproto; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_metapb_2eproto; namespace metapb { class Cluster; struct ClusterDefaultTypeInternal; @@ -65,93 +76,111 @@ class StoreLabel; struct StoreLabelDefaultTypeInternal; extern StoreLabelDefaultTypeInternal _StoreLabel_default_instance_; } // namespace metapb -PROTOBUF_NAMESPACE_OPEN -template<> ::metapb::Cluster* Arena::CreateMaybeMessage<::metapb::Cluster>(Arena*); -template<> ::metapb::Peer* Arena::CreateMaybeMessage<::metapb::Peer>(Arena*); -template<> ::metapb::Region* Arena::CreateMaybeMessage<::metapb::Region>(Arena*); -template<> ::metapb::RegionEpoch* Arena::CreateMaybeMessage<::metapb::RegionEpoch>(Arena*); -template<> ::metapb::Store* Arena::CreateMaybeMessage<::metapb::Store>(Arena*); -template<> ::metapb::StoreLabel* Arena::CreateMaybeMessage<::metapb::StoreLabel>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace metapb { +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +namespace metapb { enum StoreState : int { Up = 0, Offline = 1, Tombstone = 2, - StoreState_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - StoreState_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() + StoreState_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + StoreState_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), }; + bool StoreState_IsValid(int value); -constexpr StoreState StoreState_MIN = Up; -constexpr StoreState StoreState_MAX = Tombstone; -constexpr int StoreState_ARRAYSIZE = StoreState_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StoreState_descriptor(); -template -inline const std::string& StoreState_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function StoreState_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - StoreState_descriptor(), enum_t_value); -} -inline bool StoreState_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StoreState* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - StoreState_descriptor(), name, value); +extern const uint32_t StoreState_internal_data_[]; +constexpr StoreState StoreState_MIN = static_cast(0); +constexpr StoreState StoreState_MAX = static_cast(2); +constexpr int StoreState_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +StoreState_descriptor(); +template +const std::string& StoreState_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to StoreState_Name()."); + return StoreState_Name(static_cast(value)); +} +template <> +inline const std::string& StoreState_Name(StoreState value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool StoreState_Parse(absl::string_view name, StoreState* value) { + return ::google::protobuf::internal::ParseNamedEnum( + StoreState_descriptor(), name, value); } enum PeerRole : int { Voter = 0, Learner = 1, IncomingVoter = 2, DemotingVoter = 3, - PeerRole_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - PeerRole_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() + PeerRole_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + PeerRole_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), }; + bool PeerRole_IsValid(int value); -constexpr PeerRole PeerRole_MIN = Voter; -constexpr PeerRole PeerRole_MAX = DemotingVoter; -constexpr int PeerRole_ARRAYSIZE = PeerRole_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PeerRole_descriptor(); -template -inline const std::string& PeerRole_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function PeerRole_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - PeerRole_descriptor(), enum_t_value); -} -inline bool PeerRole_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PeerRole* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - PeerRole_descriptor(), name, value); +extern const uint32_t PeerRole_internal_data_[]; +constexpr PeerRole PeerRole_MIN = static_cast(0); +constexpr PeerRole PeerRole_MAX = static_cast(3); +constexpr int PeerRole_ARRAYSIZE = 3 + 1; +const ::google::protobuf::EnumDescriptor* +PeerRole_descriptor(); +template +const std::string& PeerRole_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to PeerRole_Name()."); + return PeerRole_Name(static_cast(value)); +} +template <> +inline const std::string& PeerRole_Name(PeerRole value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool PeerRole_Parse(absl::string_view name, PeerRole* value) { + return ::google::protobuf::internal::ParseNamedEnum( + PeerRole_descriptor(), name, value); } + // =================================================================== -class Cluster final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:metapb.Cluster) */ { + +// ------------------------------------------------------------------- + +class StoreLabel final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:metapb.StoreLabel) */ { public: - inline Cluster() : Cluster(nullptr) {} - ~Cluster() override; - explicit PROTOBUF_CONSTEXPR Cluster(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline StoreLabel() : StoreLabel(nullptr) {} + ~StoreLabel() override; + template + explicit PROTOBUF_CONSTEXPR StoreLabel(::google::protobuf::internal::ConstantInitialized); - Cluster(const Cluster& from); - Cluster(Cluster&& from) noexcept - : Cluster() { + inline StoreLabel(const StoreLabel& from) + : StoreLabel(nullptr, from) {} + StoreLabel(StoreLabel&& from) noexcept + : StoreLabel() { *this = ::std::move(from); } - inline Cluster& operator=(const Cluster& from) { + inline StoreLabel& operator=(const StoreLabel& from) { CopyFrom(from); return *this; } - inline Cluster& operator=(Cluster&& from) noexcept { + inline StoreLabel& operator=(StoreLabel&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -161,156 +190,196 @@ class Cluster final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Cluster& default_instance() { + static const StoreLabel& default_instance() { return *internal_default_instance(); } - static inline const Cluster* internal_default_instance() { - return reinterpret_cast( - &_Cluster_default_instance_); + static inline const StoreLabel* internal_default_instance() { + return reinterpret_cast( + &_StoreLabel_default_instance_); } static constexpr int kIndexInFileMessages = - 0; + 2; - friend void swap(Cluster& a, Cluster& b) { + friend void swap(StoreLabel& a, StoreLabel& b) { a.Swap(&b); } - inline void Swap(Cluster* other) { + inline void Swap(StoreLabel* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Cluster* other) { + void UnsafeArenaSwap(StoreLabel* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Cluster* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + StoreLabel* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Cluster& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Cluster& from) { - Cluster::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const StoreLabel& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const StoreLabel& from) { + StoreLabel::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Cluster* other); + void InternalSwap(StoreLabel* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "metapb.Cluster"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "metapb.StoreLabel"; } protected: - explicit Cluster(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit StoreLabel(::google::protobuf::Arena* arena); + StoreLabel(::google::protobuf::Arena* arena, const StoreLabel& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kIdFieldNumber = 1, - kMaxPeerCountFieldNumber = 2, + kKeyFieldNumber = 1, + kValueFieldNumber = 2, }; - // uint64 id = 1; - void clear_id(); - uint64_t id() const; - void set_id(uint64_t value); + // string key = 1; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); + private: - uint64_t _internal_id() const; - void _internal_set_id(uint64_t value); + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); + public: + // string value = 2; + void clear_value() ; + const std::string& value() const; + template + void set_value(Arg_&& arg, Args_... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); - // uint64 max_peer_count = 2; - void clear_max_peer_count(); - uint64_t max_peer_count() const; - void set_max_peer_count(uint64_t value); private: - uint64_t _internal_max_peer_count() const; - void _internal_set_max_peer_count(uint64_t value); - public: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value( + const std::string& value); + std::string* _internal_mutable_value(); - // @@protoc_insertion_point(class_scope:metapb.Cluster) + public: + // @@protoc_insertion_point(class_scope:metapb.StoreLabel) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 34, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - uint64_t id_; - uint64_t max_peer_count_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr value_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_metapb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class Store final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:metapb.Store) */ { +class RegionEpoch final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:metapb.RegionEpoch) */ { public: - inline Store() : Store(nullptr) {} - ~Store() override; - explicit PROTOBUF_CONSTEXPR Store(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline RegionEpoch() : RegionEpoch(nullptr) {} + ~RegionEpoch() override; + template + explicit PROTOBUF_CONSTEXPR RegionEpoch(::google::protobuf::internal::ConstantInitialized); - Store(const Store& from); - Store(Store&& from) noexcept - : Store() { + inline RegionEpoch(const RegionEpoch& from) + : RegionEpoch(nullptr, from) {} + RegionEpoch(RegionEpoch&& from) noexcept + : RegionEpoch() { *this = ::std::move(from); } - inline Store& operator=(const Store& from) { + inline RegionEpoch& operator=(const RegionEpoch& from) { CopyFrom(from); return *this; } - inline Store& operator=(Store&& from) noexcept { + inline RegionEpoch& operator=(RegionEpoch&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -320,283 +389,184 @@ class Store final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Store& default_instance() { + static const RegionEpoch& default_instance() { return *internal_default_instance(); } - static inline const Store* internal_default_instance() { - return reinterpret_cast( - &_Store_default_instance_); + static inline const RegionEpoch* internal_default_instance() { + return reinterpret_cast( + &_RegionEpoch_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 4; - friend void swap(Store& a, Store& b) { + friend void swap(RegionEpoch& a, RegionEpoch& b) { a.Swap(&b); } - inline void Swap(Store* other) { + inline void Swap(RegionEpoch* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Store* other) { + void UnsafeArenaSwap(RegionEpoch* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Store* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + RegionEpoch* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Store& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Store& from) { - Store::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const RegionEpoch& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const RegionEpoch& from) { + RegionEpoch::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Store* other); + void InternalSwap(RegionEpoch* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "metapb.Store"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "metapb.RegionEpoch"; } protected: - explicit Store(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RegionEpoch(::google::protobuf::Arena* arena); + RegionEpoch(::google::protobuf::Arena* arena, const RegionEpoch& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kLabelsFieldNumber = 4, - kAddressFieldNumber = 2, - kVersionFieldNumber = 5, - kStatusAddressFieldNumber = 6, - kGitHashFieldNumber = 7, - kDeployPathFieldNumber = 8, - kPeerAddressFieldNumber = 10, - kIdFieldNumber = 1, - kPhysicallyDestroyedFieldNumber = 9, - kStateFieldNumber = 3, + kConfVerFieldNumber = 1, + kVersionFieldNumber = 2, }; - // repeated .metapb.StoreLabel labels = 4; - int labels_size() const; - private: - int _internal_labels_size() const; - public: - void clear_labels(); - ::metapb::StoreLabel* mutable_labels(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::StoreLabel >* - mutable_labels(); - private: - const ::metapb::StoreLabel& _internal_labels(int index) const; - ::metapb::StoreLabel* _internal_add_labels(); - public: - const ::metapb::StoreLabel& labels(int index) const; - ::metapb::StoreLabel* add_labels(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::StoreLabel >& - labels() const; - - // string address = 2; - void clear_address(); - const std::string& address() const; - template - void set_address(ArgT0&& arg0, ArgT... args); - std::string* mutable_address(); - PROTOBUF_NODISCARD std::string* release_address(); - void set_allocated_address(std::string* address); - private: - const std::string& _internal_address() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_address(const std::string& value); - std::string* _internal_mutable_address(); - public: - - // string version = 5; - void clear_version(); - const std::string& version() const; - template - void set_version(ArgT0&& arg0, ArgT... args); - std::string* mutable_version(); - PROTOBUF_NODISCARD std::string* release_version(); - void set_allocated_version(std::string* version); - private: - const std::string& _internal_version() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const std::string& value); - std::string* _internal_mutable_version(); - public: - - // string status_address = 6; - void clear_status_address(); - const std::string& status_address() const; - template - void set_status_address(ArgT0&& arg0, ArgT... args); - std::string* mutable_status_address(); - PROTOBUF_NODISCARD std::string* release_status_address(); - void set_allocated_status_address(std::string* status_address); - private: - const std::string& _internal_status_address() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_status_address(const std::string& value); - std::string* _internal_mutable_status_address(); - public: - - // string git_hash = 7; - void clear_git_hash(); - const std::string& git_hash() const; - template - void set_git_hash(ArgT0&& arg0, ArgT... args); - std::string* mutable_git_hash(); - PROTOBUF_NODISCARD std::string* release_git_hash(); - void set_allocated_git_hash(std::string* git_hash); - private: - const std::string& _internal_git_hash() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_git_hash(const std::string& value); - std::string* _internal_mutable_git_hash(); - public: - - // string deploy_path = 8; - void clear_deploy_path(); - const std::string& deploy_path() const; - template - void set_deploy_path(ArgT0&& arg0, ArgT... args); - std::string* mutable_deploy_path(); - PROTOBUF_NODISCARD std::string* release_deploy_path(); - void set_allocated_deploy_path(std::string* deploy_path); - private: - const std::string& _internal_deploy_path() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_deploy_path(const std::string& value); - std::string* _internal_mutable_deploy_path(); - public: + // uint64 conf_ver = 1; + void clear_conf_ver() ; + ::uint64_t conf_ver() const; + void set_conf_ver(::uint64_t value); - // string peer_address = 10; - void clear_peer_address(); - const std::string& peer_address() const; - template - void set_peer_address(ArgT0&& arg0, ArgT... args); - std::string* mutable_peer_address(); - PROTOBUF_NODISCARD std::string* release_peer_address(); - void set_allocated_peer_address(std::string* peer_address); private: - const std::string& _internal_peer_address() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_peer_address(const std::string& value); - std::string* _internal_mutable_peer_address(); - public: + ::uint64_t _internal_conf_ver() const; + void _internal_set_conf_ver(::uint64_t value); - // uint64 id = 1; - void clear_id(); - uint64_t id() const; - void set_id(uint64_t value); - private: - uint64_t _internal_id() const; - void _internal_set_id(uint64_t value); public: + // uint64 version = 2; + void clear_version() ; + ::uint64_t version() const; + void set_version(::uint64_t value); - // int64 physically_destroyed = 9; - void clear_physically_destroyed(); - int64_t physically_destroyed() const; - void set_physically_destroyed(int64_t value); private: - int64_t _internal_physically_destroyed() const; - void _internal_set_physically_destroyed(int64_t value); - public: + ::uint64_t _internal_version() const; + void _internal_set_version(::uint64_t value); - // .metapb.StoreState state = 3; - void clear_state(); - ::metapb::StoreState state() const; - void set_state(::metapb::StoreState value); - private: - ::metapb::StoreState _internal_state() const; - void _internal_set_state(::metapb::StoreState value); public: - - // @@protoc_insertion_point(class_scope:metapb.Store) + // @@protoc_insertion_point(class_scope:metapb.RegionEpoch) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::StoreLabel > labels_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr address_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr status_address_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr git_hash_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deploy_path_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr peer_address_; - uint64_t id_; - int64_t physically_destroyed_; - int state_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint64_t conf_ver_; + ::uint64_t version_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_metapb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class StoreLabel final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:metapb.StoreLabel) */ { +class Peer final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:metapb.Peer) */ { public: - inline StoreLabel() : StoreLabel(nullptr) {} - ~StoreLabel() override; - explicit PROTOBUF_CONSTEXPR StoreLabel(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Peer() : Peer(nullptr) {} + ~Peer() override; + template + explicit PROTOBUF_CONSTEXPR Peer(::google::protobuf::internal::ConstantInitialized); - StoreLabel(const StoreLabel& from); - StoreLabel(StoreLabel&& from) noexcept - : StoreLabel() { + inline Peer(const Peer& from) + : Peer(nullptr, from) {} + Peer(Peer&& from) noexcept + : Peer() { *this = ::std::move(from); } - inline StoreLabel& operator=(const StoreLabel& from) { + inline Peer& operator=(const Peer& from) { CopyFrom(from); return *this; } - inline StoreLabel& operator=(StoreLabel&& from) noexcept { + inline Peer& operator=(Peer&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -606,166 +576,208 @@ class StoreLabel final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const StoreLabel& default_instance() { + static const Peer& default_instance() { return *internal_default_instance(); } - static inline const StoreLabel* internal_default_instance() { - return reinterpret_cast( - &_StoreLabel_default_instance_); + static inline const Peer* internal_default_instance() { + return reinterpret_cast( + &_Peer_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 5; - friend void swap(StoreLabel& a, StoreLabel& b) { + friend void swap(Peer& a, Peer& b) { a.Swap(&b); } - inline void Swap(StoreLabel* other) { + inline void Swap(Peer* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(StoreLabel* other) { + void UnsafeArenaSwap(Peer* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - StoreLabel* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Peer* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const StoreLabel& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const StoreLabel& from) { - StoreLabel::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Peer& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const Peer& from) { + Peer::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(StoreLabel* other); + void InternalSwap(Peer* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "metapb.StoreLabel"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "metapb.Peer"; } protected: - explicit StoreLabel(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Peer(::google::protobuf::Arena* arena); + Peer(::google::protobuf::Arena* arena, const Peer& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kKeyFieldNumber = 1, - kValueFieldNumber = 2, + kIdFieldNumber = 1, + kStoreIdFieldNumber = 2, + kRoleFieldNumber = 3, + kIsWitnessFieldNumber = 4, }; - // string key = 1; - void clear_key(); - const std::string& key() const; - template - void set_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_key(); - PROTOBUF_NODISCARD std::string* release_key(); - void set_allocated_key(std::string* key); + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + private: - const std::string& _internal_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); - std::string* _internal_mutable_key(); + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + public: + // uint64 store_id = 2; + void clear_store_id() ; + ::uint64_t store_id() const; + void set_store_id(::uint64_t value); - // string value = 2; - void clear_value(); - const std::string& value() const; - template - void set_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_value(); - PROTOBUF_NODISCARD std::string* release_value(); - void set_allocated_value(std::string* value); private: - const std::string& _internal_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); - std::string* _internal_mutable_value(); + ::uint64_t _internal_store_id() const; + void _internal_set_store_id(::uint64_t value); + public: + // .metapb.PeerRole role = 3; + void clear_role() ; + ::metapb::PeerRole role() const; + void set_role(::metapb::PeerRole value); - // @@protoc_insertion_point(class_scope:metapb.StoreLabel) + private: + ::metapb::PeerRole _internal_role() const; + void _internal_set_role(::metapb::PeerRole value); + + public: + // bool is_witness = 4; + void clear_is_witness() ; + bool is_witness() const; + void set_is_witness(bool value); + + private: + bool _internal_is_witness() const; + void _internal_set_is_witness(bool value); + + public: + // @@protoc_insertion_point(class_scope:metapb.Peer) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint64_t id_; + ::uint64_t store_id_; + int role_; + bool is_witness_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_metapb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class Region final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:metapb.Region) */ { +class Cluster final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:metapb.Cluster) */ { public: - inline Region() : Region(nullptr) {} - ~Region() override; - explicit PROTOBUF_CONSTEXPR Region(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Cluster() : Cluster(nullptr) {} + ~Cluster() override; + template + explicit PROTOBUF_CONSTEXPR Cluster(::google::protobuf::internal::ConstantInitialized); - Region(const Region& from); - Region(Region&& from) noexcept - : Region() { + inline Cluster(const Cluster& from) + : Cluster(nullptr, from) {} + Cluster(Cluster&& from) noexcept + : Cluster() { *this = ::std::move(from); } - inline Region& operator=(const Region& from) { + inline Cluster& operator=(const Cluster& from) { CopyFrom(from); return *this; } - inline Region& operator=(Region&& from) noexcept { + inline Cluster& operator=(Cluster&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -775,244 +787,184 @@ class Region final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Region& default_instance() { + static const Cluster& default_instance() { return *internal_default_instance(); } - static inline const Region* internal_default_instance() { - return reinterpret_cast( - &_Region_default_instance_); + static inline const Cluster* internal_default_instance() { + return reinterpret_cast( + &_Cluster_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 0; - friend void swap(Region& a, Region& b) { + friend void swap(Cluster& a, Cluster& b) { a.Swap(&b); } - inline void Swap(Region* other) { + inline void Swap(Cluster* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Region* other) { + void UnsafeArenaSwap(Cluster* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Region* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Cluster* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Region& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Region& from) { - Region::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Cluster& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const Cluster& from) { + Cluster::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Region* other); + void InternalSwap(Cluster* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "metapb.Region"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "metapb.Cluster"; } protected: - explicit Region(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Cluster(::google::protobuf::Arena* arena); + Cluster(::google::protobuf::Arena* arena, const Cluster& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kPeersFieldNumber = 5, - kStartKeyFieldNumber = 2, - kEndKeyFieldNumber = 3, - kEncryptionMetaFieldNumber = 6, - kRegionEpochFieldNumber = 4, kIdFieldNumber = 1, - kIsInFlashbackFieldNumber = 7, + kMaxPeerCountFieldNumber = 2, }; - // repeated .metapb.Peer peers = 5; - int peers_size() const; - private: - int _internal_peers_size() const; - public: - void clear_peers(); - ::metapb::Peer* mutable_peers(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >* - mutable_peers(); - private: - const ::metapb::Peer& _internal_peers(int index) const; - ::metapb::Peer* _internal_add_peers(); - public: - const ::metapb::Peer& peers(int index) const; - ::metapb::Peer* add_peers(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >& - peers() const; - - // bytes start_key = 2; - void clear_start_key(); - const std::string& start_key() const; - template - void set_start_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_start_key(); - PROTOBUF_NODISCARD std::string* release_start_key(); - void set_allocated_start_key(std::string* start_key); - private: - const std::string& _internal_start_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key(const std::string& value); - std::string* _internal_mutable_start_key(); - public: - - // bytes end_key = 3; - void clear_end_key(); - const std::string& end_key() const; - template - void set_end_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_end_key(); - PROTOBUF_NODISCARD std::string* release_end_key(); - void set_allocated_end_key(std::string* end_key); - private: - const std::string& _internal_end_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key(const std::string& value); - std::string* _internal_mutable_end_key(); - public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); - // bytes encryption_meta = 6; - void clear_encryption_meta(); - const std::string& encryption_meta() const; - template - void set_encryption_meta(ArgT0&& arg0, ArgT... args); - std::string* mutable_encryption_meta(); - PROTOBUF_NODISCARD std::string* release_encryption_meta(); - void set_allocated_encryption_meta(std::string* encryption_meta); private: - const std::string& _internal_encryption_meta() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_encryption_meta(const std::string& value); - std::string* _internal_mutable_encryption_meta(); - public: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); - // .metapb.RegionEpoch region_epoch = 4; - bool has_region_epoch() const; - private: - bool _internal_has_region_epoch() const; public: - void clear_region_epoch(); - const ::metapb::RegionEpoch& region_epoch() const; - PROTOBUF_NODISCARD ::metapb::RegionEpoch* release_region_epoch(); - ::metapb::RegionEpoch* mutable_region_epoch(); - void set_allocated_region_epoch(::metapb::RegionEpoch* region_epoch); - private: - const ::metapb::RegionEpoch& _internal_region_epoch() const; - ::metapb::RegionEpoch* _internal_mutable_region_epoch(); - public: - void unsafe_arena_set_allocated_region_epoch( - ::metapb::RegionEpoch* region_epoch); - ::metapb::RegionEpoch* unsafe_arena_release_region_epoch(); + // uint64 max_peer_count = 2; + void clear_max_peer_count() ; + ::uint64_t max_peer_count() const; + void set_max_peer_count(::uint64_t value); - // uint64 id = 1; - void clear_id(); - uint64_t id() const; - void set_id(uint64_t value); private: - uint64_t _internal_id() const; - void _internal_set_id(uint64_t value); - public: + ::uint64_t _internal_max_peer_count() const; + void _internal_set_max_peer_count(::uint64_t value); - // bool is_in_flashback = 7; - void clear_is_in_flashback(); - bool is_in_flashback() const; - void set_is_in_flashback(bool value); - private: - bool _internal_is_in_flashback() const; - void _internal_set_is_in_flashback(bool value); public: - - // @@protoc_insertion_point(class_scope:metapb.Region) + // @@protoc_insertion_point(class_scope:metapb.Cluster) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer > peers_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr start_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr end_key_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encryption_meta_; - ::metapb::RegionEpoch* region_epoch_; - uint64_t id_; - bool is_in_flashback_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint64_t id_; + ::uint64_t max_peer_count_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_metapb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class RegionEpoch final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:metapb.RegionEpoch) */ { +class Store final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:metapb.Store) */ { public: - inline RegionEpoch() : RegionEpoch(nullptr) {} - ~RegionEpoch() override; - explicit PROTOBUF_CONSTEXPR RegionEpoch(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Store() : Store(nullptr) {} + ~Store() override; + template + explicit PROTOBUF_CONSTEXPR Store(::google::protobuf::internal::ConstantInitialized); - RegionEpoch(const RegionEpoch& from); - RegionEpoch(RegionEpoch&& from) noexcept - : RegionEpoch() { + inline Store(const Store& from) + : Store(nullptr, from) {} + Store(Store&& from) noexcept + : Store() { *this = ::std::move(from); } - inline RegionEpoch& operator=(const RegionEpoch& from) { + inline Store& operator=(const Store& from) { CopyFrom(from); return *this; } - inline RegionEpoch& operator=(RegionEpoch&& from) noexcept { + inline Store& operator=(Store&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1022,156 +974,324 @@ class RegionEpoch final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const RegionEpoch& default_instance() { + static const Store& default_instance() { return *internal_default_instance(); } - static inline const RegionEpoch* internal_default_instance() { - return reinterpret_cast( - &_RegionEpoch_default_instance_); + static inline const Store* internal_default_instance() { + return reinterpret_cast( + &_Store_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 1; - friend void swap(RegionEpoch& a, RegionEpoch& b) { + friend void swap(Store& a, Store& b) { a.Swap(&b); } - inline void Swap(RegionEpoch* other) { + inline void Swap(Store* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RegionEpoch* other) { + void UnsafeArenaSwap(Store* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RegionEpoch* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Store* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const RegionEpoch& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const RegionEpoch& from) { - RegionEpoch::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Store& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const Store& from) { + Store::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(RegionEpoch* other); + void InternalSwap(Store* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "metapb.RegionEpoch"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "metapb.Store"; } protected: - explicit RegionEpoch(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Store(::google::protobuf::Arena* arena); + Store(::google::protobuf::Arena* arena, const Store& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kConfVerFieldNumber = 1, - kVersionFieldNumber = 2, + kLabelsFieldNumber = 4, + kAddressFieldNumber = 2, + kVersionFieldNumber = 5, + kStatusAddressFieldNumber = 6, + kGitHashFieldNumber = 7, + kDeployPathFieldNumber = 8, + kPeerAddressFieldNumber = 10, + kIdFieldNumber = 1, + kPhysicallyDestroyedFieldNumber = 9, + kStateFieldNumber = 3, }; - // uint64 conf_ver = 1; - void clear_conf_ver(); - uint64_t conf_ver() const; - void set_conf_ver(uint64_t value); + // repeated .metapb.StoreLabel labels = 4; + int labels_size() const; + private: + int _internal_labels_size() const; + + public: + void clear_labels() ; + ::metapb::StoreLabel* mutable_labels(int index); + ::google::protobuf::RepeatedPtrField< ::metapb::StoreLabel >* + mutable_labels(); private: - uint64_t _internal_conf_ver() const; - void _internal_set_conf_ver(uint64_t value); + const ::google::protobuf::RepeatedPtrField<::metapb::StoreLabel>& _internal_labels() const; + ::google::protobuf::RepeatedPtrField<::metapb::StoreLabel>* _internal_mutable_labels(); public: + const ::metapb::StoreLabel& labels(int index) const; + ::metapb::StoreLabel* add_labels(); + const ::google::protobuf::RepeatedPtrField< ::metapb::StoreLabel >& + labels() const; + // string address = 2; + void clear_address() ; + const std::string& address() const; + template + void set_address(Arg_&& arg, Args_... args); + std::string* mutable_address(); + PROTOBUF_NODISCARD std::string* release_address(); + void set_allocated_address(std::string* value); - // uint64 version = 2; - void clear_version(); - uint64_t version() const; - void set_version(uint64_t value); private: - uint64_t _internal_version() const; - void _internal_set_version(uint64_t value); + const std::string& _internal_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_address( + const std::string& value); + std::string* _internal_mutable_address(); + public: + // string version = 5; + void clear_version() ; + const std::string& version() const; + template + void set_version(Arg_&& arg, Args_... args); + std::string* mutable_version(); + PROTOBUF_NODISCARD std::string* release_version(); + void set_allocated_version(std::string* value); - // @@protoc_insertion_point(class_scope:metapb.RegionEpoch) + private: + const std::string& _internal_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_version( + const std::string& value); + std::string* _internal_mutable_version(); + + public: + // string status_address = 6; + void clear_status_address() ; + const std::string& status_address() const; + template + void set_status_address(Arg_&& arg, Args_... args); + std::string* mutable_status_address(); + PROTOBUF_NODISCARD std::string* release_status_address(); + void set_allocated_status_address(std::string* value); + + private: + const std::string& _internal_status_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_status_address( + const std::string& value); + std::string* _internal_mutable_status_address(); + + public: + // string git_hash = 7; + void clear_git_hash() ; + const std::string& git_hash() const; + template + void set_git_hash(Arg_&& arg, Args_... args); + std::string* mutable_git_hash(); + PROTOBUF_NODISCARD std::string* release_git_hash(); + void set_allocated_git_hash(std::string* value); + + private: + const std::string& _internal_git_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_git_hash( + const std::string& value); + std::string* _internal_mutable_git_hash(); + + public: + // string deploy_path = 8; + void clear_deploy_path() ; + const std::string& deploy_path() const; + template + void set_deploy_path(Arg_&& arg, Args_... args); + std::string* mutable_deploy_path(); + PROTOBUF_NODISCARD std::string* release_deploy_path(); + void set_allocated_deploy_path(std::string* value); + + private: + const std::string& _internal_deploy_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_deploy_path( + const std::string& value); + std::string* _internal_mutable_deploy_path(); + + public: + // string peer_address = 10; + void clear_peer_address() ; + const std::string& peer_address() const; + template + void set_peer_address(Arg_&& arg, Args_... args); + std::string* mutable_peer_address(); + PROTOBUF_NODISCARD std::string* release_peer_address(); + void set_allocated_peer_address(std::string* value); + + private: + const std::string& _internal_peer_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_peer_address( + const std::string& value); + std::string* _internal_mutable_peer_address(); + + public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + + private: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + + public: + // int64 physically_destroyed = 9; + void clear_physically_destroyed() ; + ::int64_t physically_destroyed() const; + void set_physically_destroyed(::int64_t value); + + private: + ::int64_t _internal_physically_destroyed() const; + void _internal_set_physically_destroyed(::int64_t value); + + public: + // .metapb.StoreState state = 3; + void clear_state() ; + ::metapb::StoreState state() const; + void set_state(::metapb::StoreState value); + + private: + ::metapb::StoreState _internal_state() const; + void _internal_set_state(::metapb::StoreState value); + + public: + // @@protoc_insertion_point(class_scope:metapb.Store) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 10, 1, + 88, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - uint64_t conf_ver_; - uint64_t version_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::RepeatedPtrField< ::metapb::StoreLabel > labels_; + ::google::protobuf::internal::ArenaStringPtr address_; + ::google::protobuf::internal::ArenaStringPtr version_; + ::google::protobuf::internal::ArenaStringPtr status_address_; + ::google::protobuf::internal::ArenaStringPtr git_hash_; + ::google::protobuf::internal::ArenaStringPtr deploy_path_; + ::google::protobuf::internal::ArenaStringPtr peer_address_; + ::uint64_t id_; + ::int64_t physically_destroyed_; + int state_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_metapb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class Peer final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:metapb.Peer) */ { +class Region final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:metapb.Region) */ { public: - inline Peer() : Peer(nullptr) {} - ~Peer() override; - explicit PROTOBUF_CONSTEXPR Peer(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Region() : Region(nullptr) {} + ~Region() override; + template + explicit PROTOBUF_CONSTEXPR Region(::google::protobuf::internal::ConstantInitialized); - Peer(const Peer& from); - Peer(Peer&& from) noexcept - : Peer() { + inline Region(const Region& from) + : Region(nullptr, from) {} + Region(Region&& from) noexcept + : Region() { *this = ::std::move(from); } - inline Peer& operator=(const Peer& from) { + inline Region& operator=(const Region& from) { CopyFrom(from); return *this; } - inline Peer& operator=(Peer&& from) noexcept { + inline Region& operator=(Region&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1181,204 +1301,313 @@ class Peer final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Peer& default_instance() { + static const Region& default_instance() { return *internal_default_instance(); } - static inline const Peer* internal_default_instance() { - return reinterpret_cast( - &_Peer_default_instance_); + static inline const Region* internal_default_instance() { + return reinterpret_cast( + &_Region_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 3; - friend void swap(Peer& a, Peer& b) { + friend void swap(Region& a, Region& b) { a.Swap(&b); } - inline void Swap(Peer* other) { + inline void Swap(Region* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Peer* other) { + void UnsafeArenaSwap(Region* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Peer* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Region* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Peer& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Peer& from) { - Peer::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Region& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const Region& from) { + Region::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Peer* other); + void InternalSwap(Region* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "metapb.Peer"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "metapb.Region"; } protected: - explicit Peer(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Region(::google::protobuf::Arena* arena); + Region(::google::protobuf::Arena* arena, const Region& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPeersFieldNumber = 5, + kStartKeyFieldNumber = 2, + kEndKeyFieldNumber = 3, + kEncryptionMetaFieldNumber = 6, + kRegionEpochFieldNumber = 4, + kIdFieldNumber = 1, + kIsInFlashbackFieldNumber = 7, + }; + // repeated .metapb.Peer peers = 5; + int peers_size() const; + private: + int _internal_peers_size() const; + + public: + void clear_peers() ; + ::metapb::Peer* mutable_peers(int index); + ::google::protobuf::RepeatedPtrField< ::metapb::Peer >* + mutable_peers(); + private: + const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& _internal_peers() const; + ::google::protobuf::RepeatedPtrField<::metapb::Peer>* _internal_mutable_peers(); + public: + const ::metapb::Peer& peers(int index) const; + ::metapb::Peer* add_peers(); + const ::google::protobuf::RepeatedPtrField< ::metapb::Peer >& + peers() const; + // bytes start_key = 2; + void clear_start_key() ; + const std::string& start_key() const; + template + void set_start_key(Arg_&& arg, Args_... args); + std::string* mutable_start_key(); + PROTOBUF_NODISCARD std::string* release_start_key(); + void set_allocated_start_key(std::string* value); + + private: + const std::string& _internal_start_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_start_key( + const std::string& value); + std::string* _internal_mutable_start_key(); - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + public: + // bytes end_key = 3; + void clear_end_key() ; + const std::string& end_key() const; + template + void set_end_key(Arg_&& arg, Args_... args); + std::string* mutable_end_key(); + PROTOBUF_NODISCARD std::string* release_end_key(); + void set_allocated_end_key(std::string* value); - // nested types ---------------------------------------------------- + private: + const std::string& _internal_end_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_end_key( + const std::string& value); + std::string* _internal_mutable_end_key(); - // accessors ------------------------------------------------------- + public: + // bytes encryption_meta = 6; + void clear_encryption_meta() ; + const std::string& encryption_meta() const; + template + void set_encryption_meta(Arg_&& arg, Args_... args); + std::string* mutable_encryption_meta(); + PROTOBUF_NODISCARD std::string* release_encryption_meta(); + void set_allocated_encryption_meta(std::string* value); - enum : int { - kIdFieldNumber = 1, - kStoreIdFieldNumber = 2, - kRoleFieldNumber = 3, - kIsWitnessFieldNumber = 4, - }; - // uint64 id = 1; - void clear_id(); - uint64_t id() const; - void set_id(uint64_t value); private: - uint64_t _internal_id() const; - void _internal_set_id(uint64_t value); + const std::string& _internal_encryption_meta() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encryption_meta( + const std::string& value); + std::string* _internal_mutable_encryption_meta(); + public: + // .metapb.RegionEpoch region_epoch = 4; + bool has_region_epoch() const; + void clear_region_epoch() ; + const ::metapb::RegionEpoch& region_epoch() const; + PROTOBUF_NODISCARD ::metapb::RegionEpoch* release_region_epoch(); + ::metapb::RegionEpoch* mutable_region_epoch(); + void set_allocated_region_epoch(::metapb::RegionEpoch* value); + void unsafe_arena_set_allocated_region_epoch(::metapb::RegionEpoch* value); + ::metapb::RegionEpoch* unsafe_arena_release_region_epoch(); - // uint64 store_id = 2; - void clear_store_id(); - uint64_t store_id() const; - void set_store_id(uint64_t value); private: - uint64_t _internal_store_id() const; - void _internal_set_store_id(uint64_t value); + const ::metapb::RegionEpoch& _internal_region_epoch() const; + ::metapb::RegionEpoch* _internal_mutable_region_epoch(); + public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); - // .metapb.PeerRole role = 3; - void clear_role(); - ::metapb::PeerRole role() const; - void set_role(::metapb::PeerRole value); private: - ::metapb::PeerRole _internal_role() const; - void _internal_set_role(::metapb::PeerRole value); + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + public: + // bool is_in_flashback = 7; + void clear_is_in_flashback() ; + bool is_in_flashback() const; + void set_is_in_flashback(bool value); - // bool is_witness = 4; - void clear_is_witness(); - bool is_witness() const; - void set_is_witness(bool value); private: - bool _internal_is_witness() const; - void _internal_set_is_witness(bool value); - public: + bool _internal_is_in_flashback() const; + void _internal_set_is_in_flashback(bool value); - // @@protoc_insertion_point(class_scope:metapb.Peer) + public: + // @@protoc_insertion_point(class_scope:metapb.Region) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 7, 2, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - uint64_t id_; - uint64_t store_id_; - int role_; - bool is_witness_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::metapb::Peer > peers_; + ::google::protobuf::internal::ArenaStringPtr start_key_; + ::google::protobuf::internal::ArenaStringPtr end_key_; + ::google::protobuf::internal::ArenaStringPtr encryption_meta_; + ::metapb::RegionEpoch* region_epoch_; + ::uint64_t id_; + bool is_in_flashback_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_metapb_2eproto; }; + // =================================================================== + + // =================================================================== + #ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ +// ------------------------------------------------------------------- + // Cluster // uint64 id = 1; inline void Cluster::clear_id() { - _impl_.id_ = uint64_t{0u}; -} -inline uint64_t Cluster::_internal_id() const { - return _impl_.id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.id_ = ::uint64_t{0u}; } -inline uint64_t Cluster::id() const { +inline ::uint64_t Cluster::id() const { // @@protoc_insertion_point(field_get:metapb.Cluster.id) return _internal_id(); } -inline void Cluster::_internal_set_id(uint64_t value) { - - _impl_.id_ = value; -} -inline void Cluster::set_id(uint64_t value) { +inline void Cluster::set_id(::uint64_t value) { _internal_set_id(value); // @@protoc_insertion_point(field_set:metapb.Cluster.id) } +inline ::uint64_t Cluster::_internal_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.id_; +} +inline void Cluster::_internal_set_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.id_ = value; +} // uint64 max_peer_count = 2; inline void Cluster::clear_max_peer_count() { - _impl_.max_peer_count_ = uint64_t{0u}; -} -inline uint64_t Cluster::_internal_max_peer_count() const { - return _impl_.max_peer_count_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.max_peer_count_ = ::uint64_t{0u}; } -inline uint64_t Cluster::max_peer_count() const { +inline ::uint64_t Cluster::max_peer_count() const { // @@protoc_insertion_point(field_get:metapb.Cluster.max_peer_count) return _internal_max_peer_count(); } -inline void Cluster::_internal_set_max_peer_count(uint64_t value) { - - _impl_.max_peer_count_ = value; -} -inline void Cluster::set_max_peer_count(uint64_t value) { +inline void Cluster::set_max_peer_count(::uint64_t value) { _internal_set_max_peer_count(value); // @@protoc_insertion_point(field_set:metapb.Cluster.max_peer_count) } +inline ::uint64_t Cluster::_internal_max_peer_count() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.max_peer_count_; +} +inline void Cluster::_internal_set_max_peer_count(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.max_peer_count_ = value; +} // ------------------------------------------------------------------- @@ -1386,401 +1615,437 @@ inline void Cluster::set_max_peer_count(uint64_t value) { // uint64 id = 1; inline void Store::clear_id() { - _impl_.id_ = uint64_t{0u}; -} -inline uint64_t Store::_internal_id() const { - return _impl_.id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.id_ = ::uint64_t{0u}; } -inline uint64_t Store::id() const { +inline ::uint64_t Store::id() const { // @@protoc_insertion_point(field_get:metapb.Store.id) return _internal_id(); } -inline void Store::_internal_set_id(uint64_t value) { - - _impl_.id_ = value; -} -inline void Store::set_id(uint64_t value) { +inline void Store::set_id(::uint64_t value) { _internal_set_id(value); // @@protoc_insertion_point(field_set:metapb.Store.id) } +inline ::uint64_t Store::_internal_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.id_; +} +inline void Store::_internal_set_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.id_ = value; +} // string address = 2; inline void Store::clear_address() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.address_.ClearToEmpty(); } -inline const std::string& Store::address() const { +inline const std::string& Store::address() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Store.address) return _internal_address(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Store::set_address(ArgT0&& arg0, ArgT... args) { - - _impl_.address_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Store::set_address(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.address_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Store.address) } -inline std::string* Store::mutable_address() { +inline std::string* Store::mutable_address() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_address(); // @@protoc_insertion_point(field_mutable:metapb.Store.address) return _s; } inline const std::string& Store::_internal_address() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.address_.Get(); } inline void Store::_internal_set_address(const std::string& value) { - - _impl_.address_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.address_.Set(value, GetArena()); } inline std::string* Store::_internal_mutable_address() { - - return _impl_.address_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.address_.Mutable( GetArena()); } inline std::string* Store::release_address() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Store.address) return _impl_.address_.Release(); } -inline void Store::set_allocated_address(std::string* address) { - if (address != nullptr) { - - } else { - - } - _impl_.address_.SetAllocated(address, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.address_.IsDefault()) { - _impl_.address_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Store::set_allocated_address(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.address_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.address_.IsDefault()) { + _impl_.address_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Store.address) } // .metapb.StoreState state = 3; inline void Store::clear_state() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.state_ = 0; } -inline ::metapb::StoreState Store::_internal_state() const { - return static_cast< ::metapb::StoreState >(_impl_.state_); -} inline ::metapb::StoreState Store::state() const { // @@protoc_insertion_point(field_get:metapb.Store.state) return _internal_state(); } -inline void Store::_internal_set_state(::metapb::StoreState value) { - - _impl_.state_ = value; -} inline void Store::set_state(::metapb::StoreState value) { _internal_set_state(value); // @@protoc_insertion_point(field_set:metapb.Store.state) } +inline ::metapb::StoreState Store::_internal_state() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::metapb::StoreState>(_impl_.state_); +} +inline void Store::_internal_set_state(::metapb::StoreState value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.state_ = value; +} // repeated .metapb.StoreLabel labels = 4; inline int Store::_internal_labels_size() const { - return _impl_.labels_.size(); + return _internal_labels().size(); } inline int Store::labels_size() const { return _internal_labels_size(); } inline void Store::clear_labels() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.labels_.Clear(); } -inline ::metapb::StoreLabel* Store::mutable_labels(int index) { +inline ::metapb::StoreLabel* Store::mutable_labels(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:metapb.Store.labels) - return _impl_.labels_.Mutable(index); + return _internal_mutable_labels()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::StoreLabel >* -Store::mutable_labels() { +inline ::google::protobuf::RepeatedPtrField<::metapb::StoreLabel>* Store::mutable_labels() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:metapb.Store.labels) - return &_impl_.labels_; -} -inline const ::metapb::StoreLabel& Store::_internal_labels(int index) const { - return _impl_.labels_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_labels(); } -inline const ::metapb::StoreLabel& Store::labels(int index) const { +inline const ::metapb::StoreLabel& Store::labels(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Store.labels) - return _internal_labels(index); + return _internal_labels().Get(index); } -inline ::metapb::StoreLabel* Store::_internal_add_labels() { - return _impl_.labels_.Add(); -} -inline ::metapb::StoreLabel* Store::add_labels() { - ::metapb::StoreLabel* _add = _internal_add_labels(); +inline ::metapb::StoreLabel* Store::add_labels() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::metapb::StoreLabel* _add = _internal_mutable_labels()->Add(); // @@protoc_insertion_point(field_add:metapb.Store.labels) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::StoreLabel >& -Store::labels() const { +inline const ::google::protobuf::RepeatedPtrField<::metapb::StoreLabel>& Store::labels() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:metapb.Store.labels) + return _internal_labels(); +} +inline const ::google::protobuf::RepeatedPtrField<::metapb::StoreLabel>& +Store::_internal_labels() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.labels_; } +inline ::google::protobuf::RepeatedPtrField<::metapb::StoreLabel>* +Store::_internal_mutable_labels() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.labels_; +} // string version = 5; inline void Store::clear_version() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.version_.ClearToEmpty(); } -inline const std::string& Store::version() const { +inline const std::string& Store::version() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Store.version) return _internal_version(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Store::set_version(ArgT0&& arg0, ArgT... args) { - - _impl_.version_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Store::set_version(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.version_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Store.version) } -inline std::string* Store::mutable_version() { +inline std::string* Store::mutable_version() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_version(); // @@protoc_insertion_point(field_mutable:metapb.Store.version) return _s; } inline const std::string& Store::_internal_version() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.version_.Get(); } inline void Store::_internal_set_version(const std::string& value) { - - _impl_.version_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.version_.Set(value, GetArena()); } inline std::string* Store::_internal_mutable_version() { - - return _impl_.version_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.version_.Mutable( GetArena()); } inline std::string* Store::release_version() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Store.version) return _impl_.version_.Release(); } -inline void Store::set_allocated_version(std::string* version) { - if (version != nullptr) { - - } else { - - } - _impl_.version_.SetAllocated(version, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.version_.IsDefault()) { - _impl_.version_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Store::set_allocated_version(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.version_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.version_.IsDefault()) { + _impl_.version_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Store.version) } // string status_address = 6; inline void Store::clear_status_address() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.status_address_.ClearToEmpty(); } -inline const std::string& Store::status_address() const { +inline const std::string& Store::status_address() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Store.status_address) return _internal_status_address(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Store::set_status_address(ArgT0&& arg0, ArgT... args) { - - _impl_.status_address_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Store::set_status_address(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.status_address_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Store.status_address) } -inline std::string* Store::mutable_status_address() { +inline std::string* Store::mutable_status_address() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_status_address(); // @@protoc_insertion_point(field_mutable:metapb.Store.status_address) return _s; } inline const std::string& Store::_internal_status_address() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.status_address_.Get(); } inline void Store::_internal_set_status_address(const std::string& value) { - - _impl_.status_address_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.status_address_.Set(value, GetArena()); } inline std::string* Store::_internal_mutable_status_address() { - - return _impl_.status_address_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.status_address_.Mutable( GetArena()); } inline std::string* Store::release_status_address() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Store.status_address) return _impl_.status_address_.Release(); } -inline void Store::set_allocated_status_address(std::string* status_address) { - if (status_address != nullptr) { - - } else { - - } - _impl_.status_address_.SetAllocated(status_address, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.status_address_.IsDefault()) { - _impl_.status_address_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Store::set_allocated_status_address(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.status_address_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.status_address_.IsDefault()) { + _impl_.status_address_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Store.status_address) } // string git_hash = 7; inline void Store::clear_git_hash() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.git_hash_.ClearToEmpty(); } -inline const std::string& Store::git_hash() const { +inline const std::string& Store::git_hash() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Store.git_hash) return _internal_git_hash(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Store::set_git_hash(ArgT0&& arg0, ArgT... args) { - - _impl_.git_hash_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Store::set_git_hash(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.git_hash_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Store.git_hash) } -inline std::string* Store::mutable_git_hash() { +inline std::string* Store::mutable_git_hash() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_git_hash(); // @@protoc_insertion_point(field_mutable:metapb.Store.git_hash) return _s; } inline const std::string& Store::_internal_git_hash() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.git_hash_.Get(); } inline void Store::_internal_set_git_hash(const std::string& value) { - - _impl_.git_hash_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.git_hash_.Set(value, GetArena()); } inline std::string* Store::_internal_mutable_git_hash() { - - return _impl_.git_hash_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.git_hash_.Mutable( GetArena()); } inline std::string* Store::release_git_hash() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Store.git_hash) return _impl_.git_hash_.Release(); } -inline void Store::set_allocated_git_hash(std::string* git_hash) { - if (git_hash != nullptr) { - - } else { - - } - _impl_.git_hash_.SetAllocated(git_hash, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.git_hash_.IsDefault()) { - _impl_.git_hash_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Store::set_allocated_git_hash(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.git_hash_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.git_hash_.IsDefault()) { + _impl_.git_hash_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Store.git_hash) } // string deploy_path = 8; inline void Store::clear_deploy_path() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.deploy_path_.ClearToEmpty(); } -inline const std::string& Store::deploy_path() const { +inline const std::string& Store::deploy_path() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Store.deploy_path) return _internal_deploy_path(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Store::set_deploy_path(ArgT0&& arg0, ArgT... args) { - - _impl_.deploy_path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Store::set_deploy_path(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.deploy_path_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Store.deploy_path) } -inline std::string* Store::mutable_deploy_path() { +inline std::string* Store::mutable_deploy_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_deploy_path(); // @@protoc_insertion_point(field_mutable:metapb.Store.deploy_path) return _s; } inline const std::string& Store::_internal_deploy_path() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.deploy_path_.Get(); } inline void Store::_internal_set_deploy_path(const std::string& value) { - - _impl_.deploy_path_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.deploy_path_.Set(value, GetArena()); } inline std::string* Store::_internal_mutable_deploy_path() { - - return _impl_.deploy_path_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.deploy_path_.Mutable( GetArena()); } inline std::string* Store::release_deploy_path() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Store.deploy_path) return _impl_.deploy_path_.Release(); } -inline void Store::set_allocated_deploy_path(std::string* deploy_path) { - if (deploy_path != nullptr) { - - } else { - - } - _impl_.deploy_path_.SetAllocated(deploy_path, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.deploy_path_.IsDefault()) { - _impl_.deploy_path_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Store::set_allocated_deploy_path(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.deploy_path_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.deploy_path_.IsDefault()) { + _impl_.deploy_path_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Store.deploy_path) } // int64 physically_destroyed = 9; inline void Store::clear_physically_destroyed() { - _impl_.physically_destroyed_ = int64_t{0}; -} -inline int64_t Store::_internal_physically_destroyed() const { - return _impl_.physically_destroyed_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.physically_destroyed_ = ::int64_t{0}; } -inline int64_t Store::physically_destroyed() const { +inline ::int64_t Store::physically_destroyed() const { // @@protoc_insertion_point(field_get:metapb.Store.physically_destroyed) return _internal_physically_destroyed(); } -inline void Store::_internal_set_physically_destroyed(int64_t value) { - - _impl_.physically_destroyed_ = value; -} -inline void Store::set_physically_destroyed(int64_t value) { +inline void Store::set_physically_destroyed(::int64_t value) { _internal_set_physically_destroyed(value); // @@protoc_insertion_point(field_set:metapb.Store.physically_destroyed) } +inline ::int64_t Store::_internal_physically_destroyed() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.physically_destroyed_; +} +inline void Store::_internal_set_physically_destroyed(::int64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.physically_destroyed_ = value; +} // string peer_address = 10; inline void Store::clear_peer_address() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.peer_address_.ClearToEmpty(); } -inline const std::string& Store::peer_address() const { +inline const std::string& Store::peer_address() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Store.peer_address) return _internal_peer_address(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Store::set_peer_address(ArgT0&& arg0, ArgT... args) { - - _impl_.peer_address_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Store::set_peer_address(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.peer_address_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Store.peer_address) } -inline std::string* Store::mutable_peer_address() { +inline std::string* Store::mutable_peer_address() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_peer_address(); // @@protoc_insertion_point(field_mutable:metapb.Store.peer_address) return _s; } inline const std::string& Store::_internal_peer_address() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.peer_address_.Get(); } inline void Store::_internal_set_peer_address(const std::string& value) { - - _impl_.peer_address_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.peer_address_.Set(value, GetArena()); } inline std::string* Store::_internal_mutable_peer_address() { - - return _impl_.peer_address_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.peer_address_.Mutable( GetArena()); } inline std::string* Store::release_peer_address() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Store.peer_address) return _impl_.peer_address_.Release(); } -inline void Store::set_allocated_peer_address(std::string* peer_address) { - if (peer_address != nullptr) { - - } else { - - } - _impl_.peer_address_.SetAllocated(peer_address, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.peer_address_.IsDefault()) { - _impl_.peer_address_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Store::set_allocated_peer_address(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.peer_address_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.peer_address_.IsDefault()) { + _impl_.peer_address_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Store.peer_address) } @@ -1790,101 +2055,107 @@ inline void Store::set_allocated_peer_address(std::string* peer_address) { // string key = 1; inline void StoreLabel::clear_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.key_.ClearToEmpty(); } -inline const std::string& StoreLabel::key() const { +inline const std::string& StoreLabel::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.StoreLabel.key) return _internal_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void StoreLabel::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void StoreLabel::set_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.StoreLabel.key) } -inline std::string* StoreLabel::mutable_key() { +inline std::string* StoreLabel::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_key(); // @@protoc_insertion_point(field_mutable:metapb.StoreLabel.key) return _s; } inline const std::string& StoreLabel::_internal_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.key_.Get(); } inline void StoreLabel::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.key_.Set(value, GetArena()); } inline std::string* StoreLabel::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.key_.Mutable( GetArena()); } inline std::string* StoreLabel::release_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.StoreLabel.key) return _impl_.key_.Release(); } -inline void StoreLabel::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - - } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void StoreLabel::set_allocated_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.StoreLabel.key) } // string value = 2; inline void StoreLabel::clear_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.value_.ClearToEmpty(); } -inline const std::string& StoreLabel::value() const { +inline const std::string& StoreLabel::value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.StoreLabel.value) return _internal_value(); } -template -inline PROTOBUF_ALWAYS_INLINE -void StoreLabel::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void StoreLabel::set_value(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.StoreLabel.value) } -inline std::string* StoreLabel::mutable_value() { +inline std::string* StoreLabel::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_value(); // @@protoc_insertion_point(field_mutable:metapb.StoreLabel.value) return _s; } inline const std::string& StoreLabel::_internal_value() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.value_.Get(); } inline void StoreLabel::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.value_.Set(value, GetArena()); } inline std::string* StoreLabel::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.value_.Mutable( GetArena()); } inline std::string* StoreLabel::release_value() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.StoreLabel.value) return _impl_.value_.Release(); } inline void StoreLabel::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - - } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.value_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.StoreLabel.value) } @@ -1894,323 +2165,353 @@ inline void StoreLabel::set_allocated_value(std::string* value) { // uint64 id = 1; inline void Region::clear_id() { - _impl_.id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.id_ = ::uint64_t{0u}; } -inline uint64_t Region::_internal_id() const { - return _impl_.id_; -} -inline uint64_t Region::id() const { +inline ::uint64_t Region::id() const { // @@protoc_insertion_point(field_get:metapb.Region.id) return _internal_id(); } -inline void Region::_internal_set_id(uint64_t value) { - - _impl_.id_ = value; -} -inline void Region::set_id(uint64_t value) { +inline void Region::set_id(::uint64_t value) { _internal_set_id(value); // @@protoc_insertion_point(field_set:metapb.Region.id) } +inline ::uint64_t Region::_internal_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.id_; +} +inline void Region::_internal_set_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.id_ = value; +} // bytes start_key = 2; inline void Region::clear_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.start_key_.ClearToEmpty(); } -inline const std::string& Region::start_key() const { +inline const std::string& Region::start_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Region.start_key) return _internal_start_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Region::set_start_key(ArgT0&& arg0, ArgT... args) { - - _impl_.start_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Region::set_start_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Region.start_key) } -inline std::string* Region::mutable_start_key() { +inline std::string* Region::mutable_start_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_start_key(); // @@protoc_insertion_point(field_mutable:metapb.Region.start_key) return _s; } inline const std::string& Region::_internal_start_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.start_key_.Get(); } inline void Region::_internal_set_start_key(const std::string& value) { - - _impl_.start_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.start_key_.Set(value, GetArena()); } inline std::string* Region::_internal_mutable_start_key() { - - return _impl_.start_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.start_key_.Mutable( GetArena()); } inline std::string* Region::release_start_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Region.start_key) return _impl_.start_key_.Release(); } -inline void Region::set_allocated_start_key(std::string* start_key) { - if (start_key != nullptr) { - - } else { - - } - _impl_.start_key_.SetAllocated(start_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.start_key_.IsDefault()) { - _impl_.start_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Region::set_allocated_start_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.start_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.start_key_.IsDefault()) { + _impl_.start_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Region.start_key) } // bytes end_key = 3; inline void Region::clear_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.end_key_.ClearToEmpty(); } -inline const std::string& Region::end_key() const { +inline const std::string& Region::end_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Region.end_key) return _internal_end_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Region::set_end_key(ArgT0&& arg0, ArgT... args) { - - _impl_.end_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Region::set_end_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Region.end_key) } -inline std::string* Region::mutable_end_key() { +inline std::string* Region::mutable_end_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_end_key(); // @@protoc_insertion_point(field_mutable:metapb.Region.end_key) return _s; } inline const std::string& Region::_internal_end_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.end_key_.Get(); } inline void Region::_internal_set_end_key(const std::string& value) { - - _impl_.end_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.end_key_.Set(value, GetArena()); } inline std::string* Region::_internal_mutable_end_key() { - - return _impl_.end_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.end_key_.Mutable( GetArena()); } inline std::string* Region::release_end_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Region.end_key) return _impl_.end_key_.Release(); } -inline void Region::set_allocated_end_key(std::string* end_key) { - if (end_key != nullptr) { - - } else { - - } - _impl_.end_key_.SetAllocated(end_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.end_key_.IsDefault()) { - _impl_.end_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Region::set_allocated_end_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.end_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.end_key_.IsDefault()) { + _impl_.end_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Region.end_key) } // .metapb.RegionEpoch region_epoch = 4; -inline bool Region::_internal_has_region_epoch() const { - return this != internal_default_instance() && _impl_.region_epoch_ != nullptr; -} inline bool Region::has_region_epoch() const { - return _internal_has_region_epoch(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_epoch_ != nullptr); + return value; } inline void Region::clear_region_epoch() { - if (GetArenaForAllocation() == nullptr && _impl_.region_epoch_ != nullptr) { - delete _impl_.region_epoch_; - } - _impl_.region_epoch_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_epoch_ != nullptr) _impl_.region_epoch_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::metapb::RegionEpoch& Region::_internal_region_epoch() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::metapb::RegionEpoch* p = _impl_.region_epoch_; - return p != nullptr ? *p : reinterpret_cast( - ::metapb::_RegionEpoch_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::metapb::_RegionEpoch_default_instance_); } -inline const ::metapb::RegionEpoch& Region::region_epoch() const { +inline const ::metapb::RegionEpoch& Region::region_epoch() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Region.region_epoch) return _internal_region_epoch(); } -inline void Region::unsafe_arena_set_allocated_region_epoch( - ::metapb::RegionEpoch* region_epoch) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_epoch_); +inline void Region::unsafe_arena_set_allocated_region_epoch(::metapb::RegionEpoch* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_epoch_); } - _impl_.region_epoch_ = region_epoch; - if (region_epoch) { - + _impl_.region_epoch_ = reinterpret_cast<::metapb::RegionEpoch*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:metapb.Region.region_epoch) } inline ::metapb::RegionEpoch* Region::release_region_epoch() { - - ::metapb::RegionEpoch* temp = _impl_.region_epoch_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::metapb::RegionEpoch* released = _impl_.region_epoch_; _impl_.region_epoch_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::metapb::RegionEpoch* Region::unsafe_arena_release_region_epoch() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Region.region_epoch) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::metapb::RegionEpoch* temp = _impl_.region_epoch_; _impl_.region_epoch_ = nullptr; return temp; } inline ::metapb::RegionEpoch* Region::_internal_mutable_region_epoch() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.region_epoch_ == nullptr) { - auto* p = CreateMaybeMessage<::metapb::RegionEpoch>(GetArenaForAllocation()); - _impl_.region_epoch_ = p; + auto* p = CreateMaybeMessage<::metapb::RegionEpoch>(GetArena()); + _impl_.region_epoch_ = reinterpret_cast<::metapb::RegionEpoch*>(p); } return _impl_.region_epoch_; } -inline ::metapb::RegionEpoch* Region::mutable_region_epoch() { +inline ::metapb::RegionEpoch* Region::mutable_region_epoch() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::metapb::RegionEpoch* _msg = _internal_mutable_region_epoch(); // @@protoc_insertion_point(field_mutable:metapb.Region.region_epoch) return _msg; } -inline void Region::set_allocated_region_epoch(::metapb::RegionEpoch* region_epoch) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void Region::set_allocated_region_epoch(::metapb::RegionEpoch* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.region_epoch_; + delete reinterpret_cast<::metapb::RegionEpoch*>(_impl_.region_epoch_); } - if (region_epoch) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(region_epoch); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::metapb::RegionEpoch*>(value)->GetArena(); if (message_arena != submessage_arena) { - region_epoch = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region_epoch, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.region_epoch_ = region_epoch; + + _impl_.region_epoch_ = reinterpret_cast<::metapb::RegionEpoch*>(value); // @@protoc_insertion_point(field_set_allocated:metapb.Region.region_epoch) } // repeated .metapb.Peer peers = 5; inline int Region::_internal_peers_size() const { - return _impl_.peers_.size(); + return _internal_peers().size(); } inline int Region::peers_size() const { return _internal_peers_size(); } inline void Region::clear_peers() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.peers_.Clear(); } -inline ::metapb::Peer* Region::mutable_peers(int index) { +inline ::metapb::Peer* Region::mutable_peers(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:metapb.Region.peers) - return _impl_.peers_.Mutable(index); + return _internal_mutable_peers()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >* -Region::mutable_peers() { +inline ::google::protobuf::RepeatedPtrField<::metapb::Peer>* Region::mutable_peers() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:metapb.Region.peers) - return &_impl_.peers_; -} -inline const ::metapb::Peer& Region::_internal_peers(int index) const { - return _impl_.peers_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_peers(); } -inline const ::metapb::Peer& Region::peers(int index) const { +inline const ::metapb::Peer& Region::peers(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Region.peers) - return _internal_peers(index); + return _internal_peers().Get(index); } -inline ::metapb::Peer* Region::_internal_add_peers() { - return _impl_.peers_.Add(); -} -inline ::metapb::Peer* Region::add_peers() { - ::metapb::Peer* _add = _internal_add_peers(); +inline ::metapb::Peer* Region::add_peers() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::metapb::Peer* _add = _internal_mutable_peers()->Add(); // @@protoc_insertion_point(field_add:metapb.Region.peers) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >& -Region::peers() const { +inline const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& Region::peers() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:metapb.Region.peers) + return _internal_peers(); +} +inline const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& +Region::_internal_peers() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.peers_; } +inline ::google::protobuf::RepeatedPtrField<::metapb::Peer>* +Region::_internal_mutable_peers() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.peers_; +} // bytes encryption_meta = 6; inline void Region::clear_encryption_meta() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.encryption_meta_.ClearToEmpty(); } -inline const std::string& Region::encryption_meta() const { +inline const std::string& Region::encryption_meta() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:metapb.Region.encryption_meta) return _internal_encryption_meta(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Region::set_encryption_meta(ArgT0&& arg0, ArgT... args) { - - _impl_.encryption_meta_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Region::set_encryption_meta(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.encryption_meta_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:metapb.Region.encryption_meta) } -inline std::string* Region::mutable_encryption_meta() { +inline std::string* Region::mutable_encryption_meta() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_encryption_meta(); // @@protoc_insertion_point(field_mutable:metapb.Region.encryption_meta) return _s; } inline const std::string& Region::_internal_encryption_meta() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.encryption_meta_.Get(); } inline void Region::_internal_set_encryption_meta(const std::string& value) { - - _impl_.encryption_meta_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.encryption_meta_.Set(value, GetArena()); } inline std::string* Region::_internal_mutable_encryption_meta() { - - return _impl_.encryption_meta_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.encryption_meta_.Mutable( GetArena()); } inline std::string* Region::release_encryption_meta() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:metapb.Region.encryption_meta) return _impl_.encryption_meta_.Release(); } -inline void Region::set_allocated_encryption_meta(std::string* encryption_meta) { - if (encryption_meta != nullptr) { - - } else { - - } - _impl_.encryption_meta_.SetAllocated(encryption_meta, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.encryption_meta_.IsDefault()) { - _impl_.encryption_meta_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Region::set_allocated_encryption_meta(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.encryption_meta_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.encryption_meta_.IsDefault()) { + _impl_.encryption_meta_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:metapb.Region.encryption_meta) } // bool is_in_flashback = 7; inline void Region::clear_is_in_flashback() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.is_in_flashback_ = false; } -inline bool Region::_internal_is_in_flashback() const { - return _impl_.is_in_flashback_; -} inline bool Region::is_in_flashback() const { // @@protoc_insertion_point(field_get:metapb.Region.is_in_flashback) return _internal_is_in_flashback(); } -inline void Region::_internal_set_is_in_flashback(bool value) { - - _impl_.is_in_flashback_ = value; -} inline void Region::set_is_in_flashback(bool value) { _internal_set_is_in_flashback(value); // @@protoc_insertion_point(field_set:metapb.Region.is_in_flashback) } +inline bool Region::_internal_is_in_flashback() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.is_in_flashback_; +} +inline void Region::_internal_set_is_in_flashback(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.is_in_flashback_ = value; +} // ------------------------------------------------------------------- @@ -2218,43 +2519,49 @@ inline void Region::set_is_in_flashback(bool value) { // uint64 conf_ver = 1; inline void RegionEpoch::clear_conf_ver() { - _impl_.conf_ver_ = uint64_t{0u}; -} -inline uint64_t RegionEpoch::_internal_conf_ver() const { - return _impl_.conf_ver_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.conf_ver_ = ::uint64_t{0u}; } -inline uint64_t RegionEpoch::conf_ver() const { +inline ::uint64_t RegionEpoch::conf_ver() const { // @@protoc_insertion_point(field_get:metapb.RegionEpoch.conf_ver) return _internal_conf_ver(); } -inline void RegionEpoch::_internal_set_conf_ver(uint64_t value) { - - _impl_.conf_ver_ = value; -} -inline void RegionEpoch::set_conf_ver(uint64_t value) { +inline void RegionEpoch::set_conf_ver(::uint64_t value) { _internal_set_conf_ver(value); // @@protoc_insertion_point(field_set:metapb.RegionEpoch.conf_ver) } +inline ::uint64_t RegionEpoch::_internal_conf_ver() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.conf_ver_; +} +inline void RegionEpoch::_internal_set_conf_ver(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.conf_ver_ = value; +} // uint64 version = 2; inline void RegionEpoch::clear_version() { - _impl_.version_ = uint64_t{0u}; -} -inline uint64_t RegionEpoch::_internal_version() const { - return _impl_.version_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.version_ = ::uint64_t{0u}; } -inline uint64_t RegionEpoch::version() const { +inline ::uint64_t RegionEpoch::version() const { // @@protoc_insertion_point(field_get:metapb.RegionEpoch.version) return _internal_version(); } -inline void RegionEpoch::_internal_set_version(uint64_t value) { - - _impl_.version_ = value; -} -inline void RegionEpoch::set_version(uint64_t value) { +inline void RegionEpoch::set_version(::uint64_t value) { _internal_set_version(value); // @@protoc_insertion_point(field_set:metapb.RegionEpoch.version) } +inline ::uint64_t RegionEpoch::_internal_version() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.version_; +} +inline void RegionEpoch::_internal_set_version(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.version_ = value; +} // ------------------------------------------------------------------- @@ -2262,118 +2569,125 @@ inline void RegionEpoch::set_version(uint64_t value) { // uint64 id = 1; inline void Peer::clear_id() { - _impl_.id_ = uint64_t{0u}; -} -inline uint64_t Peer::_internal_id() const { - return _impl_.id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.id_ = ::uint64_t{0u}; } -inline uint64_t Peer::id() const { +inline ::uint64_t Peer::id() const { // @@protoc_insertion_point(field_get:metapb.Peer.id) return _internal_id(); } -inline void Peer::_internal_set_id(uint64_t value) { - - _impl_.id_ = value; -} -inline void Peer::set_id(uint64_t value) { +inline void Peer::set_id(::uint64_t value) { _internal_set_id(value); // @@protoc_insertion_point(field_set:metapb.Peer.id) } +inline ::uint64_t Peer::_internal_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.id_; +} +inline void Peer::_internal_set_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.id_ = value; +} // uint64 store_id = 2; inline void Peer::clear_store_id() { - _impl_.store_id_ = uint64_t{0u}; -} -inline uint64_t Peer::_internal_store_id() const { - return _impl_.store_id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.store_id_ = ::uint64_t{0u}; } -inline uint64_t Peer::store_id() const { +inline ::uint64_t Peer::store_id() const { // @@protoc_insertion_point(field_get:metapb.Peer.store_id) return _internal_store_id(); } -inline void Peer::_internal_set_store_id(uint64_t value) { - - _impl_.store_id_ = value; -} -inline void Peer::set_store_id(uint64_t value) { +inline void Peer::set_store_id(::uint64_t value) { _internal_set_store_id(value); // @@protoc_insertion_point(field_set:metapb.Peer.store_id) } +inline ::uint64_t Peer::_internal_store_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.store_id_; +} +inline void Peer::_internal_set_store_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.store_id_ = value; +} // .metapb.PeerRole role = 3; inline void Peer::clear_role() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.role_ = 0; } -inline ::metapb::PeerRole Peer::_internal_role() const { - return static_cast< ::metapb::PeerRole >(_impl_.role_); -} inline ::metapb::PeerRole Peer::role() const { // @@protoc_insertion_point(field_get:metapb.Peer.role) return _internal_role(); } -inline void Peer::_internal_set_role(::metapb::PeerRole value) { - - _impl_.role_ = value; -} inline void Peer::set_role(::metapb::PeerRole value) { _internal_set_role(value); // @@protoc_insertion_point(field_set:metapb.Peer.role) } +inline ::metapb::PeerRole Peer::_internal_role() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::metapb::PeerRole>(_impl_.role_); +} +inline void Peer::_internal_set_role(::metapb::PeerRole value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.role_ = value; +} // bool is_witness = 4; inline void Peer::clear_is_witness() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.is_witness_ = false; } -inline bool Peer::_internal_is_witness() const { - return _impl_.is_witness_; -} inline bool Peer::is_witness() const { // @@protoc_insertion_point(field_get:metapb.Peer.is_witness) return _internal_is_witness(); } -inline void Peer::_internal_set_is_witness(bool value) { - - _impl_.is_witness_ = value; -} inline void Peer::set_is_witness(bool value) { _internal_set_is_witness(value); // @@protoc_insertion_point(field_set:metapb.Peer.is_witness) } +inline bool Peer::_internal_is_witness() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.is_witness_; +} +inline void Peer::_internal_set_is_witness(bool value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.is_witness_ = value; +} #ifdef __GNUC__ - #pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) - } // namespace metapb -PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::metapb::StoreState> : ::std::true_type {}; +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::metapb::StoreState> : std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::metapb::StoreState>() { +inline const EnumDescriptor* GetEnumDescriptor<::metapb::StoreState>() { return ::metapb::StoreState_descriptor(); } -template <> struct is_proto_enum< ::metapb::PeerRole> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::metapb::PeerRole>() { +struct is_proto_enum<::metapb::PeerRole> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::metapb::PeerRole>() { return ::metapb::PeerRole_descriptor(); } -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_metapb_2eproto +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_metapb_2eproto_2epb_2eh diff --git a/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.cc b/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.cc index 20e38b74e..46b20339a 100644 --- a/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.cc +++ b/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.cc @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.h b/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.h index eae8cfbb8..bf277274b 100644 --- a/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.h +++ b/ThirdParty/kvproto/generated/kvproto/pdpb.grpc.pb.h @@ -19,13 +19,13 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/ThirdParty/kvproto/generated/kvproto/pdpb.pb.cc b/ThirdParty/kvproto/generated/kvproto/pdpb.pb.cc index c5f9abe25..24bc8aadf 100644 --- a/ThirdParty/kvproto/generated/kvproto/pdpb.pb.cc +++ b/ThirdParty/kvproto/generated/kvproto/pdpb.pb.cc @@ -4,541 +4,651 @@ #include "pdpb.pb.h" #include - -#include -#include -#include -#include -#include -#include -#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) -#include +// Must be included last. +#include "google/protobuf/port_def.inc" PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace pdpb { -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; +inline constexpr RequestHeader::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : cluster_id_{::uint64_t{0u}}, + sender_id_{::uint64_t{0u}}, + _cached_size_{0} {} -namespace pdpb { -PROTOBUF_CONSTEXPR RequestHeader::RequestHeader( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.cluster_id_)*/uint64_t{0u} - , /*decltype(_impl_.sender_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} +template +PROTOBUF_CONSTEXPR RequestHeader::RequestHeader(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct RequestHeaderDefaultTypeInternal { - PROTOBUF_CONSTEXPR RequestHeaderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR RequestHeaderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~RequestHeaderDefaultTypeInternal() {} union { RequestHeader _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RequestHeaderDefaultTypeInternal _RequestHeader_default_instance_; -PROTOBUF_CONSTEXPR ResponseHeader::ResponseHeader( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.error_)*/nullptr - , /*decltype(_impl_.cluster_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct ResponseHeaderDefaultTypeInternal { - PROTOBUF_CONSTEXPR ResponseHeaderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ResponseHeaderDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RequestHeaderDefaultTypeInternal _RequestHeader_default_instance_; + +inline constexpr Member::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : peer_urls_{}, + client_urls_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + leader_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + member_id_{::uint64_t{0u}}, + leader_id_{::uint64_t{0u}}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Member::Member(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct MemberDefaultTypeInternal { + PROTOBUF_CONSTEXPR MemberDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MemberDefaultTypeInternal() {} union { - ResponseHeader _instance; + Member _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_; -PROTOBUF_CONSTEXPR Error::Error( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MemberDefaultTypeInternal _Member_default_instance_; + +inline constexpr Error::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : message_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + type_{static_cast< ::pdpb::ErrorType >(0)}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Error::Error(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct ErrorDefaultTypeInternal { - PROTOBUF_CONSTEXPR ErrorDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~ErrorDefaultTypeInternal() {} union { Error _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ErrorDefaultTypeInternal _Error_default_instance_; -PROTOBUF_CONSTEXPR GetRegionRequest::GetRegionRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.region_key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct GetRegionRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR GetRegionRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~GetRegionRequestDefaultTypeInternal() {} - union { - GetRegionRequest _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRegionRequestDefaultTypeInternal _GetRegionRequest_default_instance_; -PROTOBUF_CONSTEXPR GetRegionResponse::GetRegionResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.down_peers_)*/{} - , /*decltype(_impl_.pending_peers_)*/{} - , /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_.region_)*/nullptr - , /*decltype(_impl_.leader_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct GetRegionResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR GetRegionResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~GetRegionResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ErrorDefaultTypeInternal _Error_default_instance_; + +inline constexpr ResponseHeader::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + error_{nullptr}, + cluster_id_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR ResponseHeader::ResponseHeader(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct ResponseHeaderDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResponseHeaderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ResponseHeaderDefaultTypeInternal() {} union { - GetRegionResponse _instance; + ResponseHeader _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRegionResponseDefaultTypeInternal _GetRegionResponse_default_instance_; -PROTOBUF_CONSTEXPR GetStoreRequest::GetStoreRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_.store_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_; + +inline constexpr GetStoreRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + header_{nullptr}, + store_id_{::uint64_t{0u}} {} + +template +PROTOBUF_CONSTEXPR GetStoreRequest::GetStoreRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct GetStoreRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR GetStoreRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR GetStoreRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~GetStoreRequestDefaultTypeInternal() {} union { GetStoreRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetStoreRequestDefaultTypeInternal _GetStoreRequest_default_instance_; -PROTOBUF_CONSTEXPR GetStoreResponse::GetStoreResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_.store_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} -struct GetStoreResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR GetStoreResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~GetStoreResponseDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetStoreRequestDefaultTypeInternal _GetStoreRequest_default_instance_; + +inline constexpr GetRegionRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + region_key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + header_{nullptr} {} + +template +PROTOBUF_CONSTEXPR GetRegionRequest::GetRegionRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct GetRegionRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRegionRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRegionRequestDefaultTypeInternal() {} union { - GetStoreResponse _instance; + GetRegionRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetStoreResponseDefaultTypeInternal _GetStoreResponse_default_instance_; -PROTOBUF_CONSTEXPR GetMembersRequest::GetMembersRequest( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRegionRequestDefaultTypeInternal _GetRegionRequest_default_instance_; + +inline constexpr GetMembersRequest::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + header_{nullptr} {} + +template +PROTOBUF_CONSTEXPR GetMembersRequest::GetMembersRequest(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct GetMembersRequestDefaultTypeInternal { - PROTOBUF_CONSTEXPR GetMembersRequestDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR GetMembersRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~GetMembersRequestDefaultTypeInternal() {} union { GetMembersRequest _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetMembersRequestDefaultTypeInternal _GetMembersRequest_default_instance_; -PROTOBUF_CONSTEXPR Member::Member( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.peer_urls_)*/{} - , /*decltype(_impl_.client_urls_)*/{} - , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.leader_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.member_id_)*/uint64_t{0u} - , /*decltype(_impl_.leader_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct MemberDefaultTypeInternal { - PROTOBUF_CONSTEXPR MemberDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~MemberDefaultTypeInternal() {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetMembersRequestDefaultTypeInternal _GetMembersRequest_default_instance_; + +inline constexpr GetStoreResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + header_{nullptr}, + store_{nullptr} {} + +template +PROTOBUF_CONSTEXPR GetStoreResponse::GetStoreResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct GetStoreResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetStoreResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetStoreResponseDefaultTypeInternal() {} union { - Member _instance; + GetStoreResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetStoreResponseDefaultTypeInternal _GetStoreResponse_default_instance_; + +inline constexpr GetRegionResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + down_peers_{}, + pending_peers_{}, + header_{nullptr}, + region_{nullptr}, + leader_{nullptr} {} + +template +PROTOBUF_CONSTEXPR GetRegionResponse::GetRegionResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct GetRegionResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetRegionResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetRegionResponseDefaultTypeInternal() {} + union { + GetRegionResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MemberDefaultTypeInternal _Member_default_instance_; -PROTOBUF_CONSTEXPR GetMembersResponse::GetMembersResponse( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.members_)*/{} - , /*decltype(_impl_.header_)*/nullptr - , /*decltype(_impl_.leader_)*/nullptr - , /*decltype(_impl_.etcd_leader_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetRegionResponseDefaultTypeInternal _GetRegionResponse_default_instance_; + +inline constexpr GetMembersResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + members_{}, + header_{nullptr}, + leader_{nullptr}, + etcd_leader_{nullptr} {} + +template +PROTOBUF_CONSTEXPR GetMembersResponse::GetMembersResponse(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} struct GetMembersResponseDefaultTypeInternal { - PROTOBUF_CONSTEXPR GetMembersResponseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} + PROTOBUF_CONSTEXPR GetMembersResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} ~GetMembersResponseDefaultTypeInternal() {} union { GetMembersResponse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetMembersResponseDefaultTypeInternal _GetMembersResponse_default_instance_; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetMembersResponseDefaultTypeInternal _GetMembersResponse_default_instance_; } // namespace pdpb static ::_pb::Metadata file_level_metadata_pdpb_2eproto[10]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_pdpb_2eproto[1]; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_pdpb_2eproto = nullptr; - -const uint32_t TableStruct_pdpb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::RequestHeader, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::RequestHeader, _impl_.cluster_id_), - PROTOBUF_FIELD_OFFSET(::pdpb::RequestHeader, _impl_.sender_id_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::ResponseHeader, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::ResponseHeader, _impl_.cluster_id_), - PROTOBUF_FIELD_OFFSET(::pdpb::ResponseHeader, _impl_.error_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::Error, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::Error, _impl_.type_), - PROTOBUF_FIELD_OFFSET(::pdpb::Error, _impl_.message_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionRequest, _impl_.header_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionRequest, _impl_.region_key_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.header_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.region_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.leader_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.down_peers_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.pending_peers_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreRequest, _impl_.header_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreRequest, _impl_.store_id_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreResponse, _impl_.header_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreResponse, _impl_.store_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersRequest, _impl_.header_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::Member, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.member_id_), - PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.peer_urls_), - PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.client_urls_), - PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.leader_name_), - PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.leader_id_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.header_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.members_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.leader_), - PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.etcd_leader_), +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_pdpb_2eproto = nullptr; +const ::uint32_t TableStruct_pdpb_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pdpb::RequestHeader, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::RequestHeader, _impl_.cluster_id_), + PROTOBUF_FIELD_OFFSET(::pdpb::RequestHeader, _impl_.sender_id_), + PROTOBUF_FIELD_OFFSET(::pdpb::ResponseHeader, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::pdpb::ResponseHeader, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::ResponseHeader, _impl_.cluster_id_), + PROTOBUF_FIELD_OFFSET(::pdpb::ResponseHeader, _impl_.error_), + ~0u, + 0, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pdpb::Error, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::Error, _impl_.type_), + PROTOBUF_FIELD_OFFSET(::pdpb::Error, _impl_.message_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionRequest, _impl_.header_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionRequest, _impl_.region_key_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.header_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.region_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.leader_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.down_peers_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetRegionResponse, _impl_.pending_peers_), + 0, + 1, + 2, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreRequest, _impl_.header_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreRequest, _impl_.store_id_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreResponse, _impl_.header_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetStoreResponse, _impl_.store_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersRequest, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersRequest, _impl_.header_), + 0, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pdpb::Member, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.member_id_), + PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.peer_urls_), + PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.client_urls_), + PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.leader_name_), + PROTOBUF_FIELD_OFFSET(::pdpb::Member, _impl_.leader_id_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.header_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.members_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.leader_), + PROTOBUF_FIELD_OFFSET(::pdpb::GetMembersResponse, _impl_.etcd_leader_), + 0, + ~0u, + 1, + 2, }; -static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::pdpb::RequestHeader)}, - { 8, -1, -1, sizeof(::pdpb::ResponseHeader)}, - { 16, -1, -1, sizeof(::pdpb::Error)}, - { 24, -1, -1, sizeof(::pdpb::GetRegionRequest)}, - { 32, -1, -1, sizeof(::pdpb::GetRegionResponse)}, - { 43, -1, -1, sizeof(::pdpb::GetStoreRequest)}, - { 51, -1, -1, sizeof(::pdpb::GetStoreResponse)}, - { 59, -1, -1, sizeof(::pdpb::GetMembersRequest)}, - { 66, -1, -1, sizeof(::pdpb::Member)}, - { 78, -1, -1, sizeof(::pdpb::GetMembersResponse)}, + +static const ::_pbi::MigrationSchema + schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::pdpb::RequestHeader)}, + {10, 20, -1, sizeof(::pdpb::ResponseHeader)}, + {22, -1, -1, sizeof(::pdpb::Error)}, + {32, 42, -1, sizeof(::pdpb::GetRegionRequest)}, + {44, 57, -1, sizeof(::pdpb::GetRegionResponse)}, + {62, 72, -1, sizeof(::pdpb::GetStoreRequest)}, + {74, 84, -1, sizeof(::pdpb::GetStoreResponse)}, + {86, 95, -1, sizeof(::pdpb::GetMembersRequest)}, + {96, -1, -1, sizeof(::pdpb::Member)}, + {110, 122, -1, sizeof(::pdpb::GetMembersResponse)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::pdpb::_RequestHeader_default_instance_._instance, - &::pdpb::_ResponseHeader_default_instance_._instance, - &::pdpb::_Error_default_instance_._instance, - &::pdpb::_GetRegionRequest_default_instance_._instance, - &::pdpb::_GetRegionResponse_default_instance_._instance, - &::pdpb::_GetStoreRequest_default_instance_._instance, - &::pdpb::_GetStoreResponse_default_instance_._instance, - &::pdpb::_GetMembersRequest_default_instance_._instance, - &::pdpb::_Member_default_instance_._instance, - &::pdpb::_GetMembersResponse_default_instance_._instance, + &::pdpb::_RequestHeader_default_instance_._instance, + &::pdpb::_ResponseHeader_default_instance_._instance, + &::pdpb::_Error_default_instance_._instance, + &::pdpb::_GetRegionRequest_default_instance_._instance, + &::pdpb::_GetRegionResponse_default_instance_._instance, + &::pdpb::_GetStoreRequest_default_instance_._instance, + &::pdpb::_GetStoreResponse_default_instance_._instance, + &::pdpb::_GetMembersRequest_default_instance_._instance, + &::pdpb::_Member_default_instance_._instance, + &::pdpb::_GetMembersResponse_default_instance_._instance, }; - -const char descriptor_table_protodef_pdpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\npdpb.proto\022\004pdpb\032\014metapb.proto\"6\n\rRequ" - "estHeader\022\022\n\ncluster_id\030\001 \001(\004\022\021\n\tsender_" - "id\030\002 \001(\004\"@\n\016ResponseHeader\022\022\n\ncluster_id" - "\030\001 \001(\004\022\032\n\005error\030\002 \001(\0132\013.pdpb.Error\"7\n\005Er" - "ror\022\035\n\004type\030\001 \001(\0162\017.pdpb.ErrorType\022\017\n\007me" - "ssage\030\002 \001(\t\"K\n\020GetRegionRequest\022#\n\006heade" - "r\030\001 \001(\0132\023.pdpb.RequestHeader\022\022\n\nregion_k" - "ey\030\002 \001(\014\"\276\001\n\021GetRegionResponse\022$\n\006header" - "\030\001 \001(\0132\024.pdpb.ResponseHeader\022\036\n\006region\030\002" - " \001(\0132\016.metapb.Region\022\034\n\006leader\030\003 \001(\0132\014.m" - "etapb.Peer\022 \n\ndown_peers\030\004 \003(\0132\014.metapb." - "Peer\022#\n\rpending_peers\030\005 \003(\0132\014.metapb.Pee" - "r\"H\n\017GetStoreRequest\022#\n\006header\030\001 \001(\0132\023.p" - "dpb.RequestHeader\022\020\n\010store_id\030\002 \001(\004\"V\n\020G" - "etStoreResponse\022$\n\006header\030\001 \001(\0132\024.pdpb.R" - "esponseHeader\022\034\n\005store\030\002 \001(\0132\r.metapb.St" - "ore\"8\n\021GetMembersRequest\022#\n\006header\030\001 \001(\013" - "2\023.pdpb.RequestHeader\"y\n\006Member\022\014\n\004name\030" - "\001 \001(\t\022\021\n\tmember_id\030\002 \001(\004\022\021\n\tpeer_urls\030\003 " - "\003(\t\022\023\n\013client_urls\030\004 \003(\t\022\023\n\013leader_name\030" - "\005 \001(\t\022\021\n\tleader_id\030\006 \001(\004\"\232\001\n\022GetMembersR" - "esponse\022$\n\006header\030\001 \001(\0132\024.pdpb.ResponseH" - "eader\022\035\n\007members\030\002 \003(\0132\014.pdpb.Member\022\034\n\006" - "leader\030\003 \001(\0132\014.pdpb.Member\022!\n\013etcd_leade" - "r\030\004 \001(\0132\014.pdpb.Member*\225\001\n\tErrorType\022\006\n\002O" - "K\020\000\022\013\n\007UNKNOWN\020\001\022\024\n\020NOT_BOOTSTRAPPED\020\002\022\023" - "\n\017STORE_TOMBSTONE\020\003\022\030\n\024ALREADY_BOOTSTRAP" - "PED\020\004\022\030\n\024INCOMPATIBLE_VERSION\020\005\022\024\n\020REGIO" - "N_NOT_FOUND\020\0062\210\002\n\002PD\022A\n\nGetMembers\022\027.pdp" - "b.GetMembersRequest\032\030.pdpb.GetMembersRes" - "ponse\"\000\022>\n\tGetRegion\022\026.pdpb.GetRegionReq" - "uest\032\027.pdpb.GetRegionResponse\"\000\022B\n\rGetRe" - "gionByID\022\026.pdpb.GetRegionRequest\032\027.pdpb." - "GetRegionResponse\"\000\022;\n\010GetStore\022\025.pdpb.G" - "etStoreRequest\032\026.pdpb.GetStoreResponse\"\000" - "B\022\n\020org.tikv.kvprotob\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_pdpb_2eproto_deps[1] = { - &::descriptor_table_metapb_2eproto, +const char descriptor_table_protodef_pdpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + "\n\npdpb.proto\022\004pdpb\032\014metapb.proto\"6\n\rRequ" + "estHeader\022\022\n\ncluster_id\030\001 \001(\004\022\021\n\tsender_" + "id\030\002 \001(\004\"@\n\016ResponseHeader\022\022\n\ncluster_id" + "\030\001 \001(\004\022\032\n\005error\030\002 \001(\0132\013.pdpb.Error\"7\n\005Er" + "ror\022\035\n\004type\030\001 \001(\0162\017.pdpb.ErrorType\022\017\n\007me" + "ssage\030\002 \001(\t\"K\n\020GetRegionRequest\022#\n\006heade" + "r\030\001 \001(\0132\023.pdpb.RequestHeader\022\022\n\nregion_k" + "ey\030\002 \001(\014\"\276\001\n\021GetRegionResponse\022$\n\006header" + "\030\001 \001(\0132\024.pdpb.ResponseHeader\022\036\n\006region\030\002" + " \001(\0132\016.metapb.Region\022\034\n\006leader\030\003 \001(\0132\014.m" + "etapb.Peer\022 \n\ndown_peers\030\004 \003(\0132\014.metapb." + "Peer\022#\n\rpending_peers\030\005 \003(\0132\014.metapb.Pee" + "r\"H\n\017GetStoreRequest\022#\n\006header\030\001 \001(\0132\023.p" + "dpb.RequestHeader\022\020\n\010store_id\030\002 \001(\004\"V\n\020G" + "etStoreResponse\022$\n\006header\030\001 \001(\0132\024.pdpb.R" + "esponseHeader\022\034\n\005store\030\002 \001(\0132\r.metapb.St" + "ore\"8\n\021GetMembersRequest\022#\n\006header\030\001 \001(\013" + "2\023.pdpb.RequestHeader\"y\n\006Member\022\014\n\004name\030" + "\001 \001(\t\022\021\n\tmember_id\030\002 \001(\004\022\021\n\tpeer_urls\030\003 " + "\003(\t\022\023\n\013client_urls\030\004 \003(\t\022\023\n\013leader_name\030" + "\005 \001(\t\022\021\n\tleader_id\030\006 \001(\004\"\232\001\n\022GetMembersR" + "esponse\022$\n\006header\030\001 \001(\0132\024.pdpb.ResponseH" + "eader\022\035\n\007members\030\002 \003(\0132\014.pdpb.Member\022\034\n\006" + "leader\030\003 \001(\0132\014.pdpb.Member\022!\n\013etcd_leade" + "r\030\004 \001(\0132\014.pdpb.Member*\225\001\n\tErrorType\022\006\n\002O" + "K\020\000\022\013\n\007UNKNOWN\020\001\022\024\n\020NOT_BOOTSTRAPPED\020\002\022\023" + "\n\017STORE_TOMBSTONE\020\003\022\030\n\024ALREADY_BOOTSTRAP" + "PED\020\004\022\030\n\024INCOMPATIBLE_VERSION\020\005\022\024\n\020REGIO" + "N_NOT_FOUND\020\0062\210\002\n\002PD\022A\n\nGetMembers\022\027.pdp" + "b.GetMembersRequest\032\030.pdpb.GetMembersRes" + "ponse\"\000\022>\n\tGetRegion\022\026.pdpb.GetRegionReq" + "uest\032\027.pdpb.GetRegionResponse\"\000\022B\n\rGetRe" + "gionByID\022\026.pdpb.GetRegionRequest\032\027.pdpb." + "GetRegionResponse\"\000\022;\n\010GetStore\022\025.pdpb.G" + "etStoreRequest\032\026.pdpb.GetStoreResponse\"\000" + "B\022\n\020org.tikv.kvprotob\006proto3" }; -static ::_pbi::once_flag descriptor_table_pdpb_2eproto_once; +static const ::_pbi::DescriptorTable* const descriptor_table_pdpb_2eproto_deps[1] = + { + &::descriptor_table_metapb_2eproto, +}; +static ::absl::once_flag descriptor_table_pdpb_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_pdpb_2eproto = { - false, false, 1428, descriptor_table_protodef_pdpb_2eproto, + false, + false, + 1428, + descriptor_table_protodef_pdpb_2eproto, "pdpb.proto", - &descriptor_table_pdpb_2eproto_once, descriptor_table_pdpb_2eproto_deps, 1, 10, - schemas, file_default_instances, TableStruct_pdpb_2eproto::offsets, - file_level_metadata_pdpb_2eproto, file_level_enum_descriptors_pdpb_2eproto, + &descriptor_table_pdpb_2eproto_once, + descriptor_table_pdpb_2eproto_deps, + 1, + 10, + schemas, + file_default_instances, + TableStruct_pdpb_2eproto::offsets, + file_level_metadata_pdpb_2eproto, + file_level_enum_descriptors_pdpb_2eproto, file_level_service_descriptors_pdpb_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_pdpb_2eproto_getter() { return &descriptor_table_pdpb_2eproto; } - // Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_pdpb_2eproto(&descriptor_table_pdpb_2eproto); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_pdpb_2eproto(&descriptor_table_pdpb_2eproto); namespace pdpb { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorType_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_pdpb_2eproto); +const ::google::protobuf::EnumDescriptor* ErrorType_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_pdpb_2eproto); return file_level_enum_descriptors_pdpb_2eproto[0]; } +PROTOBUF_CONSTINIT const uint32_t ErrorType_internal_data_[] = { + 458752u, 0u, }; bool ErrorType_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - return true; - default: - return false; - } + return 0 <= value && value <= 6; } - - // =================================================================== class RequestHeader::_Internal { public: }; -RequestHeader::RequestHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +RequestHeader::RequestHeader(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.RequestHeader) } -RequestHeader::RequestHeader(const RequestHeader& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - RequestHeader* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.cluster_id_){} - , decltype(_impl_.sender_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.cluster_id_, &from._impl_.cluster_id_, - static_cast(reinterpret_cast(&_impl_.sender_id_) - - reinterpret_cast(&_impl_.cluster_id_)) + sizeof(_impl_.sender_id_)); - // @@protoc_insertion_point(copy_constructor:pdpb.RequestHeader) -} - -inline void RequestHeader::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.cluster_id_){uint64_t{0u}} - , decltype(_impl_.sender_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +RequestHeader::RequestHeader( + ::google::protobuf::Arena* arena, const RequestHeader& from) + : RequestHeader(arena) { + MergeFrom(from); } +inline PROTOBUF_NDEBUG_INLINE RequestHeader::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} +inline void RequestHeader::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, cluster_id_), + 0, + offsetof(Impl_, sender_id_) - + offsetof(Impl_, cluster_id_) + + sizeof(Impl_::sender_id_)); +} RequestHeader::~RequestHeader() { // @@protoc_insertion_point(destructor:pdpb.RequestHeader) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void RequestHeader::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); } -void RequestHeader::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void RequestHeader::Clear() { +PROTOBUF_NOINLINE void RequestHeader::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.RequestHeader) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.cluster_id_, 0, static_cast( + ::memset(&_impl_.cluster_id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.sender_id_) - reinterpret_cast(&_impl_.cluster_id_)) + sizeof(_impl_.sender_id_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* RequestHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 cluster_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.cluster_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 sender_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.sender_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* RequestHeader::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* RequestHeader::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> RequestHeader::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_RequestHeader_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 sender_id = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RequestHeader, _impl_.sender_id_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(RequestHeader, _impl_.sender_id_)}}, + // uint64 cluster_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(RequestHeader, _impl_.cluster_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(RequestHeader, _impl_.cluster_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 cluster_id = 1; + {PROTOBUF_FIELD_OFFSET(RequestHeader, _impl_.cluster_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // uint64 sender_id = 2; + {PROTOBUF_FIELD_OFFSET(RequestHeader, _impl_.sender_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +::uint8_t* RequestHeader::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.RequestHeader) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 cluster_id = 1; if (this->_internal_cluster_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_cluster_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_cluster_id(), target); } // uint64 sender_id = 2; if (this->_internal_sender_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_sender_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_sender_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.RequestHeader) return target; } -size_t RequestHeader::ByteSizeLong() const { +::size_t RequestHeader::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.RequestHeader) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // uint64 cluster_id = 1; if (this->_internal_cluster_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_cluster_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_cluster_id()); } // uint64 sender_id = 2; if (this->_internal_sender_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_sender_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_sender_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RequestHeader::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - RequestHeader::MergeImpl +const ::google::protobuf::Message::ClassData RequestHeader::_class_data_ = { + RequestHeader::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RequestHeader::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* RequestHeader::GetClassData() const { + return &_class_data_; +} -void RequestHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void RequestHeader::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.RequestHeader) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (from._internal_cluster_id() != 0) { @@ -547,7 +657,7 @@ void RequestHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_sender_id() != 0) { _this->_internal_set_sender_id(from._internal_sender_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void RequestHeader::CopyFrom(const RequestHeader& from) { @@ -557,14 +667,17 @@ void RequestHeader::CopyFrom(const RequestHeader& from) { MergeFrom(from); } -bool RequestHeader::IsInitialized() const { +PROTOBUF_NOINLINE bool RequestHeader::IsInitialized() const { return true; } -void RequestHeader::InternalSwap(RequestHeader* other) { +::_pbi::CachedSize* RequestHeader::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void RequestHeader::InternalSwap(RequestHeader* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(RequestHeader, _impl_.sender_id_) + sizeof(RequestHeader::_impl_.sender_id_) - PROTOBUF_FIELD_OFFSET(RequestHeader, _impl_.cluster_id_)>( @@ -572,206 +685,219 @@ void RequestHeader::InternalSwap(RequestHeader* other) { reinterpret_cast(&other->_impl_.cluster_id_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RequestHeader::GetMetadata() const { +::google::protobuf::Metadata RequestHeader::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[0]); } - // =================================================================== class ResponseHeader::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_._has_bits_); static const ::pdpb::Error& error(const ResponseHeader* msg); + static void set_has_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::pdpb::Error& -ResponseHeader::_Internal::error(const ResponseHeader* msg) { +const ::pdpb::Error& ResponseHeader::_Internal::error(const ResponseHeader* msg) { return *msg->_impl_.error_; } -ResponseHeader::ResponseHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +ResponseHeader::ResponseHeader(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.ResponseHeader) } -ResponseHeader::ResponseHeader(const ResponseHeader& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ResponseHeader* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.error_){nullptr} - , decltype(_impl_.cluster_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE ResponseHeader::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +ResponseHeader::ResponseHeader( + ::google::protobuf::Arena* arena, + const ResponseHeader& from) + : ::google::protobuf::Message(arena) { + ResponseHeader* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.error_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::pdpb::Error>(arena, *from._impl_.error_) + : nullptr; + _impl_.cluster_id_ = from._impl_.cluster_id_; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_error()) { - _this->_impl_.error_ = new ::pdpb::Error(*from._impl_.error_); - } - _this->_impl_.cluster_id_ = from._impl_.cluster_id_; // @@protoc_insertion_point(copy_constructor:pdpb.ResponseHeader) } +inline PROTOBUF_NDEBUG_INLINE ResponseHeader::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} -inline void ResponseHeader::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.error_){nullptr} - , decltype(_impl_.cluster_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void ResponseHeader::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, error_), + 0, + offsetof(Impl_, cluster_id_) - + offsetof(Impl_, error_) + + sizeof(Impl_::cluster_id_)); } - ResponseHeader::~ResponseHeader() { // @@protoc_insertion_point(destructor:pdpb.ResponseHeader) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void ResponseHeader::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.error_; -} - -void ResponseHeader::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.error_; + _impl_.~Impl_(); } -void ResponseHeader::Clear() { +PROTOBUF_NOINLINE void ResponseHeader::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.ResponseHeader) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - if (GetArenaForAllocation() == nullptr && _impl_.error_ != nullptr) { - delete _impl_.error_; - } - _impl_.error_ = nullptr; - _impl_.cluster_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ResponseHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 cluster_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.cluster_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .pdpb.Error error = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_error(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.error_ != nullptr); + _impl_.error_->Clear(); + } + _impl_.cluster_id_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* ResponseHeader::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* ResponseHeader::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> ResponseHeader::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_ResponseHeader_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .pdpb.Error error = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_.error_)}}, + // uint64 cluster_id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ResponseHeader, _impl_.cluster_id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_.cluster_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 cluster_id = 1; + {PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_.cluster_id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .pdpb.Error error = 2; + {PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_.error_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::pdpb::Error>()}, + }}, {{ + }}, +}; + +::uint8_t* ResponseHeader::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.ResponseHeader) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // uint64 cluster_id = 1; if (this->_internal_cluster_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_cluster_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_cluster_id(), target); } + cached_has_bits = _impl_._has_bits_[0]; // .pdpb.Error error = 2; - if (this->_internal_has_error()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::error(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, _Internal::error(this), _Internal::error(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.ResponseHeader) return target; } -size_t ResponseHeader::ByteSizeLong() const { +::size_t ResponseHeader::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.ResponseHeader) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .pdpb.Error error = 2; - if (this->_internal_has_error()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.error_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.error_); } // uint64 cluster_id = 1; if (this->_internal_cluster_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_cluster_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_cluster_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ResponseHeader::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ResponseHeader::MergeImpl +const ::google::protobuf::Message::ClassData ResponseHeader::_class_data_ = { + ResponseHeader::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ResponseHeader::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* ResponseHeader::GetClassData() const { + return &_class_data_; +} -void ResponseHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void ResponseHeader::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.ResponseHeader) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_has_error()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_error()->::pdpb::Error::MergeFrom( from._internal_error()); } if (from._internal_cluster_id() != 0) { _this->_internal_set_cluster_id(from._internal_cluster_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void ResponseHeader::CopyFrom(const ResponseHeader& from) { @@ -781,14 +907,18 @@ void ResponseHeader::CopyFrom(const ResponseHeader& from) { MergeFrom(from); } -bool ResponseHeader::IsInitialized() const { +PROTOBUF_NOINLINE bool ResponseHeader::IsInitialized() const { return true; } -void ResponseHeader::InternalSwap(ResponseHeader* other) { +::_pbi::CachedSize* ResponseHeader::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void ResponseHeader::InternalSwap(ResponseHeader* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_.cluster_id_) + sizeof(ResponseHeader::_impl_.cluster_id_) - PROTOBUF_FIELD_OFFSET(ResponseHeader, _impl_.error_)>( @@ -796,205 +926,188 @@ void ResponseHeader::InternalSwap(ResponseHeader* other) { reinterpret_cast(&other->_impl_.error_)); } -::PROTOBUF_NAMESPACE_ID::Metadata ResponseHeader::GetMetadata() const { +::google::protobuf::Metadata ResponseHeader::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[1]); } - // =================================================================== class Error::_Internal { public: }; -Error::Error(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Error::Error(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.Error) } -Error::Error(const Error& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Error* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.message_){} - , decltype(_impl_.type_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.message_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.message_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_message().empty()) { - _this->_impl_.message_.Set(from._internal_message(), - _this->GetArenaForAllocation()); - } - _this->_impl_.type_ = from._impl_.type_; +inline PROTOBUF_NDEBUG_INLINE Error::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : message_(arena, from.message_), + _cached_size_{0} {} + +Error::Error( + ::google::protobuf::Arena* arena, + const Error& from) + : ::google::protobuf::Message(arena) { + Error* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + _impl_.type_ = from._impl_.type_; + // @@protoc_insertion_point(copy_constructor:pdpb.Error) } +inline PROTOBUF_NDEBUG_INLINE Error::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : message_(arena), + _cached_size_{0} {} -inline void Error::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.message_){} - , decltype(_impl_.type_){0} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.message_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.message_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Error::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.type_ = {}; } - Error::~Error() { // @@protoc_insertion_point(destructor:pdpb.Error) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Error::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.message_.Destroy(); + _impl_.~Impl_(); } -void Error::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Error::Clear() { +PROTOBUF_NOINLINE void Error::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.Error) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.message_.ClearToEmpty(); _impl_.type_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .pdpb.ErrorType type = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_type(static_cast<::pdpb::ErrorType>(val)); - } else - goto handle_unusual; - continue; - // string message = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_message(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "pdpb.Error.message")); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Error::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Error::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 26, 2> Error::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Error_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string message = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(Error, _impl_.message_)}}, + // .pdpb.ErrorType type = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Error, _impl_.type_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Error, _impl_.type_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .pdpb.ErrorType type = 1; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.type_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // string message = 2; + {PROTOBUF_FIELD_OFFSET(Error, _impl_.message_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\12\0\7\0\0\0\0\0" + "pdpb.Error" + "message" + }}, +}; + +::uint8_t* Error::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.Error) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // .pdpb.ErrorType type = 1; if (this->_internal_type() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_type(), target); + 1, this->_internal_type(), target); } // string message = 2; if (!this->_internal_message().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_message().data(), static_cast(this->_internal_message().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "pdpb.Error.message"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_message(), target); + const std::string& _s = this->_internal_message(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "pdpb.Error.message"); + target = stream->WriteStringMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.Error) return target; } -size_t Error::ByteSizeLong() const { +::size_t Error::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.Error) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string message = 2; if (!this->_internal_message().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_message()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_message()); } // .pdpb.ErrorType type = 1; if (this->_internal_type() != 0) { total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Error::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Error::MergeImpl +const ::google::protobuf::Message::ClassData Error::_class_data_ = { + Error::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Error::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Error::GetClassData() const { + return &_class_data_; +} -void Error::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Error::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.Error) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_message().empty()) { @@ -1003,7 +1116,7 @@ void Error::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF if (from._internal_type() != 0) { _this->_internal_set_type(from._internal_type()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Error::CopyFrom(const Error& from) { @@ -1013,237 +1126,231 @@ void Error::CopyFrom(const Error& from) { MergeFrom(from); } -bool Error::IsInitialized() const { +PROTOBUF_NOINLINE bool Error::IsInitialized() const { return true; } -void Error::InternalSwap(Error* other) { +::_pbi::CachedSize* Error::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Error::InternalSwap(Error* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.message_, lhs_arena, - &other->_impl_.message_, rhs_arena - ); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, &other->_impl_.message_, arena); swap(_impl_.type_, other->_impl_.type_); } -::PROTOBUF_NAMESPACE_ID::Metadata Error::GetMetadata() const { +::google::protobuf::Metadata Error::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[2]); } - // =================================================================== class GetRegionRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRegionRequest, _impl_._has_bits_); static const ::pdpb::RequestHeader& header(const GetRegionRequest* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::pdpb::RequestHeader& -GetRegionRequest::_Internal::header(const GetRegionRequest* msg) { +const ::pdpb::RequestHeader& GetRegionRequest::_Internal::header(const GetRegionRequest* msg) { return *msg->_impl_.header_; } -GetRegionRequest::GetRegionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GetRegionRequest::GetRegionRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.GetRegionRequest) } -GetRegionRequest::GetRegionRequest(const GetRegionRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - GetRegionRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.region_key_){} - , decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.region_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_region_key().empty()) { - _this->_impl_.region_key_.Set(from._internal_region_key(), - _this->GetArenaForAllocation()); - } - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::pdpb::RequestHeader(*from._impl_.header_); - } +inline PROTOBUF_NDEBUG_INLINE GetRegionRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + region_key_(arena, from.region_key_) {} + +GetRegionRequest::GetRegionRequest( + ::google::protobuf::Arena* arena, + const GetRegionRequest& from) + : ::google::protobuf::Message(arena) { + GetRegionRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.header_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::pdpb::RequestHeader>(arena, *from._impl_.header_) + : nullptr; + // @@protoc_insertion_point(copy_constructor:pdpb.GetRegionRequest) } +inline PROTOBUF_NDEBUG_INLINE GetRegionRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + region_key_(arena) {} -inline void GetRegionRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.region_key_){} - , decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.region_key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.region_key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void GetRegionRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.header_ = {}; } - GetRegionRequest::~GetRegionRequest() { // @@protoc_insertion_point(destructor:pdpb.GetRegionRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void GetRegionRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ABSL_DCHECK(GetArena() == nullptr); _impl_.region_key_.Destroy(); - if (this != internal_default_instance()) delete _impl_.header_; -} - -void GetRegionRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + delete _impl_.header_; + _impl_.~Impl_(); } -void GetRegionRequest::Clear() { +PROTOBUF_NOINLINE void GetRegionRequest::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.GetRegionRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.region_key_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetRegionRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .pdpb.RequestHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes region_key = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_region_key(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.header_ != nullptr); + _impl_.header_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetRegionRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* GetRegionRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> GetRegionRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRegionRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetRegionRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // bytes region_key = 2; + {::_pbi::TcParser::FastBS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(GetRegionRequest, _impl_.region_key_)}}, + // .pdpb.RequestHeader header = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(GetRegionRequest, _impl_.header_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .pdpb.RequestHeader header = 1; + {PROTOBUF_FIELD_OFFSET(GetRegionRequest, _impl_.header_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // bytes region_key = 2; + {PROTOBUF_FIELD_OFFSET(GetRegionRequest, _impl_.region_key_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::pdpb::RequestHeader>()}, + }}, {{ + }}, +}; + +::uint8_t* GetRegionRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.GetRegionRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .pdpb.RequestHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::header(this), _Internal::header(this).GetCachedSize(), target, stream); } // bytes region_key = 2; if (!this->_internal_region_key().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_region_key(), target); + const std::string& _s = this->_internal_region_key(); + target = stream->WriteBytesMaybeAliased(2, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.GetRegionRequest) return target; } -size_t GetRegionRequest::ByteSizeLong() const { +::size_t GetRegionRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.GetRegionRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // bytes region_key = 2; if (!this->_internal_region_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_region_key()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->_internal_region_key()); } // .pdpb.RequestHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetRegionRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - GetRegionRequest::MergeImpl +const ::google::protobuf::Message::ClassData GetRegionRequest::_class_data_ = { + GetRegionRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetRegionRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* GetRegionRequest::GetClassData() const { + return &_class_data_; +} -void GetRegionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void GetRegionRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.GetRegionRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; if (!from._internal_region_key().empty()) { _this->_internal_set_region_key(from._internal_region_key()); } - if (from._internal_has_header()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_header()->::pdpb::RequestHeader::MergeFrom( from._internal_header()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void GetRegionRequest::CopyFrom(const GetRegionRequest& from) { @@ -1253,362 +1360,370 @@ void GetRegionRequest::CopyFrom(const GetRegionRequest& from) { MergeFrom(from); } -bool GetRegionRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool GetRegionRequest::IsInitialized() const { return true; } -void GetRegionRequest::InternalSwap(GetRegionRequest* other) { +::_pbi::CachedSize* GetRegionRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void GetRegionRequest::InternalSwap(GetRegionRequest* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.region_key_, lhs_arena, - &other->_impl_.region_key_, rhs_arena - ); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.region_key_, &other->_impl_.region_key_, arena); swap(_impl_.header_, other->_impl_.header_); } -::PROTOBUF_NAMESPACE_ID::Metadata GetRegionRequest::GetMetadata() const { +::google::protobuf::Metadata GetRegionRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[3]); } - // =================================================================== class GetRegionResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_._has_bits_); static const ::pdpb::ResponseHeader& header(const GetRegionResponse* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } static const ::metapb::Region& region(const GetRegionResponse* msg); + static void set_has_region(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } static const ::metapb::Peer& leader(const GetRegionResponse* msg); + static void set_has_leader(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } }; -const ::pdpb::ResponseHeader& -GetRegionResponse::_Internal::header(const GetRegionResponse* msg) { +const ::pdpb::ResponseHeader& GetRegionResponse::_Internal::header(const GetRegionResponse* msg) { return *msg->_impl_.header_; } -const ::metapb::Region& -GetRegionResponse::_Internal::region(const GetRegionResponse* msg) { +const ::metapb::Region& GetRegionResponse::_Internal::region(const GetRegionResponse* msg) { return *msg->_impl_.region_; } -const ::metapb::Peer& -GetRegionResponse::_Internal::leader(const GetRegionResponse* msg) { +const ::metapb::Peer& GetRegionResponse::_Internal::leader(const GetRegionResponse* msg) { return *msg->_impl_.leader_; } void GetRegionResponse::clear_region() { - if (GetArenaForAllocation() == nullptr && _impl_.region_ != nullptr) { - delete _impl_.region_; - } - _impl_.region_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.region_ != nullptr) _impl_.region_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; } void GetRegionResponse::clear_leader() { - if (GetArenaForAllocation() == nullptr && _impl_.leader_ != nullptr) { - delete _impl_.leader_; - } - _impl_.leader_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.leader_ != nullptr) _impl_.leader_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; } void GetRegionResponse::clear_down_peers() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.down_peers_.Clear(); } void GetRegionResponse::clear_pending_peers() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.pending_peers_.Clear(); } -GetRegionResponse::GetRegionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GetRegionResponse::GetRegionResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.GetRegionResponse) } -GetRegionResponse::GetRegionResponse(const GetRegionResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - GetRegionResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.down_peers_){from._impl_.down_peers_} - , decltype(_impl_.pending_peers_){from._impl_.pending_peers_} - , decltype(_impl_.header_){nullptr} - , decltype(_impl_.region_){nullptr} - , decltype(_impl_.leader_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE GetRegionResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + down_peers_{visibility, arena, from.down_peers_}, + pending_peers_{visibility, arena, from.pending_peers_} {} + +GetRegionResponse::GetRegionResponse( + ::google::protobuf::Arena* arena, + const GetRegionResponse& from) + : ::google::protobuf::Message(arena) { + GetRegionResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.header_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::pdpb::ResponseHeader>(arena, *from._impl_.header_) + : nullptr; + _impl_.region_ = (cached_has_bits & 0x00000002u) + ? CreateMaybeMessage<::metapb::Region>(arena, *from._impl_.region_) + : nullptr; + _impl_.leader_ = (cached_has_bits & 0x00000004u) + ? CreateMaybeMessage<::metapb::Peer>(arena, *from._impl_.leader_) + : nullptr; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::pdpb::ResponseHeader(*from._impl_.header_); - } - if (from._internal_has_region()) { - _this->_impl_.region_ = new ::metapb::Region(*from._impl_.region_); - } - if (from._internal_has_leader()) { - _this->_impl_.leader_ = new ::metapb::Peer(*from._impl_.leader_); - } // @@protoc_insertion_point(copy_constructor:pdpb.GetRegionResponse) } - -inline void GetRegionResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.down_peers_){arena} - , decltype(_impl_.pending_peers_){arena} - , decltype(_impl_.header_){nullptr} - , decltype(_impl_.region_){nullptr} - , decltype(_impl_.leader_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline PROTOBUF_NDEBUG_INLINE GetRegionResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + down_peers_{visibility, arena}, + pending_peers_{visibility, arena} {} + +inline void GetRegionResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, header_), + 0, + offsetof(Impl_, leader_) - + offsetof(Impl_, header_) + + sizeof(Impl_::leader_)); } - GetRegionResponse::~GetRegionResponse() { // @@protoc_insertion_point(destructor:pdpb.GetRegionResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void GetRegionResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.down_peers_.~RepeatedPtrField(); - _impl_.pending_peers_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.header_; - if (this != internal_default_instance()) delete _impl_.region_; - if (this != internal_default_instance()) delete _impl_.leader_; + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.header_; + delete _impl_.region_; + delete _impl_.leader_; + _impl_.~Impl_(); } -void GetRegionResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void GetRegionResponse::Clear() { +PROTOBUF_NOINLINE void GetRegionResponse::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.GetRegionResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.down_peers_.Clear(); _impl_.pending_peers_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.region_ != nullptr) { - delete _impl_.region_; - } - _impl_.region_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.leader_ != nullptr) { - delete _impl_.leader_; - } - _impl_.leader_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetRegionResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .pdpb.ResponseHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.Region region = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_region(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.Peer leader = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_leader(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .metapb.Peer down_peers = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_down_peers(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else - goto handle_unusual; - continue; - // repeated .metapb.Peer pending_peers = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_pending_peers(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.header_ != nullptr); + _impl_.header_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.region_ != nullptr); + _impl_.region_->Clear(); } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.leader_ != nullptr); + _impl_.leader_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetRegionResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* GetRegionResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 5, 0, 2> GetRegionResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 5, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetRegionResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .pdpb.ResponseHeader header = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.header_)}}, + // .metapb.Region region = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.region_)}}, + // .metapb.Peer leader = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 2, PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.leader_)}}, + // repeated .metapb.Peer down_peers = 4; + {::_pbi::TcParser::FastMtR1, + {34, 63, 3, PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.down_peers_)}}, + // repeated .metapb.Peer pending_peers = 5; + {::_pbi::TcParser::FastMtR1, + {42, 63, 4, PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.pending_peers_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .pdpb.ResponseHeader header = 1; + {PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.header_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .metapb.Region region = 2; + {PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.region_), _Internal::kHasBitsOffset + 1, 1, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .metapb.Peer leader = 3; + {PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.leader_), _Internal::kHasBitsOffset + 2, 2, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .metapb.Peer down_peers = 4; + {PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.down_peers_), -1, 3, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .metapb.Peer pending_peers = 5; + {PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.pending_peers_), -1, 4, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::pdpb::ResponseHeader>()}, + {::_pbi::TcParser::GetTable<::metapb::Region>()}, + {::_pbi::TcParser::GetTable<::metapb::Peer>()}, + {::_pbi::TcParser::GetTable<::metapb::Peer>()}, + {::_pbi::TcParser::GetTable<::metapb::Peer>()}, + }}, {{ + }}, +}; + +::uint8_t* GetRegionResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.GetRegionResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .pdpb.ResponseHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::header(this), _Internal::header(this).GetCachedSize(), target, stream); } // .metapb.Region region = 2; - if (this->_internal_has_region()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::region(this), + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, _Internal::region(this), _Internal::region(this).GetCachedSize(), target, stream); } // .metapb.Peer leader = 3; - if (this->_internal_has_leader()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::leader(this), + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, _Internal::leader(this), _Internal::leader(this).GetCachedSize(), target, stream); } // repeated .metapb.Peer down_peers = 4; for (unsigned i = 0, n = static_cast(this->_internal_down_peers_size()); i < n; i++) { - const auto& repfield = this->_internal_down_peers(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_down_peers().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); } // repeated .metapb.Peer pending_peers = 5; for (unsigned i = 0, n = static_cast(this->_internal_pending_peers_size()); i < n; i++) { - const auto& repfield = this->_internal_pending_peers(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_pending_peers().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.GetRegionResponse) return target; } -size_t GetRegionResponse::ByteSizeLong() const { +::size_t GetRegionResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.GetRegionResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .metapb.Peer down_peers = 4; total_size += 1UL * this->_internal_down_peers_size(); - for (const auto& msg : this->_impl_.down_peers_) { + for (const auto& msg : this->_internal_down_peers()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // repeated .metapb.Peer pending_peers = 5; total_size += 1UL * this->_internal_pending_peers_size(); - for (const auto& msg : this->_impl_.pending_peers_) { + for (const auto& msg : this->_internal_pending_peers()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // .pdpb.ResponseHeader header = 1; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_); + } - // .pdpb.ResponseHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); - } + // .metapb.Region region = 2; + if (cached_has_bits & 0x00000002u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.region_); + } - // .metapb.Region region = 2; - if (this->_internal_has_region()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.region_); - } + // .metapb.Peer leader = 3; + if (cached_has_bits & 0x00000004u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.leader_); + } - // .metapb.Peer leader = 3; - if (this->_internal_has_leader()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.leader_); } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetRegionResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - GetRegionResponse::MergeImpl +const ::google::protobuf::Message::ClassData GetRegionResponse::_class_data_ = { + GetRegionResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetRegionResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* GetRegionResponse::GetClassData() const { + return &_class_data_; +} -void GetRegionResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void GetRegionResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.GetRegionResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.down_peers_.MergeFrom(from._impl_.down_peers_); - _this->_impl_.pending_peers_.MergeFrom(from._impl_.pending_peers_); - if (from._internal_has_header()) { - _this->_internal_mutable_header()->::pdpb::ResponseHeader::MergeFrom( - from._internal_header()); - } - if (from._internal_has_region()) { - _this->_internal_mutable_region()->::metapb::Region::MergeFrom( - from._internal_region()); - } - if (from._internal_has_leader()) { - _this->_internal_mutable_leader()->::metapb::Peer::MergeFrom( - from._internal_leader()); + _this->_internal_mutable_down_peers()->MergeFrom( + from._internal_down_peers()); + _this->_internal_mutable_pending_peers()->MergeFrom( + from._internal_pending_peers()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_header()->::pdpb::ResponseHeader::MergeFrom( + from._internal_header()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_region()->::metapb::Region::MergeFrom( + from._internal_region()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_leader()->::metapb::Peer::MergeFrom( + from._internal_leader()); + } } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void GetRegionResponse::CopyFrom(const GetRegionResponse& from) { @@ -1618,16 +1733,20 @@ void GetRegionResponse::CopyFrom(const GetRegionResponse& from) { MergeFrom(from); } -bool GetRegionResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool GetRegionResponse::IsInitialized() const { return true; } -void GetRegionResponse::InternalSwap(GetRegionResponse* other) { +::_pbi::CachedSize* GetRegionResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void GetRegionResponse::InternalSwap(GetRegionResponse* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.down_peers_.InternalSwap(&other->_impl_.down_peers_); _impl_.pending_peers_.InternalSwap(&other->_impl_.pending_peers_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.leader_) + sizeof(GetRegionResponse::_impl_.leader_) - PROTOBUF_FIELD_OFFSET(GetRegionResponse, _impl_.header_)>( @@ -1635,206 +1754,219 @@ void GetRegionResponse::InternalSwap(GetRegionResponse* other) { reinterpret_cast(&other->_impl_.header_)); } -::PROTOBUF_NAMESPACE_ID::Metadata GetRegionResponse::GetMetadata() const { +::google::protobuf::Metadata GetRegionResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[4]); } - // =================================================================== class GetStoreRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_._has_bits_); static const ::pdpb::RequestHeader& header(const GetStoreRequest* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::pdpb::RequestHeader& -GetStoreRequest::_Internal::header(const GetStoreRequest* msg) { +const ::pdpb::RequestHeader& GetStoreRequest::_Internal::header(const GetStoreRequest* msg) { return *msg->_impl_.header_; } -GetStoreRequest::GetStoreRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GetStoreRequest::GetStoreRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.GetStoreRequest) } -GetStoreRequest::GetStoreRequest(const GetStoreRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - GetStoreRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.header_){nullptr} - , decltype(_impl_.store_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE GetStoreRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +GetStoreRequest::GetStoreRequest( + ::google::protobuf::Arena* arena, + const GetStoreRequest& from) + : ::google::protobuf::Message(arena) { + GetStoreRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.header_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::pdpb::RequestHeader>(arena, *from._impl_.header_) + : nullptr; + _impl_.store_id_ = from._impl_.store_id_; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::pdpb::RequestHeader(*from._impl_.header_); - } - _this->_impl_.store_id_ = from._impl_.store_id_; // @@protoc_insertion_point(copy_constructor:pdpb.GetStoreRequest) } +inline PROTOBUF_NDEBUG_INLINE GetStoreRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} -inline void GetStoreRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.header_){nullptr} - , decltype(_impl_.store_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void GetStoreRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, header_), + 0, + offsetof(Impl_, store_id_) - + offsetof(Impl_, header_) + + sizeof(Impl_::store_id_)); } - GetStoreRequest::~GetStoreRequest() { // @@protoc_insertion_point(destructor:pdpb.GetStoreRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void GetStoreRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.header_; -} - -void GetStoreRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.header_; + _impl_.~Impl_(); } -void GetStoreRequest::Clear() { +PROTOBUF_NOINLINE void GetStoreRequest::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.GetStoreRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - _impl_.store_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetStoreRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .pdpb.RequestHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 store_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.store_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.header_ != nullptr); + _impl_.header_->Clear(); + } + _impl_.store_id_ = ::uint64_t{0u}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetStoreRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* GetStoreRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> GetStoreRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetStoreRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // uint64 store_id = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(GetStoreRequest, _impl_.store_id_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_.store_id_)}}, + // .pdpb.RequestHeader header = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_.header_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .pdpb.RequestHeader header = 1; + {PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_.header_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint64 store_id = 2; + {PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_.store_id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, {{ + {::_pbi::TcParser::GetTable<::pdpb::RequestHeader>()}, + }}, {{ + }}, +}; + +::uint8_t* GetStoreRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.GetStoreRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .pdpb.RequestHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::header(this), _Internal::header(this).GetCachedSize(), target, stream); } // uint64 store_id = 2; if (this->_internal_store_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_store_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_store_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.GetStoreRequest) return target; } -size_t GetStoreRequest::ByteSizeLong() const { +::size_t GetStoreRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.GetStoreRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .pdpb.RequestHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_); } // uint64 store_id = 2; if (this->_internal_store_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_store_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_store_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetStoreRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - GetStoreRequest::MergeImpl +const ::google::protobuf::Message::ClassData GetStoreRequest::_class_data_ = { + GetStoreRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetStoreRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* GetStoreRequest::GetClassData() const { + return &_class_data_; +} -void GetStoreRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void GetStoreRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.GetStoreRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_has_header()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_header()->::pdpb::RequestHeader::MergeFrom( from._internal_header()); } if (from._internal_store_id() != 0) { _this->_internal_set_store_id(from._internal_store_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void GetStoreRequest::CopyFrom(const GetStoreRequest& from) { @@ -1844,14 +1976,18 @@ void GetStoreRequest::CopyFrom(const GetStoreRequest& from) { MergeFrom(from); } -bool GetStoreRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool GetStoreRequest::IsInitialized() const { return true; } -void GetStoreRequest::InternalSwap(GetStoreRequest* other) { +::_pbi::CachedSize* GetStoreRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void GetStoreRequest::InternalSwap(GetStoreRequest* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_.store_id_) + sizeof(GetStoreRequest::_impl_.store_id_) - PROTOBUF_FIELD_OFFSET(GetStoreRequest, _impl_.header_)>( @@ -1859,227 +1995,246 @@ void GetStoreRequest::InternalSwap(GetStoreRequest* other) { reinterpret_cast(&other->_impl_.header_)); } -::PROTOBUF_NAMESPACE_ID::Metadata GetStoreRequest::GetMetadata() const { +::google::protobuf::Metadata GetStoreRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[5]); } - // =================================================================== class GetStoreResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_._has_bits_); static const ::pdpb::ResponseHeader& header(const GetStoreResponse* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } static const ::metapb::Store& store(const GetStoreResponse* msg); + static void set_has_store(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } }; -const ::pdpb::ResponseHeader& -GetStoreResponse::_Internal::header(const GetStoreResponse* msg) { +const ::pdpb::ResponseHeader& GetStoreResponse::_Internal::header(const GetStoreResponse* msg) { return *msg->_impl_.header_; } -const ::metapb::Store& -GetStoreResponse::_Internal::store(const GetStoreResponse* msg) { +const ::metapb::Store& GetStoreResponse::_Internal::store(const GetStoreResponse* msg) { return *msg->_impl_.store_; } void GetStoreResponse::clear_store() { - if (GetArenaForAllocation() == nullptr && _impl_.store_ != nullptr) { - delete _impl_.store_; - } - _impl_.store_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.store_ != nullptr) _impl_.store_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; } -GetStoreResponse::GetStoreResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GetStoreResponse::GetStoreResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.GetStoreResponse) } -GetStoreResponse::GetStoreResponse(const GetStoreResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - GetStoreResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.header_){nullptr} - , decltype(_impl_.store_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE GetStoreResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +GetStoreResponse::GetStoreResponse( + ::google::protobuf::Arena* arena, + const GetStoreResponse& from) + : ::google::protobuf::Message(arena) { + GetStoreResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.header_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::pdpb::ResponseHeader>(arena, *from._impl_.header_) + : nullptr; + _impl_.store_ = (cached_has_bits & 0x00000002u) + ? CreateMaybeMessage<::metapb::Store>(arena, *from._impl_.store_) + : nullptr; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::pdpb::ResponseHeader(*from._impl_.header_); - } - if (from._internal_has_store()) { - _this->_impl_.store_ = new ::metapb::Store(*from._impl_.store_); - } // @@protoc_insertion_point(copy_constructor:pdpb.GetStoreResponse) } +inline PROTOBUF_NDEBUG_INLINE GetStoreResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} -inline void GetStoreResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.header_){nullptr} - , decltype(_impl_.store_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void GetStoreResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, header_), + 0, + offsetof(Impl_, store_) - + offsetof(Impl_, header_) + + sizeof(Impl_::store_)); } - GetStoreResponse::~GetStoreResponse() { // @@protoc_insertion_point(destructor:pdpb.GetStoreResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void GetStoreResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.header_; - if (this != internal_default_instance()) delete _impl_.store_; + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.header_; + delete _impl_.store_; + _impl_.~Impl_(); } -void GetStoreResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void GetStoreResponse::Clear() { +PROTOBUF_NOINLINE void GetStoreResponse::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.GetStoreResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.store_ != nullptr) { - delete _impl_.store_; - } - _impl_.store_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetStoreResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .pdpb.ResponseHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .metapb.Store store = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_store(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.header_ != nullptr); + _impl_.header_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.store_ != nullptr); + _impl_.store_->Clear(); } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetStoreResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* GetStoreResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> GetStoreResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetStoreResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .metapb.Store store = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_.store_)}}, + // .pdpb.ResponseHeader header = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_.header_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .pdpb.ResponseHeader header = 1; + {PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_.header_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .metapb.Store store = 2; + {PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_.store_), _Internal::kHasBitsOffset + 1, 1, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::pdpb::ResponseHeader>()}, + {::_pbi::TcParser::GetTable<::metapb::Store>()}, + }}, {{ + }}, +}; + +::uint8_t* GetStoreResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.GetStoreResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .pdpb.ResponseHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::header(this), _Internal::header(this).GetCachedSize(), target, stream); } // .metapb.Store store = 2; - if (this->_internal_has_store()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, _Internal::store(this), + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, _Internal::store(this), _Internal::store(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.GetStoreResponse) return target; } -size_t GetStoreResponse::ByteSizeLong() const { +::size_t GetStoreResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.GetStoreResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // .pdpb.ResponseHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); - } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // .pdpb.ResponseHeader header = 1; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_); + } - // .metapb.Store store = 2; - if (this->_internal_has_store()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.store_); - } + // .metapb.Store store = 2; + if (cached_has_bits & 0x00000002u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.store_); + } + } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetStoreResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - GetStoreResponse::MergeImpl +const ::google::protobuf::Message::ClassData GetStoreResponse::_class_data_ = { + GetStoreResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetStoreResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* GetStoreResponse::GetClassData() const { + return &_class_data_; +} -void GetStoreResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void GetStoreResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.GetStoreResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_has_header()) { - _this->_internal_mutable_header()->::pdpb::ResponseHeader::MergeFrom( - from._internal_header()); - } - if (from._internal_has_store()) { - _this->_internal_mutable_store()->::metapb::Store::MergeFrom( - from._internal_store()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_header()->::pdpb::ResponseHeader::MergeFrom( + from._internal_header()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_store()->::metapb::Store::MergeFrom( + from._internal_store()); + } } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void GetStoreResponse::CopyFrom(const GetStoreResponse& from) { @@ -2089,14 +2244,18 @@ void GetStoreResponse::CopyFrom(const GetStoreResponse& from) { MergeFrom(from); } -bool GetStoreResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool GetStoreResponse::IsInitialized() const { return true; } -void GetStoreResponse::InternalSwap(GetStoreResponse* other) { +::_pbi::CachedSize* GetStoreResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void GetStoreResponse::InternalSwap(GetStoreResponse* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_.store_) + sizeof(GetStoreResponse::_impl_.store_) - PROTOBUF_FIELD_OFFSET(GetStoreResponse, _impl_.header_)>( @@ -2104,180 +2263,190 @@ void GetStoreResponse::InternalSwap(GetStoreResponse* other) { reinterpret_cast(&other->_impl_.header_)); } -::PROTOBUF_NAMESPACE_ID::Metadata GetStoreResponse::GetMetadata() const { +::google::protobuf::Metadata GetStoreResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[6]); } - // =================================================================== class GetMembersRequest::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetMembersRequest, _impl_._has_bits_); static const ::pdpb::RequestHeader& header(const GetMembersRequest* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } }; -const ::pdpb::RequestHeader& -GetMembersRequest::_Internal::header(const GetMembersRequest* msg) { +const ::pdpb::RequestHeader& GetMembersRequest::_Internal::header(const GetMembersRequest* msg) { return *msg->_impl_.header_; } -GetMembersRequest::GetMembersRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GetMembersRequest::GetMembersRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.GetMembersRequest) } -GetMembersRequest::GetMembersRequest(const GetMembersRequest& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - GetMembersRequest* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE GetMembersRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +GetMembersRequest::GetMembersRequest( + ::google::protobuf::Arena* arena, + const GetMembersRequest& from) + : ::google::protobuf::Message(arena) { + GetMembersRequest* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.header_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::pdpb::RequestHeader>(arena, *from._impl_.header_) + : nullptr; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::pdpb::RequestHeader(*from._impl_.header_); - } // @@protoc_insertion_point(copy_constructor:pdpb.GetMembersRequest) } +inline PROTOBUF_NDEBUG_INLINE GetMembersRequest::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} -inline void GetMembersRequest::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.header_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline void GetMembersRequest::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.header_ = {}; } - GetMembersRequest::~GetMembersRequest() { // @@protoc_insertion_point(destructor:pdpb.GetMembersRequest) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void GetMembersRequest::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.header_; -} - -void GetMembersRequest::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.header_; + _impl_.~Impl_(); } -void GetMembersRequest::Clear() { +PROTOBUF_NOINLINE void GetMembersRequest::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.GetMembersRequest) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetMembersRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .pdpb.RequestHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.header_ != nullptr); + _impl_.header_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetMembersRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* GetMembersRequest::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> GetMembersRequest::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetMembersRequest, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetMembersRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .pdpb.RequestHeader header = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(GetMembersRequest, _impl_.header_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .pdpb.RequestHeader header = 1; + {PROTOBUF_FIELD_OFFSET(GetMembersRequest, _impl_.header_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::pdpb::RequestHeader>()}, + }}, {{ + }}, +}; + +::uint8_t* GetMembersRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.GetMembersRequest) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .pdpb.RequestHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::header(this), _Internal::header(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.GetMembersRequest) return target; } -size_t GetMembersRequest::ByteSizeLong() const { +::size_t GetMembersRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.GetMembersRequest) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .pdpb.RequestHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetMembersRequest::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - GetMembersRequest::MergeImpl +const ::google::protobuf::Message::ClassData GetMembersRequest::_class_data_ = { + GetMembersRequest::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetMembersRequest::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* GetMembersRequest::GetClassData() const { + return &_class_data_; +} -void GetMembersRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void GetMembersRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.GetMembersRequest) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_has_header()) { + if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { _this->_internal_mutable_header()->::pdpb::RequestHeader::MergeFrom( from._internal_header()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void GetMembersRequest::CopyFrom(const GetMembersRequest& from) { @@ -2287,116 +2456,98 @@ void GetMembersRequest::CopyFrom(const GetMembersRequest& from) { MergeFrom(from); } -bool GetMembersRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool GetMembersRequest::IsInitialized() const { return true; } -void GetMembersRequest::InternalSwap(GetMembersRequest* other) { +::_pbi::CachedSize* GetMembersRequest::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void GetMembersRequest::InternalSwap(GetMembersRequest* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); swap(_impl_.header_, other->_impl_.header_); } -::PROTOBUF_NAMESPACE_ID::Metadata GetMembersRequest::GetMetadata() const { +::google::protobuf::Metadata GetMembersRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[7]); } - // =================================================================== class Member::_Internal { public: }; -Member::Member(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +Member::Member(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.Member) } -Member::Member(const Member& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - Member* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.peer_urls_){from._impl_.peer_urls_} - , decltype(_impl_.client_urls_){from._impl_.client_urls_} - , decltype(_impl_.name_){} - , decltype(_impl_.leader_name_){} - , decltype(_impl_.member_id_){} - , decltype(_impl_.leader_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } - _impl_.leader_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.leader_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_leader_name().empty()) { - _this->_impl_.leader_name_.Set(from._internal_leader_name(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.member_id_, &from._impl_.member_id_, - static_cast(reinterpret_cast(&_impl_.leader_id_) - - reinterpret_cast(&_impl_.member_id_)) + sizeof(_impl_.leader_id_)); +inline PROTOBUF_NDEBUG_INLINE Member::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : peer_urls_{visibility, arena, from.peer_urls_}, + client_urls_{visibility, arena, from.client_urls_}, + name_(arena, from.name_), + leader_name_(arena, from.leader_name_), + _cached_size_{0} {} + +Member::Member( + ::google::protobuf::Arena* arena, + const Member& from) + : ::google::protobuf::Message(arena) { + Member* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, member_id_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, member_id_), + offsetof(Impl_, leader_id_) - + offsetof(Impl_, member_id_) + + sizeof(Impl_::leader_id_)); + // @@protoc_insertion_point(copy_constructor:pdpb.Member) } - -inline void Member::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.peer_urls_){arena} - , decltype(_impl_.client_urls_){arena} - , decltype(_impl_.name_){} - , decltype(_impl_.leader_name_){} - , decltype(_impl_.member_id_){uint64_t{0u}} - , decltype(_impl_.leader_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.leader_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.leader_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline PROTOBUF_NDEBUG_INLINE Member::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : peer_urls_{visibility, arena}, + client_urls_{visibility, arena}, + name_(arena), + leader_name_(arena), + _cached_size_{0} {} + +inline void Member::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, member_id_), + 0, + offsetof(Impl_, leader_id_) - + offsetof(Impl_, member_id_) + + sizeof(Impl_::leader_id_)); } - Member::~Member() { // @@protoc_insertion_point(destructor:pdpb.Member) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void Member::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.peer_urls_.~RepeatedPtrField(); - _impl_.client_urls_.~RepeatedPtrField(); + ABSL_DCHECK(GetArena() == nullptr); _impl_.name_.Destroy(); _impl_.leader_name_.Destroy(); + _impl_.~Impl_(); } -void Member::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Member::Clear() { +PROTOBUF_NOINLINE void Member::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.Member) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2404,241 +2555,214 @@ void Member::Clear() { _impl_.client_urls_.Clear(); _impl_.name_.ClearToEmpty(); _impl_.leader_name_.ClearToEmpty(); - ::memset(&_impl_.member_id_, 0, static_cast( + ::memset(&_impl_.member_id_, 0, static_cast<::size_t>( reinterpret_cast(&_impl_.leader_id_) - reinterpret_cast(&_impl_.member_id_)) + sizeof(_impl_.leader_id_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Member::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string name = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "pdpb.Member.name")); - } else - goto handle_unusual; - continue; - // uint64 member_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.member_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated string peer_urls = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_peer_urls(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "pdpb.Member.peer_urls")); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else - goto handle_unusual; - continue; - // repeated string client_urls = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_client_urls(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "pdpb.Member.client_urls")); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else - goto handle_unusual; - continue; - // string leader_name = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - auto str = _internal_mutable_leader_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "pdpb.Member.leader_name")); - } else - goto handle_unusual; - continue; - // uint64 leader_id = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.leader_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Member::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* Member::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 6, 0, 55, 2> Member::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 6, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967232, // skipmap + offsetof(decltype(_table_), field_entries), + 6, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Member_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string name = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Member, _impl_.name_)}}, + // uint64 member_id = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Member, _impl_.member_id_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(Member, _impl_.member_id_)}}, + // repeated string peer_urls = 3; + {::_pbi::TcParser::FastUR1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(Member, _impl_.peer_urls_)}}, + // repeated string client_urls = 4; + {::_pbi::TcParser::FastUR1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(Member, _impl_.client_urls_)}}, + // string leader_name = 5; + {::_pbi::TcParser::FastUS1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(Member, _impl_.leader_name_)}}, + // uint64 leader_id = 6; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Member, _impl_.leader_id_), 63>(), + {48, 63, 0, PROTOBUF_FIELD_OFFSET(Member, _impl_.leader_id_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string name = 1; + {PROTOBUF_FIELD_OFFSET(Member, _impl_.name_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 member_id = 2; + {PROTOBUF_FIELD_OFFSET(Member, _impl_.member_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // repeated string peer_urls = 3; + {PROTOBUF_FIELD_OFFSET(Member, _impl_.peer_urls_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // repeated string client_urls = 4; + {PROTOBUF_FIELD_OFFSET(Member, _impl_.client_urls_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // string leader_name = 5; + {PROTOBUF_FIELD_OFFSET(Member, _impl_.leader_name_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // uint64 leader_id = 6; + {PROTOBUF_FIELD_OFFSET(Member, _impl_.leader_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + }}, + // no aux_entries + {{ + "\13\4\0\11\13\13\0\0" + "pdpb.Member" + "name" + "peer_urls" + "client_urls" + "leader_name" + }}, +}; + +::uint8_t* Member::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.Member) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; // string name = 1; if (!this->_internal_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "pdpb.Member.name"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_name(), target); + const std::string& _s = this->_internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "pdpb.Member.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); } // uint64 member_id = 2; if (this->_internal_member_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_member_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 2, this->_internal_member_id(), target); } // repeated string peer_urls = 3; - for (int i = 0, n = this->_internal_peer_urls_size(); i < n; i++) { - const auto& s = this->_internal_peer_urls(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "pdpb.Member.peer_urls"); + for (int i = 0, n = this->_internal_peer_urls_size(); i < n; ++i) { + const auto& s = this->_internal_peer_urls().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "pdpb.Member.peer_urls"); target = stream->WriteString(3, s, target); } // repeated string client_urls = 4; - for (int i = 0, n = this->_internal_client_urls_size(); i < n; i++) { - const auto& s = this->_internal_client_urls(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "pdpb.Member.client_urls"); + for (int i = 0, n = this->_internal_client_urls_size(); i < n; ++i) { + const auto& s = this->_internal_client_urls().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "pdpb.Member.client_urls"); target = stream->WriteString(4, s, target); } // string leader_name = 5; if (!this->_internal_leader_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_leader_name().data(), static_cast(this->_internal_leader_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "pdpb.Member.leader_name"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_leader_name(), target); + const std::string& _s = this->_internal_leader_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "pdpb.Member.leader_name"); + target = stream->WriteStringMaybeAliased(5, _s, target); } // uint64 leader_id = 6; if (this->_internal_leader_id() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_leader_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 6, this->_internal_leader_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.Member) return target; } -size_t Member::ByteSizeLong() const { +::size_t Member::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.Member) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string peer_urls = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.peer_urls_.size()); - for (int i = 0, n = _impl_.peer_urls_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - _impl_.peer_urls_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_peer_urls().size()); + for (int i = 0, n = _internal_peer_urls().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_peer_urls().Get(i)); } - // repeated string client_urls = 4; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.client_urls_.size()); - for (int i = 0, n = _impl_.client_urls_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - _impl_.client_urls_.Get(i)); + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_client_urls().size()); + for (int i = 0, n = _internal_client_urls().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_client_urls().Get(i)); } - // string name = 1; if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_name()); } // string leader_name = 5; if (!this->_internal_leader_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_leader_name()); + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_leader_name()); } // uint64 member_id = 2; if (this->_internal_member_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_member_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_member_id()); } // uint64 leader_id = 6; if (this->_internal_leader_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_leader_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_leader_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Member::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - Member::MergeImpl +const ::google::protobuf::Message::ClassData Member::_class_data_ = { + Member::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Member::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* Member::GetClassData() const { + return &_class_data_; +} -void Member::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void Member::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.Member) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.peer_urls_.MergeFrom(from._impl_.peer_urls_); - _this->_impl_.client_urls_.MergeFrom(from._impl_.client_urls_); + _this->_internal_mutable_peer_urls()->MergeFrom(from._internal_peer_urls()); + _this->_internal_mutable_client_urls()->MergeFrom(from._internal_client_urls()); if (!from._internal_name().empty()) { _this->_internal_set_name(from._internal_name()); } @@ -2651,7 +2775,7 @@ void Member::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBU if (from._internal_leader_id() != 0) { _this->_internal_set_leader_id(from._internal_leader_id()); } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void Member::CopyFrom(const Member& from) { @@ -2661,26 +2785,23 @@ void Member::CopyFrom(const Member& from) { MergeFrom(from); } -bool Member::IsInitialized() const { +PROTOBUF_NOINLINE bool Member::IsInitialized() const { return true; } -void Member::InternalSwap(Member* other) { +::_pbi::CachedSize* Member::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void Member::InternalSwap(Member* PROTOBUF_RESTRICT other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.peer_urls_.InternalSwap(&other->_impl_.peer_urls_); _impl_.client_urls_.InternalSwap(&other->_impl_.client_urls_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.leader_name_, lhs_arena, - &other->_impl_.leader_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.leader_name_, &other->_impl_.leader_name_, arena); + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(Member, _impl_.leader_id_) + sizeof(Member::_impl_.leader_id_) - PROTOBUF_FIELD_OFFSET(Member, _impl_.member_id_)>( @@ -2688,295 +2809,306 @@ void Member::InternalSwap(Member* other) { reinterpret_cast(&other->_impl_.member_id_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Member::GetMetadata() const { +::google::protobuf::Metadata Member::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[8]); } - // =================================================================== class GetMembersResponse::_Internal { public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_._has_bits_); static const ::pdpb::ResponseHeader& header(const GetMembersResponse* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } static const ::pdpb::Member& leader(const GetMembersResponse* msg); + static void set_has_leader(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } static const ::pdpb::Member& etcd_leader(const GetMembersResponse* msg); + static void set_has_etcd_leader(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } }; -const ::pdpb::ResponseHeader& -GetMembersResponse::_Internal::header(const GetMembersResponse* msg) { +const ::pdpb::ResponseHeader& GetMembersResponse::_Internal::header(const GetMembersResponse* msg) { return *msg->_impl_.header_; } -const ::pdpb::Member& -GetMembersResponse::_Internal::leader(const GetMembersResponse* msg) { +const ::pdpb::Member& GetMembersResponse::_Internal::leader(const GetMembersResponse* msg) { return *msg->_impl_.leader_; } -const ::pdpb::Member& -GetMembersResponse::_Internal::etcd_leader(const GetMembersResponse* msg) { +const ::pdpb::Member& GetMembersResponse::_Internal::etcd_leader(const GetMembersResponse* msg) { return *msg->_impl_.etcd_leader_; } -GetMembersResponse::GetMembersResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); +GetMembersResponse::GetMembersResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); // @@protoc_insertion_point(arena_constructor:pdpb.GetMembersResponse) } -GetMembersResponse::GetMembersResponse(const GetMembersResponse& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - GetMembersResponse* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.members_){from._impl_.members_} - , decltype(_impl_.header_){nullptr} - , decltype(_impl_.leader_){nullptr} - , decltype(_impl_.etcd_leader_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; +inline PROTOBUF_NDEBUG_INLINE GetMembersResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + members_{visibility, arena, from.members_} {} + +GetMembersResponse::GetMembersResponse( + ::google::protobuf::Arena* arena, + const GetMembersResponse& from) + : ::google::protobuf::Message(arena) { + GetMembersResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.header_ = (cached_has_bits & 0x00000001u) + ? CreateMaybeMessage<::pdpb::ResponseHeader>(arena, *from._impl_.header_) + : nullptr; + _impl_.leader_ = (cached_has_bits & 0x00000002u) + ? CreateMaybeMessage<::pdpb::Member>(arena, *from._impl_.leader_) + : nullptr; + _impl_.etcd_leader_ = (cached_has_bits & 0x00000004u) + ? CreateMaybeMessage<::pdpb::Member>(arena, *from._impl_.etcd_leader_) + : nullptr; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_header()) { - _this->_impl_.header_ = new ::pdpb::ResponseHeader(*from._impl_.header_); - } - if (from._internal_has_leader()) { - _this->_impl_.leader_ = new ::pdpb::Member(*from._impl_.leader_); - } - if (from._internal_has_etcd_leader()) { - _this->_impl_.etcd_leader_ = new ::pdpb::Member(*from._impl_.etcd_leader_); - } // @@protoc_insertion_point(copy_constructor:pdpb.GetMembersResponse) } - -inline void GetMembersResponse::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.members_){arena} - , decltype(_impl_.header_){nullptr} - , decltype(_impl_.leader_){nullptr} - , decltype(_impl_.etcd_leader_){nullptr} - , /*decltype(_impl_._cached_size_)*/{} - }; +inline PROTOBUF_NDEBUG_INLINE GetMembersResponse::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + members_{visibility, arena} {} + +inline void GetMembersResponse::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, header_), + 0, + offsetof(Impl_, etcd_leader_) - + offsetof(Impl_, header_) + + sizeof(Impl_::etcd_leader_)); } - GetMembersResponse::~GetMembersResponse() { // @@protoc_insertion_point(destructor:pdpb.GetMembersResponse) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } - inline void GetMembersResponse::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.members_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.header_; - if (this != internal_default_instance()) delete _impl_.leader_; - if (this != internal_default_instance()) delete _impl_.etcd_leader_; -} - -void GetMembersResponse::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.header_; + delete _impl_.leader_; + delete _impl_.etcd_leader_; + _impl_.~Impl_(); } -void GetMembersResponse::Clear() { +PROTOBUF_NOINLINE void GetMembersResponse::Clear() { // @@protoc_insertion_point(message_clear_start:pdpb.GetMembersResponse) - uint32_t cached_has_bits = 0; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_.members_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.leader_ != nullptr) { - delete _impl_.leader_; - } - _impl_.leader_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.etcd_leader_ != nullptr) { - delete _impl_.etcd_leader_; - } - _impl_.etcd_leader_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GetMembersResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // .pdpb.ResponseHeader header = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .pdpb.Member members = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_members(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // .pdpb.Member leader = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_leader(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .pdpb.Member etcd_leader = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_etcd_leader(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.header_ != nullptr); + _impl_.header_->Clear(); } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.leader_ != nullptr); + _impl_.leader_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.etcd_leader_ != nullptr); + _impl_.etcd_leader_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetMembersResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ } -uint8_t* GetMembersResponse::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 4, 0, 2> GetMembersResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 4, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetMembersResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // .pdpb.Member etcd_leader = 4; + {::_pbi::TcParser::FastMtS1, + {34, 2, 3, PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.etcd_leader_)}}, + // .pdpb.ResponseHeader header = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.header_)}}, + // repeated .pdpb.Member members = 2; + {::_pbi::TcParser::FastMtR1, + {18, 63, 1, PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.members_)}}, + // .pdpb.Member leader = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 2, PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.leader_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .pdpb.ResponseHeader header = 1; + {PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.header_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .pdpb.Member members = 2; + {PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.members_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .pdpb.Member leader = 3; + {PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.leader_), _Internal::kHasBitsOffset + 1, 2, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .pdpb.Member etcd_leader = 4; + {PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.etcd_leader_), _Internal::kHasBitsOffset + 2, 3, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::pdpb::ResponseHeader>()}, + {::_pbi::TcParser::GetTable<::pdpb::Member>()}, + {::_pbi::TcParser::GetTable<::pdpb::Member>()}, + {::_pbi::TcParser::GetTable<::pdpb::Member>()}, + }}, {{ + }}, +}; + +::uint8_t* GetMembersResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:pdpb.GetMembersResponse) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + cached_has_bits = _impl_._has_bits_[0]; // .pdpb.ResponseHeader header = 1; - if (this->_internal_has_header()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::header(this), + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, _Internal::header(this), _Internal::header(this).GetCachedSize(), target, stream); } // repeated .pdpb.Member members = 2; for (unsigned i = 0, n = static_cast(this->_internal_members_size()); i < n; i++) { - const auto& repfield = this->_internal_members(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + const auto& repfield = this->_internal_members().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); } // .pdpb.Member leader = 3; - if (this->_internal_has_leader()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::leader(this), + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, _Internal::leader(this), _Internal::leader(this).GetCachedSize(), target, stream); } // .pdpb.Member etcd_leader = 4; - if (this->_internal_has_etcd_leader()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::etcd_leader(this), + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, _Internal::etcd_leader(this), _Internal::etcd_leader(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:pdpb.GetMembersResponse) return target; } -size_t GetMembersResponse::ByteSizeLong() const { +::size_t GetMembersResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:pdpb.GetMembersResponse) - size_t total_size = 0; + ::size_t total_size = 0; - uint32_t cached_has_bits = 0; + ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .pdpb.Member members = 2; total_size += 1UL * this->_internal_members_size(); - for (const auto& msg : this->_impl_.members_) { + for (const auto& msg : this->_internal_members()) { total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // .pdpb.ResponseHeader header = 1; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.header_); + } - // .pdpb.ResponseHeader header = 1; - if (this->_internal_has_header()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.header_); - } + // .pdpb.Member leader = 3; + if (cached_has_bits & 0x00000002u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.leader_); + } - // .pdpb.Member leader = 3; - if (this->_internal_has_leader()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.leader_); - } + // .pdpb.Member etcd_leader = 4; + if (cached_has_bits & 0x00000004u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.etcd_leader_); + } - // .pdpb.Member etcd_leader = 4; - if (this->_internal_has_etcd_leader()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.etcd_leader_); } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetMembersResponse::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - GetMembersResponse::MergeImpl +const ::google::protobuf::Message::ClassData GetMembersResponse::_class_data_ = { + GetMembersResponse::MergeImpl, + nullptr, // OnDemandRegisterArenaDtor }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetMembersResponse::GetClassData() const { return &_class_data_; } - +const ::google::protobuf::Message::ClassData* GetMembersResponse::GetClassData() const { + return &_class_data_; +} -void GetMembersResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { +void GetMembersResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); // @@protoc_insertion_point(class_specific_merge_from_start:pdpb.GetMembersResponse) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.members_.MergeFrom(from._impl_.members_); - if (from._internal_has_header()) { - _this->_internal_mutable_header()->::pdpb::ResponseHeader::MergeFrom( - from._internal_header()); - } - if (from._internal_has_leader()) { - _this->_internal_mutable_leader()->::pdpb::Member::MergeFrom( - from._internal_leader()); - } - if (from._internal_has_etcd_leader()) { - _this->_internal_mutable_etcd_leader()->::pdpb::Member::MergeFrom( - from._internal_etcd_leader()); + _this->_internal_mutable_members()->MergeFrom( + from._internal_members()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_header()->::pdpb::ResponseHeader::MergeFrom( + from._internal_header()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_leader()->::pdpb::Member::MergeFrom( + from._internal_leader()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_etcd_leader()->::pdpb::Member::MergeFrom( + from._internal_etcd_leader()); + } } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } void GetMembersResponse::CopyFrom(const GetMembersResponse& from) { @@ -2986,15 +3118,19 @@ void GetMembersResponse::CopyFrom(const GetMembersResponse& from) { MergeFrom(from); } -bool GetMembersResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool GetMembersResponse::IsInitialized() const { return true; } -void GetMembersResponse::InternalSwap(GetMembersResponse* other) { +::_pbi::CachedSize* GetMembersResponse::AccessCachedSize() const { + return &_impl_._cached_size_; +} +void GetMembersResponse::InternalSwap(GetMembersResponse* PROTOBUF_RESTRICT other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.members_.InternalSwap(&other->_impl_.members_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< + ::google::protobuf::internal::memswap< PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.etcd_leader_) + sizeof(GetMembersResponse::_impl_.etcd_leader_) - PROTOBUF_FIELD_OFFSET(GetMembersResponse, _impl_.header_)>( @@ -3002,56 +3138,16 @@ void GetMembersResponse::InternalSwap(GetMembersResponse* other) { reinterpret_cast(&other->_impl_.header_)); } -::PROTOBUF_NAMESPACE_ID::Metadata GetMembersResponse::GetMetadata() const { +::google::protobuf::Metadata GetMembersResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_pdpb_2eproto_getter, &descriptor_table_pdpb_2eproto_once, file_level_metadata_pdpb_2eproto[9]); } - // @@protoc_insertion_point(namespace_scope) } // namespace pdpb -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::pdpb::RequestHeader* -Arena::CreateMaybeMessage< ::pdpb::RequestHeader >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::RequestHeader >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::ResponseHeader* -Arena::CreateMaybeMessage< ::pdpb::ResponseHeader >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::ResponseHeader >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::Error* -Arena::CreateMaybeMessage< ::pdpb::Error >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::Error >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::GetRegionRequest* -Arena::CreateMaybeMessage< ::pdpb::GetRegionRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::GetRegionRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::GetRegionResponse* -Arena::CreateMaybeMessage< ::pdpb::GetRegionResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::GetRegionResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::GetStoreRequest* -Arena::CreateMaybeMessage< ::pdpb::GetStoreRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::GetStoreRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::GetStoreResponse* -Arena::CreateMaybeMessage< ::pdpb::GetStoreResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::GetStoreResponse >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::GetMembersRequest* -Arena::CreateMaybeMessage< ::pdpb::GetMembersRequest >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::GetMembersRequest >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::Member* -Arena::CreateMaybeMessage< ::pdpb::Member >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::Member >(arena); -} -template<> PROTOBUF_NOINLINE ::pdpb::GetMembersResponse* -Arena::CreateMaybeMessage< ::pdpb::GetMembersResponse >(Arena* arena) { - return Arena::CreateMessageInternal< ::pdpb::GetMembersResponse >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include +#include "google/protobuf/port_undef.inc" diff --git a/ThirdParty/kvproto/generated/kvproto/pdpb.pb.h b/ThirdParty/kvproto/generated/kvproto/pdpb.pb.h index b4c5ba524..e16569aaa 100644 --- a/ThirdParty/kvproto/generated/kvproto/pdpb.pb.h +++ b/ThirdParty/kvproto/generated/kvproto/pdpb.pb.h @@ -1,51 +1,62 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: pdpb.proto +// Protobuf C++ Version: 4.25.3 -#ifndef GOOGLE_PROTOBUF_INCLUDED_pdpb_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_pdpb_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_pdpb_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_pdpb_2eproto_2epb_2eh #include #include - -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include +#include +#include + +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION < 4025000 +#error "This file was generated by a newer version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please update" +#error "your headers." +#endif // PROTOBUF_VERSION + +#if 4025003 < PROTOBUF_MIN_PROTOC_VERSION +#error "This file was generated by an older version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please" +#error "regenerate this file with a newer version of protoc." +#endif // PROTOBUF_MIN_PROTOC_VERSION +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" #include "metapb.pb.h" // @@protoc_insertion_point(includes) -#include + +// Must be included last. +#include "google/protobuf/port_def.inc" + #define PROTOBUF_INTERNAL_EXPORT_pdpb_2eproto -PROTOBUF_NAMESPACE_OPEN + +namespace google { +namespace protobuf { namespace internal { class AnyMetadata; } // namespace internal -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // Internal implementation detail -- do not use these members. struct TableStruct_pdpb_2eproto { - static const uint32_t offsets[]; + static const ::uint32_t offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_pdpb_2eproto; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_pdpb_2eproto; namespace pdpb { class Error; struct ErrorDefaultTypeInternal; @@ -78,20 +89,12 @@ class ResponseHeader; struct ResponseHeaderDefaultTypeInternal; extern ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_; } // namespace pdpb -PROTOBUF_NAMESPACE_OPEN -template<> ::pdpb::Error* Arena::CreateMaybeMessage<::pdpb::Error>(Arena*); -template<> ::pdpb::GetMembersRequest* Arena::CreateMaybeMessage<::pdpb::GetMembersRequest>(Arena*); -template<> ::pdpb::GetMembersResponse* Arena::CreateMaybeMessage<::pdpb::GetMembersResponse>(Arena*); -template<> ::pdpb::GetRegionRequest* Arena::CreateMaybeMessage<::pdpb::GetRegionRequest>(Arena*); -template<> ::pdpb::GetRegionResponse* Arena::CreateMaybeMessage<::pdpb::GetRegionResponse>(Arena*); -template<> ::pdpb::GetStoreRequest* Arena::CreateMaybeMessage<::pdpb::GetStoreRequest>(Arena*); -template<> ::pdpb::GetStoreResponse* Arena::CreateMaybeMessage<::pdpb::GetStoreResponse>(Arena*); -template<> ::pdpb::Member* Arena::CreateMaybeMessage<::pdpb::Member>(Arena*); -template<> ::pdpb::RequestHeader* Arena::CreateMaybeMessage<::pdpb::RequestHeader>(Arena*); -template<> ::pdpb::ResponseHeader* Arena::CreateMaybeMessage<::pdpb::ResponseHeader>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace pdpb { +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +namespace pdpb { enum ErrorType : int { OK = 0, UNKNOWN = 1, @@ -100,38 +103,52 @@ enum ErrorType : int { ALREADY_BOOTSTRAPPED = 4, INCOMPATIBLE_VERSION = 5, REGION_NOT_FOUND = 6, - ErrorType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - ErrorType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() + ErrorType_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + ErrorType_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), }; + bool ErrorType_IsValid(int value); -constexpr ErrorType ErrorType_MIN = OK; -constexpr ErrorType ErrorType_MAX = REGION_NOT_FOUND; -constexpr int ErrorType_ARRAYSIZE = ErrorType_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ErrorType_descriptor(); -template -inline const std::string& ErrorType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function ErrorType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - ErrorType_descriptor(), enum_t_value); -} -inline bool ErrorType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ErrorType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - ErrorType_descriptor(), name, value); +extern const uint32_t ErrorType_internal_data_[]; +constexpr ErrorType ErrorType_MIN = static_cast(0); +constexpr ErrorType ErrorType_MAX = static_cast(6); +constexpr int ErrorType_ARRAYSIZE = 6 + 1; +const ::google::protobuf::EnumDescriptor* +ErrorType_descriptor(); +template +const std::string& ErrorType_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to ErrorType_Name()."); + return ErrorType_Name(static_cast(value)); +} +template <> +inline const std::string& ErrorType_Name(ErrorType value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool ErrorType_Parse(absl::string_view name, ErrorType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ErrorType_descriptor(), name, value); } + // =================================================================== + +// ------------------------------------------------------------------- + class RequestHeader final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.RequestHeader) */ { + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.RequestHeader) */ { public: inline RequestHeader() : RequestHeader(nullptr) {} ~RequestHeader() override; - explicit PROTOBUF_CONSTEXPR RequestHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + template + explicit PROTOBUF_CONSTEXPR RequestHeader(::google::protobuf::internal::ConstantInitialized); - RequestHeader(const RequestHeader& from); + inline RequestHeader(const RequestHeader& from) + : RequestHeader(nullptr, from) {} RequestHeader(RequestHeader&& from) noexcept : RequestHeader() { *this = ::std::move(from); @@ -143,9 +160,9 @@ class RequestHeader final : } inline RequestHeader& operator=(RequestHeader&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -155,13 +172,22 @@ class RequestHeader final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const RequestHeader& default_instance() { @@ -180,65 +206,65 @@ class RequestHeader final : inline void Swap(RequestHeader* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(RequestHeader* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - RequestHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + RequestHeader* New(::google::protobuf::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + using ::google::protobuf::Message::CopyFrom; void CopyFrom(const RequestHeader& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + using ::google::protobuf::Message::MergeFrom; void MergeFrom( const RequestHeader& from) { RequestHeader::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; void InternalSwap(RequestHeader* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "pdpb.RequestHeader"; } protected: - explicit RequestHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit RequestHeader(::google::protobuf::Arena* arena); + RequestHeader(::google::protobuf::Arena* arena, const RequestHeader& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -249,62 +275,81 @@ class RequestHeader final : kSenderIdFieldNumber = 2, }; // uint64 cluster_id = 1; - void clear_cluster_id(); - uint64_t cluster_id() const; - void set_cluster_id(uint64_t value); + void clear_cluster_id() ; + ::uint64_t cluster_id() const; + void set_cluster_id(::uint64_t value); + private: - uint64_t _internal_cluster_id() const; - void _internal_set_cluster_id(uint64_t value); - public: + ::uint64_t _internal_cluster_id() const; + void _internal_set_cluster_id(::uint64_t value); + public: // uint64 sender_id = 2; - void clear_sender_id(); - uint64_t sender_id() const; - void set_sender_id(uint64_t value); + void clear_sender_id() ; + ::uint64_t sender_id() const; + void set_sender_id(::uint64_t value); + private: - uint64_t _internal_sender_id() const; - void _internal_set_sender_id(uint64_t value); - public: + ::uint64_t _internal_sender_id() const; + void _internal_set_sender_id(::uint64_t value); + public: // @@protoc_insertion_point(class_scope:pdpb.RequestHeader) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - uint64_t cluster_id_; - uint64_t sender_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::uint64_t cluster_id_; + ::uint64_t sender_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class ResponseHeader final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.ResponseHeader) */ { +class Member final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.Member) */ { public: - inline ResponseHeader() : ResponseHeader(nullptr) {} - ~ResponseHeader() override; - explicit PROTOBUF_CONSTEXPR ResponseHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Member() : Member(nullptr) {} + ~Member() override; + template + explicit PROTOBUF_CONSTEXPR Member(::google::protobuf::internal::ConstantInitialized); - ResponseHeader(const ResponseHeader& from); - ResponseHeader(ResponseHeader&& from) noexcept - : ResponseHeader() { + inline Member(const Member& from) + : Member(nullptr, from) {} + Member(Member&& from) noexcept + : Member() { *this = ::std::move(from); } - inline ResponseHeader& operator=(const ResponseHeader& from) { + inline Member& operator=(const Member& from) { CopyFrom(from); return *this; } - inline ResponseHeader& operator=(ResponseHeader&& from) noexcept { + inline Member& operator=(Member&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -314,151 +359,266 @@ class ResponseHeader final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ResponseHeader& default_instance() { + static const Member& default_instance() { return *internal_default_instance(); } - static inline const ResponseHeader* internal_default_instance() { - return reinterpret_cast( - &_ResponseHeader_default_instance_); + static inline const Member* internal_default_instance() { + return reinterpret_cast( + &_Member_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 8; - friend void swap(ResponseHeader& a, ResponseHeader& b) { + friend void swap(Member& a, Member& b) { a.Swap(&b); } - inline void Swap(ResponseHeader* other) { + inline void Swap(Member* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ResponseHeader* other) { + void UnsafeArenaSwap(Member* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - ResponseHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Member* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ResponseHeader& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ResponseHeader& from) { - ResponseHeader::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Member& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const Member& from) { + Member::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ResponseHeader* other); + void InternalSwap(Member* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "pdpb.ResponseHeader"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "pdpb.Member"; } protected: - explicit ResponseHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Member(::google::protobuf::Arena* arena); + Member(::google::protobuf::Arena* arena, const Member& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kErrorFieldNumber = 2, - kClusterIdFieldNumber = 1, + kPeerUrlsFieldNumber = 3, + kClientUrlsFieldNumber = 4, + kNameFieldNumber = 1, + kLeaderNameFieldNumber = 5, + kMemberIdFieldNumber = 2, + kLeaderIdFieldNumber = 6, }; - // .pdpb.Error error = 2; - bool has_error() const; + // repeated string peer_urls = 3; + int peer_urls_size() const; private: - bool _internal_has_error() const; + int _internal_peer_urls_size() const; + public: - void clear_error(); - const ::pdpb::Error& error() const; - PROTOBUF_NODISCARD ::pdpb::Error* release_error(); - ::pdpb::Error* mutable_error(); - void set_allocated_error(::pdpb::Error* error); + void clear_peer_urls() ; + const std::string& peer_urls(int index) const; + std::string* mutable_peer_urls(int index); + void set_peer_urls(int index, const std::string& value); + void set_peer_urls(int index, std::string&& value); + void set_peer_urls(int index, const char* value); + void set_peer_urls(int index, const char* value, std::size_t size); + void set_peer_urls(int index, absl::string_view value); + std::string* add_peer_urls(); + void add_peer_urls(const std::string& value); + void add_peer_urls(std::string&& value); + void add_peer_urls(const char* value); + void add_peer_urls(const char* value, std::size_t size); + void add_peer_urls(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& peer_urls() const; + ::google::protobuf::RepeatedPtrField* mutable_peer_urls(); + private: - const ::pdpb::Error& _internal_error() const; - ::pdpb::Error* _internal_mutable_error(); + const ::google::protobuf::RepeatedPtrField& _internal_peer_urls() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_peer_urls(); + public: - void unsafe_arena_set_allocated_error( - ::pdpb::Error* error); - ::pdpb::Error* unsafe_arena_release_error(); + // repeated string client_urls = 4; + int client_urls_size() const; + private: + int _internal_client_urls_size() const; + + public: + void clear_client_urls() ; + const std::string& client_urls(int index) const; + std::string* mutable_client_urls(int index); + void set_client_urls(int index, const std::string& value); + void set_client_urls(int index, std::string&& value); + void set_client_urls(int index, const char* value); + void set_client_urls(int index, const char* value, std::size_t size); + void set_client_urls(int index, absl::string_view value); + std::string* add_client_urls(); + void add_client_urls(const std::string& value); + void add_client_urls(std::string&& value); + void add_client_urls(const char* value); + void add_client_urls(const char* value, std::size_t size); + void add_client_urls(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& client_urls() const; + ::google::protobuf::RepeatedPtrField* mutable_client_urls(); - // uint64 cluster_id = 1; - void clear_cluster_id(); - uint64_t cluster_id() const; - void set_cluster_id(uint64_t value); private: - uint64_t _internal_cluster_id() const; - void _internal_set_cluster_id(uint64_t value); + const ::google::protobuf::RepeatedPtrField& _internal_client_urls() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_client_urls(); + public: + // string name = 1; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); - // @@protoc_insertion_point(class_scope:pdpb.ResponseHeader) + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // string leader_name = 5; + void clear_leader_name() ; + const std::string& leader_name() const; + template + void set_leader_name(Arg_&& arg, Args_... args); + std::string* mutable_leader_name(); + PROTOBUF_NODISCARD std::string* release_leader_name(); + void set_allocated_leader_name(std::string* value); + + private: + const std::string& _internal_leader_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_leader_name( + const std::string& value); + std::string* _internal_mutable_leader_name(); + + public: + // uint64 member_id = 2; + void clear_member_id() ; + ::uint64_t member_id() const; + void set_member_id(::uint64_t value); + + private: + ::uint64_t _internal_member_id() const; + void _internal_set_member_id(::uint64_t value); + + public: + // uint64 leader_id = 6; + void clear_leader_id() ; + ::uint64_t leader_id() const; + void set_leader_id(::uint64_t value); + + private: + ::uint64_t _internal_leader_id() const; + void _internal_set_leader_id(::uint64_t value); + + public: + // @@protoc_insertion_point(class_scope:pdpb.Member) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 6, 0, + 55, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::pdpb::Error* error_; - uint64_t cluster_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::RepeatedPtrField peer_urls_; + ::google::protobuf::RepeatedPtrField client_urls_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr leader_name_; + ::uint64_t member_id_; + ::uint64_t leader_id_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- class Error final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.Error) */ { + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.Error) */ { public: inline Error() : Error(nullptr) {} ~Error() override; - explicit PROTOBUF_CONSTEXPR Error(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + template + explicit PROTOBUF_CONSTEXPR Error(::google::protobuf::internal::ConstantInitialized); - Error(const Error& from); + inline Error(const Error& from) + : Error(nullptr, from) {} Error(Error&& from) noexcept : Error() { *this = ::std::move(from); @@ -470,9 +630,9 @@ class Error final : } inline Error& operator=(Error&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -482,13 +642,22 @@ class Error final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const Error& default_instance() { @@ -507,65 +676,65 @@ class Error final : inline void Swap(Error* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(Error* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Error* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + Error* New(::google::protobuf::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + using ::google::protobuf::Message::CopyFrom; void CopyFrom(const Error& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + using ::google::protobuf::Message::MergeFrom; void MergeFrom( const Error& from) { Error::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; void InternalSwap(Error* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "pdpb.Error"; } protected: - explicit Error(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit Error(::google::protobuf::Arena* arena); + Error(::google::protobuf::Arena* arena, const Error& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -576,67 +745,87 @@ class Error final : kTypeFieldNumber = 1, }; // string message = 2; - void clear_message(); + void clear_message() ; const std::string& message() const; - template - void set_message(ArgT0&& arg0, ArgT... args); + template + void set_message(Arg_&& arg, Args_... args); std::string* mutable_message(); PROTOBUF_NODISCARD std::string* release_message(); - void set_allocated_message(std::string* message); + void set_allocated_message(std::string* value); + private: const std::string& _internal_message() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_message(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message( + const std::string& value); std::string* _internal_mutable_message(); - public: + public: // .pdpb.ErrorType type = 1; - void clear_type(); + void clear_type() ; ::pdpb::ErrorType type() const; void set_type(::pdpb::ErrorType value); + private: ::pdpb::ErrorType _internal_type() const; void _internal_set_type(::pdpb::ErrorType value); - public: + public: // @@protoc_insertion_point(class_scope:pdpb.Error) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 26, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::ArenaStringPtr message_; int type_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class GetRegionRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.GetRegionRequest) */ { +class ResponseHeader final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.ResponseHeader) */ { public: - inline GetRegionRequest() : GetRegionRequest(nullptr) {} - ~GetRegionRequest() override; - explicit PROTOBUF_CONSTEXPR GetRegionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline ResponseHeader() : ResponseHeader(nullptr) {} + ~ResponseHeader() override; + template + explicit PROTOBUF_CONSTEXPR ResponseHeader(::google::protobuf::internal::ConstantInitialized); - GetRegionRequest(const GetRegionRequest& from); - GetRegionRequest(GetRegionRequest&& from) noexcept - : GetRegionRequest() { + inline ResponseHeader(const ResponseHeader& from) + : ResponseHeader(nullptr, from) {} + ResponseHeader(ResponseHeader&& from) noexcept + : ResponseHeader() { *this = ::std::move(from); } - inline GetRegionRequest& operator=(const GetRegionRequest& from) { + inline ResponseHeader& operator=(const ResponseHeader& from) { CopyFrom(from); return *this; } - inline GetRegionRequest& operator=(GetRegionRequest&& from) noexcept { + inline ResponseHeader& operator=(ResponseHeader&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -646,170 +835,190 @@ class GetRegionRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetRegionRequest& default_instance() { + static const ResponseHeader& default_instance() { return *internal_default_instance(); } - static inline const GetRegionRequest* internal_default_instance() { - return reinterpret_cast( - &_GetRegionRequest_default_instance_); + static inline const ResponseHeader* internal_default_instance() { + return reinterpret_cast( + &_ResponseHeader_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 1; - friend void swap(GetRegionRequest& a, GetRegionRequest& b) { + friend void swap(ResponseHeader& a, ResponseHeader& b) { a.Swap(&b); } - inline void Swap(GetRegionRequest* other) { + inline void Swap(ResponseHeader* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetRegionRequest* other) { + void UnsafeArenaSwap(ResponseHeader* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - GetRegionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ResponseHeader* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const GetRegionRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const GetRegionRequest& from) { - GetRegionRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ResponseHeader& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const ResponseHeader& from) { + ResponseHeader::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetRegionRequest* other); + void InternalSwap(ResponseHeader* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "pdpb.GetRegionRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "pdpb.ResponseHeader"; } protected: - explicit GetRegionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit ResponseHeader(::google::protobuf::Arena* arena); + ResponseHeader(::google::protobuf::Arena* arena, const ResponseHeader& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kRegionKeyFieldNumber = 2, - kHeaderFieldNumber = 1, + kErrorFieldNumber = 2, + kClusterIdFieldNumber = 1, }; - // bytes region_key = 2; - void clear_region_key(); - const std::string& region_key() const; - template - void set_region_key(ArgT0&& arg0, ArgT... args); - std::string* mutable_region_key(); - PROTOBUF_NODISCARD std::string* release_region_key(); - void set_allocated_region_key(std::string* region_key); - private: - const std::string& _internal_region_key() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_region_key(const std::string& value); - std::string* _internal_mutable_region_key(); - public: + // .pdpb.Error error = 2; + bool has_error() const; + void clear_error() ; + const ::pdpb::Error& error() const; + PROTOBUF_NODISCARD ::pdpb::Error* release_error(); + ::pdpb::Error* mutable_error(); + void set_allocated_error(::pdpb::Error* value); + void unsafe_arena_set_allocated_error(::pdpb::Error* value); + ::pdpb::Error* unsafe_arena_release_error(); - // .pdpb.RequestHeader header = 1; - bool has_header() const; private: - bool _internal_has_header() const; + const ::pdpb::Error& _internal_error() const; + ::pdpb::Error* _internal_mutable_error(); + public: - void clear_header(); - const ::pdpb::RequestHeader& header() const; - PROTOBUF_NODISCARD ::pdpb::RequestHeader* release_header(); - ::pdpb::RequestHeader* mutable_header(); - void set_allocated_header(::pdpb::RequestHeader* header); + // uint64 cluster_id = 1; + void clear_cluster_id() ; + ::uint64_t cluster_id() const; + void set_cluster_id(::uint64_t value); + private: - const ::pdpb::RequestHeader& _internal_header() const; - ::pdpb::RequestHeader* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::pdpb::RequestHeader* header); - ::pdpb::RequestHeader* unsafe_arena_release_header(); + ::uint64_t _internal_cluster_id() const; + void _internal_set_cluster_id(::uint64_t value); - // @@protoc_insertion_point(class_scope:pdpb.GetRegionRequest) + public: + // @@protoc_insertion_point(class_scope:pdpb.ResponseHeader) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr region_key_; - ::pdpb::RequestHeader* header_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::pdpb::Error* error_; + ::uint64_t cluster_id_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class GetRegionResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.GetRegionResponse) */ { +class GetStoreRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.GetStoreRequest) */ { public: - inline GetRegionResponse() : GetRegionResponse(nullptr) {} - ~GetRegionResponse() override; - explicit PROTOBUF_CONSTEXPR GetRegionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GetRegionResponse(const GetRegionResponse& from); - GetRegionResponse(GetRegionResponse&& from) noexcept - : GetRegionResponse() { + inline GetStoreRequest() : GetStoreRequest(nullptr) {} + ~GetStoreRequest() override; + template + explicit PROTOBUF_CONSTEXPR GetStoreRequest(::google::protobuf::internal::ConstantInitialized); + + inline GetStoreRequest(const GetStoreRequest& from) + : GetStoreRequest(nullptr, from) {} + GetStoreRequest(GetStoreRequest&& from) noexcept + : GetStoreRequest() { *this = ::std::move(from); } - inline GetRegionResponse& operator=(const GetRegionResponse& from) { + inline GetStoreRequest& operator=(const GetStoreRequest& from) { CopyFrom(from); return *this; } - inline GetRegionResponse& operator=(GetRegionResponse&& from) noexcept { + inline GetStoreRequest& operator=(GetStoreRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -819,234 +1028,190 @@ class GetRegionResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetRegionResponse& default_instance() { + static const GetStoreRequest& default_instance() { return *internal_default_instance(); } - static inline const GetRegionResponse* internal_default_instance() { - return reinterpret_cast( - &_GetRegionResponse_default_instance_); + static inline const GetStoreRequest* internal_default_instance() { + return reinterpret_cast( + &_GetStoreRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; - friend void swap(GetRegionResponse& a, GetRegionResponse& b) { + friend void swap(GetStoreRequest& a, GetStoreRequest& b) { a.Swap(&b); } - inline void Swap(GetRegionResponse* other) { + inline void Swap(GetStoreRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetRegionResponse* other) { + void UnsafeArenaSwap(GetStoreRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - GetRegionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetStoreRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const GetRegionResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const GetRegionResponse& from) { - GetRegionResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const GetStoreRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const GetStoreRequest& from) { + GetStoreRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetRegionResponse* other); + void InternalSwap(GetStoreRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "pdpb.GetRegionResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "pdpb.GetStoreRequest"; } protected: - explicit GetRegionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GetStoreRequest(::google::protobuf::Arena* arena); + GetStoreRequest(::google::protobuf::Arena* arena, const GetStoreRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kDownPeersFieldNumber = 4, - kPendingPeersFieldNumber = 5, kHeaderFieldNumber = 1, - kRegionFieldNumber = 2, - kLeaderFieldNumber = 3, + kStoreIdFieldNumber = 2, }; - // repeated .metapb.Peer down_peers = 4; - int down_peers_size() const; - private: - int _internal_down_peers_size() const; - public: - void clear_down_peers(); - ::metapb::Peer* mutable_down_peers(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >* - mutable_down_peers(); - private: - const ::metapb::Peer& _internal_down_peers(int index) const; - ::metapb::Peer* _internal_add_down_peers(); - public: - const ::metapb::Peer& down_peers(int index) const; - ::metapb::Peer* add_down_peers(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >& - down_peers() const; + // .pdpb.RequestHeader header = 1; + bool has_header() const; + void clear_header() ; + const ::pdpb::RequestHeader& header() const; + PROTOBUF_NODISCARD ::pdpb::RequestHeader* release_header(); + ::pdpb::RequestHeader* mutable_header(); + void set_allocated_header(::pdpb::RequestHeader* value); + void unsafe_arena_set_allocated_header(::pdpb::RequestHeader* value); + ::pdpb::RequestHeader* unsafe_arena_release_header(); - // repeated .metapb.Peer pending_peers = 5; - int pending_peers_size() const; private: - int _internal_pending_peers_size() const; - public: - void clear_pending_peers(); - ::metapb::Peer* mutable_pending_peers(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >* - mutable_pending_peers(); - private: - const ::metapb::Peer& _internal_pending_peers(int index) const; - ::metapb::Peer* _internal_add_pending_peers(); - public: - const ::metapb::Peer& pending_peers(int index) const; - ::metapb::Peer* add_pending_peers(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >& - pending_peers() const; + const ::pdpb::RequestHeader& _internal_header() const; + ::pdpb::RequestHeader* _internal_mutable_header(); - // .pdpb.ResponseHeader header = 1; - bool has_header() const; - private: - bool _internal_has_header() const; - public: - void clear_header(); - const ::pdpb::ResponseHeader& header() const; - PROTOBUF_NODISCARD ::pdpb::ResponseHeader* release_header(); - ::pdpb::ResponseHeader* mutable_header(); - void set_allocated_header(::pdpb::ResponseHeader* header); - private: - const ::pdpb::ResponseHeader& _internal_header() const; - ::pdpb::ResponseHeader* _internal_mutable_header(); public: - void unsafe_arena_set_allocated_header( - ::pdpb::ResponseHeader* header); - ::pdpb::ResponseHeader* unsafe_arena_release_header(); + // uint64 store_id = 2; + void clear_store_id() ; + ::uint64_t store_id() const; + void set_store_id(::uint64_t value); - // .metapb.Region region = 2; - bool has_region() const; private: - bool _internal_has_region() const; - public: - void clear_region(); - const ::metapb::Region& region() const; - PROTOBUF_NODISCARD ::metapb::Region* release_region(); - ::metapb::Region* mutable_region(); - void set_allocated_region(::metapb::Region* region); - private: - const ::metapb::Region& _internal_region() const; - ::metapb::Region* _internal_mutable_region(); - public: - void unsafe_arena_set_allocated_region( - ::metapb::Region* region); - ::metapb::Region* unsafe_arena_release_region(); + ::uint64_t _internal_store_id() const; + void _internal_set_store_id(::uint64_t value); - // .metapb.Peer leader = 3; - bool has_leader() const; - private: - bool _internal_has_leader() const; public: - void clear_leader(); - const ::metapb::Peer& leader() const; - PROTOBUF_NODISCARD ::metapb::Peer* release_leader(); - ::metapb::Peer* mutable_leader(); - void set_allocated_leader(::metapb::Peer* leader); - private: - const ::metapb::Peer& _internal_leader() const; - ::metapb::Peer* _internal_mutable_leader(); - public: - void unsafe_arena_set_allocated_leader( - ::metapb::Peer* leader); - ::metapb::Peer* unsafe_arena_release_leader(); - - // @@protoc_insertion_point(class_scope:pdpb.GetRegionResponse) + // @@protoc_insertion_point(class_scope:pdpb.GetStoreRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer > down_peers_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer > pending_peers_; - ::pdpb::ResponseHeader* header_; - ::metapb::Region* region_; - ::metapb::Peer* leader_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::pdpb::RequestHeader* header_; + ::uint64_t store_id_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class GetStoreRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.GetStoreRequest) */ { +class GetRegionRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.GetRegionRequest) */ { public: - inline GetStoreRequest() : GetStoreRequest(nullptr) {} - ~GetStoreRequest() override; - explicit PROTOBUF_CONSTEXPR GetStoreRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline GetRegionRequest() : GetRegionRequest(nullptr) {} + ~GetRegionRequest() override; + template + explicit PROTOBUF_CONSTEXPR GetRegionRequest(::google::protobuf::internal::ConstantInitialized); - GetStoreRequest(const GetStoreRequest& from); - GetStoreRequest(GetStoreRequest&& from) noexcept - : GetStoreRequest() { + inline GetRegionRequest(const GetRegionRequest& from) + : GetRegionRequest(nullptr, from) {} + GetRegionRequest(GetRegionRequest&& from) noexcept + : GetRegionRequest() { *this = ::std::move(from); } - inline GetStoreRequest& operator=(const GetStoreRequest& from) { + inline GetRegionRequest& operator=(const GetRegionRequest& from) { CopyFrom(from); return *this; } - inline GetStoreRequest& operator=(GetStoreRequest&& from) noexcept { + inline GetRegionRequest& operator=(GetRegionRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1056,165 +1221,196 @@ class GetStoreRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetStoreRequest& default_instance() { + static const GetRegionRequest& default_instance() { return *internal_default_instance(); } - static inline const GetStoreRequest* internal_default_instance() { - return reinterpret_cast( - &_GetStoreRequest_default_instance_); + static inline const GetRegionRequest* internal_default_instance() { + return reinterpret_cast( + &_GetRegionRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 3; - friend void swap(GetStoreRequest& a, GetStoreRequest& b) { + friend void swap(GetRegionRequest& a, GetRegionRequest& b) { a.Swap(&b); } - inline void Swap(GetStoreRequest* other) { + inline void Swap(GetRegionRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetStoreRequest* other) { + void UnsafeArenaSwap(GetRegionRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - GetStoreRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetRegionRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const GetStoreRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const GetStoreRequest& from) { - GetStoreRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const GetRegionRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const GetRegionRequest& from) { + GetRegionRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetStoreRequest* other); + void InternalSwap(GetRegionRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "pdpb.GetStoreRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "pdpb.GetRegionRequest"; } protected: - explicit GetStoreRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GetRegionRequest(::google::protobuf::Arena* arena); + GetRegionRequest(::google::protobuf::Arena* arena, const GetRegionRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { + kRegionKeyFieldNumber = 2, kHeaderFieldNumber = 1, - kStoreIdFieldNumber = 2, }; - // .pdpb.RequestHeader header = 1; - bool has_header() const; + // bytes region_key = 2; + void clear_region_key() ; + const std::string& region_key() const; + template + void set_region_key(Arg_&& arg, Args_... args); + std::string* mutable_region_key(); + PROTOBUF_NODISCARD std::string* release_region_key(); + void set_allocated_region_key(std::string* value); + private: - bool _internal_has_header() const; + const std::string& _internal_region_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_region_key( + const std::string& value); + std::string* _internal_mutable_region_key(); + public: - void clear_header(); + // .pdpb.RequestHeader header = 1; + bool has_header() const; + void clear_header() ; const ::pdpb::RequestHeader& header() const; PROTOBUF_NODISCARD ::pdpb::RequestHeader* release_header(); ::pdpb::RequestHeader* mutable_header(); - void set_allocated_header(::pdpb::RequestHeader* header); + void set_allocated_header(::pdpb::RequestHeader* value); + void unsafe_arena_set_allocated_header(::pdpb::RequestHeader* value); + ::pdpb::RequestHeader* unsafe_arena_release_header(); + private: const ::pdpb::RequestHeader& _internal_header() const; ::pdpb::RequestHeader* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::pdpb::RequestHeader* header); - ::pdpb::RequestHeader* unsafe_arena_release_header(); - // uint64 store_id = 2; - void clear_store_id(); - uint64_t store_id() const; - void set_store_id(uint64_t value); - private: - uint64_t _internal_store_id() const; - void _internal_set_store_id(uint64_t value); public: - - // @@protoc_insertion_point(class_scope:pdpb.GetStoreRequest) + // @@protoc_insertion_point(class_scope:pdpb.GetRegionRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr region_key_; ::pdpb::RequestHeader* header_; - uint64_t store_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class GetStoreResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.GetStoreResponse) */ { +class GetMembersRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.GetMembersRequest) */ { public: - inline GetStoreResponse() : GetStoreResponse(nullptr) {} - ~GetStoreResponse() override; - explicit PROTOBUF_CONSTEXPR GetStoreResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline GetMembersRequest() : GetMembersRequest(nullptr) {} + ~GetMembersRequest() override; + template + explicit PROTOBUF_CONSTEXPR GetMembersRequest(::google::protobuf::internal::ConstantInitialized); - GetStoreResponse(const GetStoreResponse& from); - GetStoreResponse(GetStoreResponse&& from) noexcept - : GetStoreResponse() { + inline GetMembersRequest(const GetMembersRequest& from) + : GetMembersRequest(nullptr, from) {} + GetMembersRequest(GetMembersRequest&& from) noexcept + : GetMembersRequest() { *this = ::std::move(from); } - inline GetStoreResponse& operator=(const GetStoreResponse& from) { + inline GetMembersRequest& operator=(const GetMembersRequest& from) { CopyFrom(from); return *this; } - inline GetStoreResponse& operator=(GetStoreResponse&& from) noexcept { + inline GetMembersRequest& operator=(GetMembersRequest&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1224,90 +1420,99 @@ class GetStoreResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetStoreResponse& default_instance() { + static const GetMembersRequest& default_instance() { return *internal_default_instance(); } - static inline const GetStoreResponse* internal_default_instance() { - return reinterpret_cast( - &_GetStoreResponse_default_instance_); + static inline const GetMembersRequest* internal_default_instance() { + return reinterpret_cast( + &_GetMembersRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; - friend void swap(GetStoreResponse& a, GetStoreResponse& b) { + friend void swap(GetMembersRequest& a, GetMembersRequest& b) { a.Swap(&b); } - inline void Swap(GetStoreResponse* other) { + inline void Swap(GetMembersRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetStoreResponse* other) { + void UnsafeArenaSwap(GetMembersRequest* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - GetStoreResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetMembersRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const GetStoreResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const GetStoreResponse& from) { - GetStoreResponse::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const GetMembersRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const GetMembersRequest& from) { + GetMembersRequest::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetStoreResponse* other); + void InternalSwap(GetMembersRequest* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "pdpb.GetStoreResponse"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "pdpb.GetMembersRequest"; } protected: - explicit GetStoreResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GetMembersRequest(::google::protobuf::Arena* arena); + GetMembersRequest(::google::protobuf::Arena* arena, const GetMembersRequest& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1315,83 +1520,78 @@ class GetStoreResponse final : enum : int { kHeaderFieldNumber = 1, - kStoreFieldNumber = 2, }; - // .pdpb.ResponseHeader header = 1; + // .pdpb.RequestHeader header = 1; bool has_header() const; - private: - bool _internal_has_header() const; - public: - void clear_header(); - const ::pdpb::ResponseHeader& header() const; - PROTOBUF_NODISCARD ::pdpb::ResponseHeader* release_header(); - ::pdpb::ResponseHeader* mutable_header(); - void set_allocated_header(::pdpb::ResponseHeader* header); - private: - const ::pdpb::ResponseHeader& _internal_header() const; - ::pdpb::ResponseHeader* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::pdpb::ResponseHeader* header); - ::pdpb::ResponseHeader* unsafe_arena_release_header(); + void clear_header() ; + const ::pdpb::RequestHeader& header() const; + PROTOBUF_NODISCARD ::pdpb::RequestHeader* release_header(); + ::pdpb::RequestHeader* mutable_header(); + void set_allocated_header(::pdpb::RequestHeader* value); + void unsafe_arena_set_allocated_header(::pdpb::RequestHeader* value); + ::pdpb::RequestHeader* unsafe_arena_release_header(); - // .metapb.Store store = 2; - bool has_store() const; - private: - bool _internal_has_store() const; - public: - void clear_store(); - const ::metapb::Store& store() const; - PROTOBUF_NODISCARD ::metapb::Store* release_store(); - ::metapb::Store* mutable_store(); - void set_allocated_store(::metapb::Store* store); private: - const ::metapb::Store& _internal_store() const; - ::metapb::Store* _internal_mutable_store(); - public: - void unsafe_arena_set_allocated_store( - ::metapb::Store* store); - ::metapb::Store* unsafe_arena_release_store(); + const ::pdpb::RequestHeader& _internal_header() const; + ::pdpb::RequestHeader* _internal_mutable_header(); - // @@protoc_insertion_point(class_scope:pdpb.GetStoreResponse) + public: + // @@protoc_insertion_point(class_scope:pdpb.GetMembersRequest) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::pdpb::ResponseHeader* header_; - ::metapb::Store* store_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::pdpb::RequestHeader* header_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class GetMembersRequest final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.GetMembersRequest) */ { +class GetStoreResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.GetStoreResponse) */ { public: - inline GetMembersRequest() : GetMembersRequest(nullptr) {} - ~GetMembersRequest() override; - explicit PROTOBUF_CONSTEXPR GetMembersRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline GetStoreResponse() : GetStoreResponse(nullptr) {} + ~GetStoreResponse() override; + template + explicit PROTOBUF_CONSTEXPR GetStoreResponse(::google::protobuf::internal::ConstantInitialized); - GetMembersRequest(const GetMembersRequest& from); - GetMembersRequest(GetMembersRequest&& from) noexcept - : GetMembersRequest() { + inline GetStoreResponse(const GetStoreResponse& from) + : GetStoreResponse(nullptr, from) {} + GetStoreResponse(GetStoreResponse&& from) noexcept + : GetStoreResponse() { *this = ::std::move(from); } - inline GetMembersRequest& operator=(const GetMembersRequest& from) { + inline GetStoreResponse& operator=(const GetStoreResponse& from) { CopyFrom(from); return *this; } - inline GetMembersRequest& operator=(GetMembersRequest&& from) noexcept { + inline GetStoreResponse& operator=(GetStoreResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1401,90 +1601,99 @@ class GetMembersRequest final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetMembersRequest& default_instance() { + static const GetStoreResponse& default_instance() { return *internal_default_instance(); } - static inline const GetMembersRequest* internal_default_instance() { - return reinterpret_cast( - &_GetMembersRequest_default_instance_); + static inline const GetStoreResponse* internal_default_instance() { + return reinterpret_cast( + &_GetStoreResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 6; - friend void swap(GetMembersRequest& a, GetMembersRequest& b) { + friend void swap(GetStoreResponse& a, GetStoreResponse& b) { a.Swap(&b); } - inline void Swap(GetMembersRequest* other) { + inline void Swap(GetStoreResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetMembersRequest* other) { + void UnsafeArenaSwap(GetStoreResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - GetMembersRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetStoreResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const GetMembersRequest& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const GetMembersRequest& from) { - GetMembersRequest::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const GetStoreResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const GetStoreResponse& from) { + GetStoreResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GetMembersRequest* other); + void InternalSwap(GetStoreResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "pdpb.GetMembersRequest"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "pdpb.GetStoreResponse"; } protected: - explicit GetMembersRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GetStoreResponse(::google::protobuf::Arena* arena); + GetStoreResponse(::google::protobuf::Arena* arena, const GetStoreResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1492,63 +1701,95 @@ class GetMembersRequest final : enum : int { kHeaderFieldNumber = 1, + kStoreFieldNumber = 2, }; - // .pdpb.RequestHeader header = 1; + // .pdpb.ResponseHeader header = 1; bool has_header() const; + void clear_header() ; + const ::pdpb::ResponseHeader& header() const; + PROTOBUF_NODISCARD ::pdpb::ResponseHeader* release_header(); + ::pdpb::ResponseHeader* mutable_header(); + void set_allocated_header(::pdpb::ResponseHeader* value); + void unsafe_arena_set_allocated_header(::pdpb::ResponseHeader* value); + ::pdpb::ResponseHeader* unsafe_arena_release_header(); + private: - bool _internal_has_header() const; + const ::pdpb::ResponseHeader& _internal_header() const; + ::pdpb::ResponseHeader* _internal_mutable_header(); + public: - void clear_header(); - const ::pdpb::RequestHeader& header() const; - PROTOBUF_NODISCARD ::pdpb::RequestHeader* release_header(); - ::pdpb::RequestHeader* mutable_header(); - void set_allocated_header(::pdpb::RequestHeader* header); + // .metapb.Store store = 2; + bool has_store() const; + void clear_store() ; + const ::metapb::Store& store() const; + PROTOBUF_NODISCARD ::metapb::Store* release_store(); + ::metapb::Store* mutable_store(); + void set_allocated_store(::metapb::Store* value); + void unsafe_arena_set_allocated_store(::metapb::Store* value); + ::metapb::Store* unsafe_arena_release_store(); + private: - const ::pdpb::RequestHeader& _internal_header() const; - ::pdpb::RequestHeader* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::pdpb::RequestHeader* header); - ::pdpb::RequestHeader* unsafe_arena_release_header(); + const ::metapb::Store& _internal_store() const; + ::metapb::Store* _internal_mutable_store(); - // @@protoc_insertion_point(class_scope:pdpb.GetMembersRequest) + public: + // @@protoc_insertion_point(class_scope:pdpb.GetStoreResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 2, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::pdpb::RequestHeader* header_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::pdpb::ResponseHeader* header_; + ::metapb::Store* store_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- -class Member final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.Member) */ { +class GetRegionResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.GetRegionResponse) */ { public: - inline Member() : Member(nullptr) {} - ~Member() override; - explicit PROTOBUF_CONSTEXPR Member(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline GetRegionResponse() : GetRegionResponse(nullptr) {} + ~GetRegionResponse() override; + template + explicit PROTOBUF_CONSTEXPR GetRegionResponse(::google::protobuf::internal::ConstantInitialized); - Member(const Member& from); - Member(Member&& from) noexcept - : Member() { + inline GetRegionResponse(const GetRegionResponse& from) + : GetRegionResponse(nullptr, from) {} + GetRegionResponse(GetRegionResponse&& from) noexcept + : GetRegionResponse() { *this = ::std::move(from); } - inline Member& operator=(const Member& from) { + inline GetRegionResponse& operator=(const GetRegionResponse& from) { CopyFrom(from); return *this; } - inline Member& operator=(Member&& from) noexcept { + inline GetRegionResponse& operator=(GetRegionResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1558,226 +1799,238 @@ class Member final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Member& default_instance() { + static const GetRegionResponse& default_instance() { return *internal_default_instance(); } - static inline const Member* internal_default_instance() { - return reinterpret_cast( - &_Member_default_instance_); + static inline const GetRegionResponse* internal_default_instance() { + return reinterpret_cast( + &_GetRegionResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 4; - friend void swap(Member& a, Member& b) { + friend void swap(GetRegionResponse& a, GetRegionResponse& b) { a.Swap(&b); } - inline void Swap(Member* other) { + inline void Swap(GetRegionResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Member* other) { + void UnsafeArenaSwap(GetRegionResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - Member* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetRegionResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Member& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const Member& from) { - Member::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const GetRegionResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const GetRegionResponse& from) { + GetRegionResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Member* other); + void InternalSwap(GetRegionResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "pdpb.Member"; + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "pdpb.GetRegionResponse"; } protected: - explicit Member(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GetRegionResponse(::google::protobuf::Arena* arena); + GetRegionResponse(::google::protobuf::Arena* arena, const GetRegionResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { - kPeerUrlsFieldNumber = 3, - kClientUrlsFieldNumber = 4, - kNameFieldNumber = 1, - kLeaderNameFieldNumber = 5, - kMemberIdFieldNumber = 2, - kLeaderIdFieldNumber = 6, + kDownPeersFieldNumber = 4, + kPendingPeersFieldNumber = 5, + kHeaderFieldNumber = 1, + kRegionFieldNumber = 2, + kLeaderFieldNumber = 3, }; - // repeated string peer_urls = 3; - int peer_urls_size() const; + // repeated .metapb.Peer down_peers = 4; + int down_peers_size() const; private: - int _internal_peer_urls_size() const; + int _internal_down_peers_size() const; + public: - void clear_peer_urls(); - const std::string& peer_urls(int index) const; - std::string* mutable_peer_urls(int index); - void set_peer_urls(int index, const std::string& value); - void set_peer_urls(int index, std::string&& value); - void set_peer_urls(int index, const char* value); - void set_peer_urls(int index, const char* value, size_t size); - std::string* add_peer_urls(); - void add_peer_urls(const std::string& value); - void add_peer_urls(std::string&& value); - void add_peer_urls(const char* value); - void add_peer_urls(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& peer_urls() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_peer_urls(); + void clear_down_peers() ; + ::metapb::Peer* mutable_down_peers(int index); + ::google::protobuf::RepeatedPtrField< ::metapb::Peer >* + mutable_down_peers(); private: - const std::string& _internal_peer_urls(int index) const; - std::string* _internal_add_peer_urls(); + const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& _internal_down_peers() const; + ::google::protobuf::RepeatedPtrField<::metapb::Peer>* _internal_mutable_down_peers(); public: - - // repeated string client_urls = 4; - int client_urls_size() const; + const ::metapb::Peer& down_peers(int index) const; + ::metapb::Peer* add_down_peers(); + const ::google::protobuf::RepeatedPtrField< ::metapb::Peer >& + down_peers() const; + // repeated .metapb.Peer pending_peers = 5; + int pending_peers_size() const; private: - int _internal_client_urls_size() const; + int _internal_pending_peers_size() const; + public: - void clear_client_urls(); - const std::string& client_urls(int index) const; - std::string* mutable_client_urls(int index); - void set_client_urls(int index, const std::string& value); - void set_client_urls(int index, std::string&& value); - void set_client_urls(int index, const char* value); - void set_client_urls(int index, const char* value, size_t size); - std::string* add_client_urls(); - void add_client_urls(const std::string& value); - void add_client_urls(std::string&& value); - void add_client_urls(const char* value); - void add_client_urls(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& client_urls() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_client_urls(); + void clear_pending_peers() ; + ::metapb::Peer* mutable_pending_peers(int index); + ::google::protobuf::RepeatedPtrField< ::metapb::Peer >* + mutable_pending_peers(); private: - const std::string& _internal_client_urls(int index) const; - std::string* _internal_add_client_urls(); + const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& _internal_pending_peers() const; + ::google::protobuf::RepeatedPtrField<::metapb::Peer>* _internal_mutable_pending_peers(); public: + const ::metapb::Peer& pending_peers(int index) const; + ::metapb::Peer* add_pending_peers(); + const ::google::protobuf::RepeatedPtrField< ::metapb::Peer >& + pending_peers() const; + // .pdpb.ResponseHeader header = 1; + bool has_header() const; + void clear_header() ; + const ::pdpb::ResponseHeader& header() const; + PROTOBUF_NODISCARD ::pdpb::ResponseHeader* release_header(); + ::pdpb::ResponseHeader* mutable_header(); + void set_allocated_header(::pdpb::ResponseHeader* value); + void unsafe_arena_set_allocated_header(::pdpb::ResponseHeader* value); + ::pdpb::ResponseHeader* unsafe_arena_release_header(); - // string name = 1; - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: + const ::pdpb::ResponseHeader& _internal_header() const; + ::pdpb::ResponseHeader* _internal_mutable_header(); - // string leader_name = 5; - void clear_leader_name(); - const std::string& leader_name() const; - template - void set_leader_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_leader_name(); - PROTOBUF_NODISCARD std::string* release_leader_name(); - void set_allocated_leader_name(std::string* leader_name); - private: - const std::string& _internal_leader_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_leader_name(const std::string& value); - std::string* _internal_mutable_leader_name(); public: + // .metapb.Region region = 2; + bool has_region() const; + void clear_region() ; + const ::metapb::Region& region() const; + PROTOBUF_NODISCARD ::metapb::Region* release_region(); + ::metapb::Region* mutable_region(); + void set_allocated_region(::metapb::Region* value); + void unsafe_arena_set_allocated_region(::metapb::Region* value); + ::metapb::Region* unsafe_arena_release_region(); - // uint64 member_id = 2; - void clear_member_id(); - uint64_t member_id() const; - void set_member_id(uint64_t value); private: - uint64_t _internal_member_id() const; - void _internal_set_member_id(uint64_t value); + const ::metapb::Region& _internal_region() const; + ::metapb::Region* _internal_mutable_region(); + public: + // .metapb.Peer leader = 3; + bool has_leader() const; + void clear_leader() ; + const ::metapb::Peer& leader() const; + PROTOBUF_NODISCARD ::metapb::Peer* release_leader(); + ::metapb::Peer* mutable_leader(); + void set_allocated_leader(::metapb::Peer* value); + void unsafe_arena_set_allocated_leader(::metapb::Peer* value); + ::metapb::Peer* unsafe_arena_release_leader(); - // uint64 leader_id = 6; - void clear_leader_id(); - uint64_t leader_id() const; - void set_leader_id(uint64_t value); private: - uint64_t _internal_leader_id() const; - void _internal_set_leader_id(uint64_t value); - public: + const ::metapb::Peer& _internal_leader() const; + ::metapb::Peer* _internal_mutable_leader(); - // @@protoc_insertion_point(class_scope:pdpb.Member) + public: + // @@protoc_insertion_point(class_scope:pdpb.GetRegionResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 5, 5, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField peer_urls_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField client_urls_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr leader_name_; - uint64_t member_id_; - uint64_t leader_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::metapb::Peer > down_peers_; + ::google::protobuf::RepeatedPtrField< ::metapb::Peer > pending_peers_; + ::pdpb::ResponseHeader* header_; + ::metapb::Region* region_; + ::metapb::Peer* leader_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; -}; -// ------------------------------------------------------------------- +};// ------------------------------------------------------------------- class GetMembersResponse final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pdpb.GetMembersResponse) */ { + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pdpb.GetMembersResponse) */ { public: inline GetMembersResponse() : GetMembersResponse(nullptr) {} ~GetMembersResponse() override; - explicit PROTOBUF_CONSTEXPR GetMembersResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + template + explicit PROTOBUF_CONSTEXPR GetMembersResponse(::google::protobuf::internal::ConstantInitialized); - GetMembersResponse(const GetMembersResponse& from); + inline GetMembersResponse(const GetMembersResponse& from) + : GetMembersResponse(nullptr, from) {} GetMembersResponse(GetMembersResponse&& from) noexcept : GetMembersResponse() { *this = ::std::move(from); @@ -1789,9 +2042,9 @@ class GetMembersResponse final : } inline GetMembersResponse& operator=(GetMembersResponse&& from) noexcept { if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() + if (GetArena() == from.GetArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr + && GetArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); @@ -1801,13 +2054,22 @@ class GetMembersResponse final : return *this; } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + static const ::google::protobuf::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const GetMembersResponse& default_instance() { @@ -1826,65 +2088,65 @@ class GetMembersResponse final : inline void Swap(GetMembersResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { + if (GetArena() != nullptr && + GetArena() == other->GetArena()) { #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { + if (GetArena() == other->GetArena()) { #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + ::google::protobuf::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(GetMembersResponse* other) { if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + ABSL_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - GetMembersResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + GetMembersResponse* New(::google::protobuf::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + using ::google::protobuf::Message::CopyFrom; void CopyFrom(const GetMembersResponse& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + using ::google::protobuf::Message::MergeFrom; void MergeFrom( const GetMembersResponse& from) { GetMembersResponse::MergeImpl(*this, from); } private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + ::google::protobuf::internal::CachedSize* AccessCachedSize() const final; + void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); - void SetCachedSize(int size) const final; void InternalSwap(GetMembersResponse* other); private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "pdpb.GetMembersResponse"; } protected: - explicit GetMembersResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); + explicit GetMembersResponse(::google::protobuf::Arena* arena); + GetMembersResponse(::google::protobuf::Arena* arena, const GetMembersResponse& from); public: static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + const ::google::protobuf::Message::ClassData*GetClassData() const final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1900,141 +2162,161 @@ class GetMembersResponse final : int members_size() const; private: int _internal_members_size() const; + public: - void clear_members(); + void clear_members() ; ::pdpb::Member* mutable_members(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pdpb::Member >* + ::google::protobuf::RepeatedPtrField< ::pdpb::Member >* mutable_members(); private: - const ::pdpb::Member& _internal_members(int index) const; - ::pdpb::Member* _internal_add_members(); + const ::google::protobuf::RepeatedPtrField<::pdpb::Member>& _internal_members() const; + ::google::protobuf::RepeatedPtrField<::pdpb::Member>* _internal_mutable_members(); public: const ::pdpb::Member& members(int index) const; ::pdpb::Member* add_members(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pdpb::Member >& + const ::google::protobuf::RepeatedPtrField< ::pdpb::Member >& members() const; - // .pdpb.ResponseHeader header = 1; bool has_header() const; - private: - bool _internal_has_header() const; - public: - void clear_header(); + void clear_header() ; const ::pdpb::ResponseHeader& header() const; PROTOBUF_NODISCARD ::pdpb::ResponseHeader* release_header(); ::pdpb::ResponseHeader* mutable_header(); - void set_allocated_header(::pdpb::ResponseHeader* header); + void set_allocated_header(::pdpb::ResponseHeader* value); + void unsafe_arena_set_allocated_header(::pdpb::ResponseHeader* value); + ::pdpb::ResponseHeader* unsafe_arena_release_header(); + private: const ::pdpb::ResponseHeader& _internal_header() const; ::pdpb::ResponseHeader* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::pdpb::ResponseHeader* header); - ::pdpb::ResponseHeader* unsafe_arena_release_header(); - // .pdpb.Member leader = 3; - bool has_leader() const; - private: - bool _internal_has_leader() const; public: - void clear_leader(); + // .pdpb.Member leader = 3; + bool has_leader() const; + void clear_leader() ; const ::pdpb::Member& leader() const; PROTOBUF_NODISCARD ::pdpb::Member* release_leader(); ::pdpb::Member* mutable_leader(); - void set_allocated_leader(::pdpb::Member* leader); + void set_allocated_leader(::pdpb::Member* value); + void unsafe_arena_set_allocated_leader(::pdpb::Member* value); + ::pdpb::Member* unsafe_arena_release_leader(); + private: const ::pdpb::Member& _internal_leader() const; ::pdpb::Member* _internal_mutable_leader(); - public: - void unsafe_arena_set_allocated_leader( - ::pdpb::Member* leader); - ::pdpb::Member* unsafe_arena_release_leader(); + public: // .pdpb.Member etcd_leader = 4; bool has_etcd_leader() const; - private: - bool _internal_has_etcd_leader() const; - public: - void clear_etcd_leader(); + void clear_etcd_leader() ; const ::pdpb::Member& etcd_leader() const; PROTOBUF_NODISCARD ::pdpb::Member* release_etcd_leader(); ::pdpb::Member* mutable_etcd_leader(); - void set_allocated_etcd_leader(::pdpb::Member* etcd_leader); + void set_allocated_etcd_leader(::pdpb::Member* value); + void unsafe_arena_set_allocated_etcd_leader(::pdpb::Member* value); + ::pdpb::Member* unsafe_arena_release_etcd_leader(); + private: const ::pdpb::Member& _internal_etcd_leader() const; ::pdpb::Member* _internal_mutable_etcd_leader(); - public: - void unsafe_arena_set_allocated_etcd_leader( - ::pdpb::Member* etcd_leader); - ::pdpb::Member* unsafe_arena_release_etcd_leader(); + public: // @@protoc_insertion_point(class_scope:pdpb.GetMembersResponse) private: class _Internal; - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 4, + 0, 2> + _table_; + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pdpb::Member > members_; + + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::pdpb::Member > members_; ::pdpb::ResponseHeader* header_; ::pdpb::Member* leader_; ::pdpb::Member* etcd_leader_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_pdpb_2eproto; }; + // =================================================================== + + // =================================================================== + #ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ +// ------------------------------------------------------------------- + // RequestHeader // uint64 cluster_id = 1; inline void RequestHeader::clear_cluster_id() { - _impl_.cluster_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cluster_id_ = ::uint64_t{0u}; } -inline uint64_t RequestHeader::_internal_cluster_id() const { - return _impl_.cluster_id_; -} -inline uint64_t RequestHeader::cluster_id() const { +inline ::uint64_t RequestHeader::cluster_id() const { // @@protoc_insertion_point(field_get:pdpb.RequestHeader.cluster_id) return _internal_cluster_id(); } -inline void RequestHeader::_internal_set_cluster_id(uint64_t value) { - - _impl_.cluster_id_ = value; -} -inline void RequestHeader::set_cluster_id(uint64_t value) { +inline void RequestHeader::set_cluster_id(::uint64_t value) { _internal_set_cluster_id(value); // @@protoc_insertion_point(field_set:pdpb.RequestHeader.cluster_id) } +inline ::uint64_t RequestHeader::_internal_cluster_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.cluster_id_; +} +inline void RequestHeader::_internal_set_cluster_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cluster_id_ = value; +} // uint64 sender_id = 2; inline void RequestHeader::clear_sender_id() { - _impl_.sender_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.sender_id_ = ::uint64_t{0u}; } -inline uint64_t RequestHeader::_internal_sender_id() const { - return _impl_.sender_id_; -} -inline uint64_t RequestHeader::sender_id() const { +inline ::uint64_t RequestHeader::sender_id() const { // @@protoc_insertion_point(field_get:pdpb.RequestHeader.sender_id) return _internal_sender_id(); } -inline void RequestHeader::_internal_set_sender_id(uint64_t value) { - - _impl_.sender_id_ = value; -} -inline void RequestHeader::set_sender_id(uint64_t value) { +inline void RequestHeader::set_sender_id(::uint64_t value) { _internal_set_sender_id(value); // @@protoc_insertion_point(field_set:pdpb.RequestHeader.sender_id) } +inline ::uint64_t RequestHeader::_internal_sender_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.sender_id_; +} +inline void RequestHeader::_internal_set_sender_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.sender_id_ = value; +} // ------------------------------------------------------------------- @@ -2042,111 +2324,120 @@ inline void RequestHeader::set_sender_id(uint64_t value) { // uint64 cluster_id = 1; inline void ResponseHeader::clear_cluster_id() { - _impl_.cluster_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.cluster_id_ = ::uint64_t{0u}; } -inline uint64_t ResponseHeader::_internal_cluster_id() const { - return _impl_.cluster_id_; -} -inline uint64_t ResponseHeader::cluster_id() const { +inline ::uint64_t ResponseHeader::cluster_id() const { // @@protoc_insertion_point(field_get:pdpb.ResponseHeader.cluster_id) return _internal_cluster_id(); } -inline void ResponseHeader::_internal_set_cluster_id(uint64_t value) { - - _impl_.cluster_id_ = value; -} -inline void ResponseHeader::set_cluster_id(uint64_t value) { +inline void ResponseHeader::set_cluster_id(::uint64_t value) { _internal_set_cluster_id(value); // @@protoc_insertion_point(field_set:pdpb.ResponseHeader.cluster_id) } +inline ::uint64_t ResponseHeader::_internal_cluster_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.cluster_id_; +} +inline void ResponseHeader::_internal_set_cluster_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.cluster_id_ = value; +} // .pdpb.Error error = 2; -inline bool ResponseHeader::_internal_has_error() const { - return this != internal_default_instance() && _impl_.error_ != nullptr; -} inline bool ResponseHeader::has_error() const { - return _internal_has_error(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.error_ != nullptr); + return value; } inline void ResponseHeader::clear_error() { - if (GetArenaForAllocation() == nullptr && _impl_.error_ != nullptr) { - delete _impl_.error_; - } - _impl_.error_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.error_ != nullptr) _impl_.error_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::pdpb::Error& ResponseHeader::_internal_error() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::Error* p = _impl_.error_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_Error_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_Error_default_instance_); } -inline const ::pdpb::Error& ResponseHeader::error() const { +inline const ::pdpb::Error& ResponseHeader::error() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.ResponseHeader.error) return _internal_error(); } -inline void ResponseHeader::unsafe_arena_set_allocated_error( - ::pdpb::Error* error) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.error_); +inline void ResponseHeader::unsafe_arena_set_allocated_error(::pdpb::Error* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.error_); } - _impl_.error_ = error; - if (error) { - + _impl_.error_ = reinterpret_cast<::pdpb::Error*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.ResponseHeader.error) } inline ::pdpb::Error* ResponseHeader::release_error() { - - ::pdpb::Error* temp = _impl_.error_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::pdpb::Error* released = _impl_.error_; _impl_.error_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::Error* ResponseHeader::unsafe_arena_release_error() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.ResponseHeader.error) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::pdpb::Error* temp = _impl_.error_; _impl_.error_ = nullptr; return temp; } inline ::pdpb::Error* ResponseHeader::_internal_mutable_error() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.error_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::Error>(GetArenaForAllocation()); - _impl_.error_ = p; + auto* p = CreateMaybeMessage<::pdpb::Error>(GetArena()); + _impl_.error_ = reinterpret_cast<::pdpb::Error*>(p); } return _impl_.error_; } -inline ::pdpb::Error* ResponseHeader::mutable_error() { +inline ::pdpb::Error* ResponseHeader::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::Error* _msg = _internal_mutable_error(); // @@protoc_insertion_point(field_mutable:pdpb.ResponseHeader.error) return _msg; } -inline void ResponseHeader::set_allocated_error(::pdpb::Error* error) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void ResponseHeader::set_allocated_error(::pdpb::Error* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.error_; + delete reinterpret_cast<::pdpb::Error*>(_impl_.error_); } - if (error) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::Error*>(value)->GetArena(); if (message_arena != submessage_arena) { - error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, error, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.error_ = error; + + _impl_.error_ = reinterpret_cast<::pdpb::Error*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.ResponseHeader.error) } @@ -2156,71 +2447,77 @@ inline void ResponseHeader::set_allocated_error(::pdpb::Error* error) { // .pdpb.ErrorType type = 1; inline void Error::clear_type() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.type_ = 0; } -inline ::pdpb::ErrorType Error::_internal_type() const { - return static_cast< ::pdpb::ErrorType >(_impl_.type_); -} inline ::pdpb::ErrorType Error::type() const { // @@protoc_insertion_point(field_get:pdpb.Error.type) return _internal_type(); } -inline void Error::_internal_set_type(::pdpb::ErrorType value) { - - _impl_.type_ = value; -} inline void Error::set_type(::pdpb::ErrorType value) { _internal_set_type(value); // @@protoc_insertion_point(field_set:pdpb.Error.type) } +inline ::pdpb::ErrorType Error::_internal_type() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return static_cast<::pdpb::ErrorType>(_impl_.type_); +} +inline void Error::_internal_set_type(::pdpb::ErrorType value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.type_ = value; +} // string message = 2; inline void Error::clear_message() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.message_.ClearToEmpty(); } -inline const std::string& Error::message() const { +inline const std::string& Error::message() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.Error.message) return _internal_message(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Error::set_message(ArgT0&& arg0, ArgT... args) { - - _impl_.message_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Error::set_message(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.message_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:pdpb.Error.message) } -inline std::string* Error::mutable_message() { +inline std::string* Error::mutable_message() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_message(); // @@protoc_insertion_point(field_mutable:pdpb.Error.message) return _s; } inline const std::string& Error::_internal_message() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.message_.Get(); } inline void Error::_internal_set_message(const std::string& value) { - - _impl_.message_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.message_.Set(value, GetArena()); } inline std::string* Error::_internal_mutable_message() { - - return _impl_.message_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.message_.Mutable( GetArena()); } inline std::string* Error::release_message() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.Error.message) return _impl_.message_.Release(); } -inline void Error::set_allocated_message(std::string* message) { - if (message != nullptr) { - - } else { - - } - _impl_.message_.SetAllocated(message, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.message_.IsDefault()) { - _impl_.message_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Error::set_allocated_message(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.message_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.message_.IsDefault()) { + _impl_.message_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:pdpb.Error.message) } @@ -2229,142 +2526,151 @@ inline void Error::set_allocated_message(std::string* message) { // GetRegionRequest // .pdpb.RequestHeader header = 1; -inline bool GetRegionRequest::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} inline bool GetRegionRequest::has_header() const { - return _internal_has_header(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr); + return value; } inline void GetRegionRequest::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.header_ != nullptr) _impl_.header_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::pdpb::RequestHeader& GetRegionRequest::_internal_header() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::RequestHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_RequestHeader_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_RequestHeader_default_instance_); } -inline const ::pdpb::RequestHeader& GetRegionRequest::header() const { +inline const ::pdpb::RequestHeader& GetRegionRequest::header() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetRegionRequest.header) return _internal_header(); } -inline void GetRegionRequest::unsafe_arena_set_allocated_header( - ::pdpb::RequestHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); +inline void GetRegionRequest::unsafe_arena_set_allocated_header(::pdpb::RequestHeader* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.header_); } - _impl_.header_ = header; - if (header) { - + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetRegionRequest.header) } inline ::pdpb::RequestHeader* GetRegionRequest::release_header() { - - ::pdpb::RequestHeader* temp = _impl_.header_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::pdpb::RequestHeader* released = _impl_.header_; _impl_.header_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::RequestHeader* GetRegionRequest::unsafe_arena_release_header() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetRegionRequest.header) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::pdpb::RequestHeader* temp = _impl_.header_; _impl_.header_ = nullptr; return temp; } inline ::pdpb::RequestHeader* GetRegionRequest::_internal_mutable_header() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::RequestHeader>(GetArenaForAllocation()); - _impl_.header_ = p; + auto* p = CreateMaybeMessage<::pdpb::RequestHeader>(GetArena()); + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(p); } return _impl_.header_; } -inline ::pdpb::RequestHeader* GetRegionRequest::mutable_header() { +inline ::pdpb::RequestHeader* GetRegionRequest::mutable_header() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::RequestHeader* _msg = _internal_mutable_header(); // @@protoc_insertion_point(field_mutable:pdpb.GetRegionRequest.header) return _msg; } -inline void GetRegionRequest::set_allocated_header(::pdpb::RequestHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetRegionRequest::set_allocated_header(::pdpb::RequestHeader* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.header_; + delete reinterpret_cast<::pdpb::RequestHeader*>(_impl_.header_); } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::RequestHeader*>(value)->GetArena(); if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.header_ = header; + + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetRegionRequest.header) } // bytes region_key = 2; inline void GetRegionRequest::clear_region_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.region_key_.ClearToEmpty(); } -inline const std::string& GetRegionRequest::region_key() const { +inline const std::string& GetRegionRequest::region_key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetRegionRequest.region_key) return _internal_region_key(); } -template -inline PROTOBUF_ALWAYS_INLINE -void GetRegionRequest::set_region_key(ArgT0&& arg0, ArgT... args) { - - _impl_.region_key_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void GetRegionRequest::set_region_key(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.region_key_.SetBytes(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:pdpb.GetRegionRequest.region_key) } -inline std::string* GetRegionRequest::mutable_region_key() { +inline std::string* GetRegionRequest::mutable_region_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_region_key(); // @@protoc_insertion_point(field_mutable:pdpb.GetRegionRequest.region_key) return _s; } inline const std::string& GetRegionRequest::_internal_region_key() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.region_key_.Get(); } inline void GetRegionRequest::_internal_set_region_key(const std::string& value) { - - _impl_.region_key_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.region_key_.Set(value, GetArena()); } inline std::string* GetRegionRequest::_internal_mutable_region_key() { - - return _impl_.region_key_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.region_key_.Mutable( GetArena()); } inline std::string* GetRegionRequest::release_region_key() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetRegionRequest.region_key) return _impl_.region_key_.Release(); } -inline void GetRegionRequest::set_allocated_region_key(std::string* region_key) { - if (region_key != nullptr) { - - } else { - - } - _impl_.region_key_.SetAllocated(region_key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.region_key_.IsDefault()) { - _impl_.region_key_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void GetRegionRequest::set_allocated_region_key(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.region_key_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.region_key_.IsDefault()) { + _impl_.region_key_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:pdpb.GetRegionRequest.region_key) } @@ -2373,629 +2679,684 @@ inline void GetRegionRequest::set_allocated_region_key(std::string* region_key) // GetRegionResponse // .pdpb.ResponseHeader header = 1; -inline bool GetRegionResponse::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} inline bool GetRegionResponse::has_header() const { - return _internal_has_header(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr); + return value; } inline void GetRegionResponse::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.header_ != nullptr) _impl_.header_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::pdpb::ResponseHeader& GetRegionResponse::_internal_header() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::ResponseHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_ResponseHeader_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_ResponseHeader_default_instance_); } -inline const ::pdpb::ResponseHeader& GetRegionResponse::header() const { +inline const ::pdpb::ResponseHeader& GetRegionResponse::header() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetRegionResponse.header) return _internal_header(); } -inline void GetRegionResponse::unsafe_arena_set_allocated_header( - ::pdpb::ResponseHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); +inline void GetRegionResponse::unsafe_arena_set_allocated_header(::pdpb::ResponseHeader* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.header_); } - _impl_.header_ = header; - if (header) { - + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetRegionResponse.header) } inline ::pdpb::ResponseHeader* GetRegionResponse::release_header() { - - ::pdpb::ResponseHeader* temp = _impl_.header_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::pdpb::ResponseHeader* released = _impl_.header_; _impl_.header_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::ResponseHeader* GetRegionResponse::unsafe_arena_release_header() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetRegionResponse.header) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::pdpb::ResponseHeader* temp = _impl_.header_; _impl_.header_ = nullptr; return temp; } inline ::pdpb::ResponseHeader* GetRegionResponse::_internal_mutable_header() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::ResponseHeader>(GetArenaForAllocation()); - _impl_.header_ = p; + auto* p = CreateMaybeMessage<::pdpb::ResponseHeader>(GetArena()); + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(p); } return _impl_.header_; } -inline ::pdpb::ResponseHeader* GetRegionResponse::mutable_header() { +inline ::pdpb::ResponseHeader* GetRegionResponse::mutable_header() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::ResponseHeader* _msg = _internal_mutable_header(); // @@protoc_insertion_point(field_mutable:pdpb.GetRegionResponse.header) return _msg; } -inline void GetRegionResponse::set_allocated_header(::pdpb::ResponseHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetRegionResponse::set_allocated_header(::pdpb::ResponseHeader* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.header_; + delete reinterpret_cast<::pdpb::ResponseHeader*>(_impl_.header_); } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::ResponseHeader*>(value)->GetArena(); if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.header_ = header; + + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetRegionResponse.header) } // .metapb.Region region = 2; -inline bool GetRegionResponse::_internal_has_region() const { - return this != internal_default_instance() && _impl_.region_ != nullptr; -} inline bool GetRegionResponse::has_region() const { - return _internal_has_region(); + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.region_ != nullptr); + return value; } inline const ::metapb::Region& GetRegionResponse::_internal_region() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::metapb::Region* p = _impl_.region_; - return p != nullptr ? *p : reinterpret_cast( - ::metapb::_Region_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::metapb::_Region_default_instance_); } -inline const ::metapb::Region& GetRegionResponse::region() const { +inline const ::metapb::Region& GetRegionResponse::region() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetRegionResponse.region) return _internal_region(); } -inline void GetRegionResponse::unsafe_arena_set_allocated_region( - ::metapb::Region* region) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_); +inline void GetRegionResponse::unsafe_arena_set_allocated_region(::metapb::Region* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_); } - _impl_.region_ = region; - if (region) { - + _impl_.region_ = reinterpret_cast<::metapb::Region*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetRegionResponse.region) } inline ::metapb::Region* GetRegionResponse::release_region() { - - ::metapb::Region* temp = _impl_.region_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::metapb::Region* released = _impl_.region_; _impl_.region_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::metapb::Region* GetRegionResponse::unsafe_arena_release_region() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetRegionResponse.region) - + + _impl_._has_bits_[0] &= ~0x00000002u; ::metapb::Region* temp = _impl_.region_; _impl_.region_ = nullptr; return temp; } inline ::metapb::Region* GetRegionResponse::_internal_mutable_region() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000002u; if (_impl_.region_ == nullptr) { - auto* p = CreateMaybeMessage<::metapb::Region>(GetArenaForAllocation()); - _impl_.region_ = p; + auto* p = CreateMaybeMessage<::metapb::Region>(GetArena()); + _impl_.region_ = reinterpret_cast<::metapb::Region*>(p); } return _impl_.region_; } -inline ::metapb::Region* GetRegionResponse::mutable_region() { +inline ::metapb::Region* GetRegionResponse::mutable_region() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::metapb::Region* _msg = _internal_mutable_region(); // @@protoc_insertion_point(field_mutable:pdpb.GetRegionResponse.region) return _msg; } -inline void GetRegionResponse::set_allocated_region(::metapb::Region* region) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetRegionResponse::set_allocated_region(::metapb::Region* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.region_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.region_); } - if (region) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(region)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - region = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, region, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } - _impl_.region_ = region; + + _impl_.region_ = reinterpret_cast<::metapb::Region*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetRegionResponse.region) } // .metapb.Peer leader = 3; -inline bool GetRegionResponse::_internal_has_leader() const { - return this != internal_default_instance() && _impl_.leader_ != nullptr; -} inline bool GetRegionResponse::has_leader() const { - return _internal_has_leader(); + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.leader_ != nullptr); + return value; } inline const ::metapb::Peer& GetRegionResponse::_internal_leader() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::metapb::Peer* p = _impl_.leader_; - return p != nullptr ? *p : reinterpret_cast( - ::metapb::_Peer_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::metapb::_Peer_default_instance_); } -inline const ::metapb::Peer& GetRegionResponse::leader() const { +inline const ::metapb::Peer& GetRegionResponse::leader() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetRegionResponse.leader) return _internal_leader(); } -inline void GetRegionResponse::unsafe_arena_set_allocated_leader( - ::metapb::Peer* leader) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.leader_); +inline void GetRegionResponse::unsafe_arena_set_allocated_leader(::metapb::Peer* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.leader_); } - _impl_.leader_ = leader; - if (leader) { - + _impl_.leader_ = reinterpret_cast<::metapb::Peer*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; } else { - + _impl_._has_bits_[0] &= ~0x00000004u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetRegionResponse.leader) } inline ::metapb::Peer* GetRegionResponse::release_leader() { - - ::metapb::Peer* temp = _impl_.leader_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000004u; + ::metapb::Peer* released = _impl_.leader_; _impl_.leader_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::metapb::Peer* GetRegionResponse::unsafe_arena_release_leader() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetRegionResponse.leader) - + + _impl_._has_bits_[0] &= ~0x00000004u; ::metapb::Peer* temp = _impl_.leader_; _impl_.leader_ = nullptr; return temp; } inline ::metapb::Peer* GetRegionResponse::_internal_mutable_leader() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000004u; if (_impl_.leader_ == nullptr) { - auto* p = CreateMaybeMessage<::metapb::Peer>(GetArenaForAllocation()); - _impl_.leader_ = p; + auto* p = CreateMaybeMessage<::metapb::Peer>(GetArena()); + _impl_.leader_ = reinterpret_cast<::metapb::Peer*>(p); } return _impl_.leader_; } -inline ::metapb::Peer* GetRegionResponse::mutable_leader() { +inline ::metapb::Peer* GetRegionResponse::mutable_leader() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::metapb::Peer* _msg = _internal_mutable_leader(); // @@protoc_insertion_point(field_mutable:pdpb.GetRegionResponse.leader) return _msg; } -inline void GetRegionResponse::set_allocated_leader(::metapb::Peer* leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetRegionResponse::set_allocated_leader(::metapb::Peer* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.leader_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.leader_); } - if (leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(leader)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - leader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, leader, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000004u; } else { - + _impl_._has_bits_[0] &= ~0x00000004u; } - _impl_.leader_ = leader; + + _impl_.leader_ = reinterpret_cast<::metapb::Peer*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetRegionResponse.leader) } // repeated .metapb.Peer down_peers = 4; inline int GetRegionResponse::_internal_down_peers_size() const { - return _impl_.down_peers_.size(); + return _internal_down_peers().size(); } inline int GetRegionResponse::down_peers_size() const { return _internal_down_peers_size(); } -inline ::metapb::Peer* GetRegionResponse::mutable_down_peers(int index) { +inline ::metapb::Peer* GetRegionResponse::mutable_down_peers(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:pdpb.GetRegionResponse.down_peers) - return _impl_.down_peers_.Mutable(index); + return _internal_mutable_down_peers()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >* -GetRegionResponse::mutable_down_peers() { +inline ::google::protobuf::RepeatedPtrField<::metapb::Peer>* GetRegionResponse::mutable_down_peers() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:pdpb.GetRegionResponse.down_peers) - return &_impl_.down_peers_; -} -inline const ::metapb::Peer& GetRegionResponse::_internal_down_peers(int index) const { - return _impl_.down_peers_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_down_peers(); } -inline const ::metapb::Peer& GetRegionResponse::down_peers(int index) const { +inline const ::metapb::Peer& GetRegionResponse::down_peers(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetRegionResponse.down_peers) - return _internal_down_peers(index); + return _internal_down_peers().Get(index); } -inline ::metapb::Peer* GetRegionResponse::_internal_add_down_peers() { - return _impl_.down_peers_.Add(); -} -inline ::metapb::Peer* GetRegionResponse::add_down_peers() { - ::metapb::Peer* _add = _internal_add_down_peers(); +inline ::metapb::Peer* GetRegionResponse::add_down_peers() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::metapb::Peer* _add = _internal_mutable_down_peers()->Add(); // @@protoc_insertion_point(field_add:pdpb.GetRegionResponse.down_peers) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >& -GetRegionResponse::down_peers() const { +inline const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& GetRegionResponse::down_peers() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:pdpb.GetRegionResponse.down_peers) + return _internal_down_peers(); +} +inline const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& +GetRegionResponse::_internal_down_peers() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.down_peers_; } +inline ::google::protobuf::RepeatedPtrField<::metapb::Peer>* +GetRegionResponse::_internal_mutable_down_peers() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.down_peers_; +} // repeated .metapb.Peer pending_peers = 5; inline int GetRegionResponse::_internal_pending_peers_size() const { - return _impl_.pending_peers_.size(); + return _internal_pending_peers().size(); } inline int GetRegionResponse::pending_peers_size() const { return _internal_pending_peers_size(); } -inline ::metapb::Peer* GetRegionResponse::mutable_pending_peers(int index) { +inline ::metapb::Peer* GetRegionResponse::mutable_pending_peers(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:pdpb.GetRegionResponse.pending_peers) - return _impl_.pending_peers_.Mutable(index); + return _internal_mutable_pending_peers()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >* -GetRegionResponse::mutable_pending_peers() { +inline ::google::protobuf::RepeatedPtrField<::metapb::Peer>* GetRegionResponse::mutable_pending_peers() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:pdpb.GetRegionResponse.pending_peers) - return &_impl_.pending_peers_; -} -inline const ::metapb::Peer& GetRegionResponse::_internal_pending_peers(int index) const { - return _impl_.pending_peers_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_pending_peers(); } -inline const ::metapb::Peer& GetRegionResponse::pending_peers(int index) const { +inline const ::metapb::Peer& GetRegionResponse::pending_peers(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetRegionResponse.pending_peers) - return _internal_pending_peers(index); + return _internal_pending_peers().Get(index); } -inline ::metapb::Peer* GetRegionResponse::_internal_add_pending_peers() { - return _impl_.pending_peers_.Add(); -} -inline ::metapb::Peer* GetRegionResponse::add_pending_peers() { - ::metapb::Peer* _add = _internal_add_pending_peers(); +inline ::metapb::Peer* GetRegionResponse::add_pending_peers() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::metapb::Peer* _add = _internal_mutable_pending_peers()->Add(); // @@protoc_insertion_point(field_add:pdpb.GetRegionResponse.pending_peers) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::metapb::Peer >& -GetRegionResponse::pending_peers() const { +inline const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& GetRegionResponse::pending_peers() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:pdpb.GetRegionResponse.pending_peers) + return _internal_pending_peers(); +} +inline const ::google::protobuf::RepeatedPtrField<::metapb::Peer>& +GetRegionResponse::_internal_pending_peers() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.pending_peers_; } +inline ::google::protobuf::RepeatedPtrField<::metapb::Peer>* +GetRegionResponse::_internal_mutable_pending_peers() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.pending_peers_; +} // ------------------------------------------------------------------- // GetStoreRequest // .pdpb.RequestHeader header = 1; -inline bool GetStoreRequest::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} inline bool GetStoreRequest::has_header() const { - return _internal_has_header(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr); + return value; } inline void GetStoreRequest::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.header_ != nullptr) _impl_.header_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::pdpb::RequestHeader& GetStoreRequest::_internal_header() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::RequestHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_RequestHeader_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_RequestHeader_default_instance_); } -inline const ::pdpb::RequestHeader& GetStoreRequest::header() const { +inline const ::pdpb::RequestHeader& GetStoreRequest::header() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetStoreRequest.header) return _internal_header(); } -inline void GetStoreRequest::unsafe_arena_set_allocated_header( - ::pdpb::RequestHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); +inline void GetStoreRequest::unsafe_arena_set_allocated_header(::pdpb::RequestHeader* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.header_); } - _impl_.header_ = header; - if (header) { - + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetStoreRequest.header) } inline ::pdpb::RequestHeader* GetStoreRequest::release_header() { - - ::pdpb::RequestHeader* temp = _impl_.header_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::pdpb::RequestHeader* released = _impl_.header_; _impl_.header_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::RequestHeader* GetStoreRequest::unsafe_arena_release_header() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetStoreRequest.header) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::pdpb::RequestHeader* temp = _impl_.header_; _impl_.header_ = nullptr; return temp; } inline ::pdpb::RequestHeader* GetStoreRequest::_internal_mutable_header() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::RequestHeader>(GetArenaForAllocation()); - _impl_.header_ = p; + auto* p = CreateMaybeMessage<::pdpb::RequestHeader>(GetArena()); + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(p); } return _impl_.header_; } -inline ::pdpb::RequestHeader* GetStoreRequest::mutable_header() { +inline ::pdpb::RequestHeader* GetStoreRequest::mutable_header() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::RequestHeader* _msg = _internal_mutable_header(); // @@protoc_insertion_point(field_mutable:pdpb.GetStoreRequest.header) return _msg; } -inline void GetStoreRequest::set_allocated_header(::pdpb::RequestHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetStoreRequest::set_allocated_header(::pdpb::RequestHeader* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.header_; + delete reinterpret_cast<::pdpb::RequestHeader*>(_impl_.header_); } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::RequestHeader*>(value)->GetArena(); if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.header_ = header; + + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetStoreRequest.header) } // uint64 store_id = 2; inline void GetStoreRequest::clear_store_id() { - _impl_.store_id_ = uint64_t{0u}; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.store_id_ = ::uint64_t{0u}; } -inline uint64_t GetStoreRequest::_internal_store_id() const { - return _impl_.store_id_; -} -inline uint64_t GetStoreRequest::store_id() const { +inline ::uint64_t GetStoreRequest::store_id() const { // @@protoc_insertion_point(field_get:pdpb.GetStoreRequest.store_id) return _internal_store_id(); } -inline void GetStoreRequest::_internal_set_store_id(uint64_t value) { - - _impl_.store_id_ = value; -} -inline void GetStoreRequest::set_store_id(uint64_t value) { +inline void GetStoreRequest::set_store_id(::uint64_t value) { _internal_set_store_id(value); // @@protoc_insertion_point(field_set:pdpb.GetStoreRequest.store_id) } +inline ::uint64_t GetStoreRequest::_internal_store_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.store_id_; +} +inline void GetStoreRequest::_internal_set_store_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.store_id_ = value; +} // ------------------------------------------------------------------- // GetStoreResponse // .pdpb.ResponseHeader header = 1; -inline bool GetStoreResponse::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} inline bool GetStoreResponse::has_header() const { - return _internal_has_header(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr); + return value; } inline void GetStoreResponse::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.header_ != nullptr) _impl_.header_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::pdpb::ResponseHeader& GetStoreResponse::_internal_header() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::ResponseHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_ResponseHeader_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_ResponseHeader_default_instance_); } -inline const ::pdpb::ResponseHeader& GetStoreResponse::header() const { +inline const ::pdpb::ResponseHeader& GetStoreResponse::header() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetStoreResponse.header) return _internal_header(); } -inline void GetStoreResponse::unsafe_arena_set_allocated_header( - ::pdpb::ResponseHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); +inline void GetStoreResponse::unsafe_arena_set_allocated_header(::pdpb::ResponseHeader* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.header_); } - _impl_.header_ = header; - if (header) { - + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetStoreResponse.header) } inline ::pdpb::ResponseHeader* GetStoreResponse::release_header() { - - ::pdpb::ResponseHeader* temp = _impl_.header_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::pdpb::ResponseHeader* released = _impl_.header_; _impl_.header_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::ResponseHeader* GetStoreResponse::unsafe_arena_release_header() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetStoreResponse.header) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::pdpb::ResponseHeader* temp = _impl_.header_; _impl_.header_ = nullptr; return temp; } inline ::pdpb::ResponseHeader* GetStoreResponse::_internal_mutable_header() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::ResponseHeader>(GetArenaForAllocation()); - _impl_.header_ = p; + auto* p = CreateMaybeMessage<::pdpb::ResponseHeader>(GetArena()); + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(p); } return _impl_.header_; } -inline ::pdpb::ResponseHeader* GetStoreResponse::mutable_header() { +inline ::pdpb::ResponseHeader* GetStoreResponse::mutable_header() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::ResponseHeader* _msg = _internal_mutable_header(); // @@protoc_insertion_point(field_mutable:pdpb.GetStoreResponse.header) return _msg; } -inline void GetStoreResponse::set_allocated_header(::pdpb::ResponseHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetStoreResponse::set_allocated_header(::pdpb::ResponseHeader* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.header_; + delete reinterpret_cast<::pdpb::ResponseHeader*>(_impl_.header_); } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::ResponseHeader*>(value)->GetArena(); if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.header_ = header; + + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetStoreResponse.header) } // .metapb.Store store = 2; -inline bool GetStoreResponse::_internal_has_store() const { - return this != internal_default_instance() && _impl_.store_ != nullptr; -} inline bool GetStoreResponse::has_store() const { - return _internal_has_store(); + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.store_ != nullptr); + return value; } inline const ::metapb::Store& GetStoreResponse::_internal_store() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::metapb::Store* p = _impl_.store_; - return p != nullptr ? *p : reinterpret_cast( - ::metapb::_Store_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::metapb::_Store_default_instance_); } -inline const ::metapb::Store& GetStoreResponse::store() const { +inline const ::metapb::Store& GetStoreResponse::store() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetStoreResponse.store) return _internal_store(); } -inline void GetStoreResponse::unsafe_arena_set_allocated_store( - ::metapb::Store* store) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.store_); +inline void GetStoreResponse::unsafe_arena_set_allocated_store(::metapb::Store* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.store_); } - _impl_.store_ = store; - if (store) { - + _impl_.store_ = reinterpret_cast<::metapb::Store*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetStoreResponse.store) } inline ::metapb::Store* GetStoreResponse::release_store() { - - ::metapb::Store* temp = _impl_.store_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::metapb::Store* released = _impl_.store_; _impl_.store_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::metapb::Store* GetStoreResponse::unsafe_arena_release_store() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetStoreResponse.store) - + + _impl_._has_bits_[0] &= ~0x00000002u; ::metapb::Store* temp = _impl_.store_; _impl_.store_ = nullptr; return temp; } inline ::metapb::Store* GetStoreResponse::_internal_mutable_store() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000002u; if (_impl_.store_ == nullptr) { - auto* p = CreateMaybeMessage<::metapb::Store>(GetArenaForAllocation()); - _impl_.store_ = p; + auto* p = CreateMaybeMessage<::metapb::Store>(GetArena()); + _impl_.store_ = reinterpret_cast<::metapb::Store*>(p); } return _impl_.store_; } -inline ::metapb::Store* GetStoreResponse::mutable_store() { +inline ::metapb::Store* GetStoreResponse::mutable_store() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::metapb::Store* _msg = _internal_mutable_store(); // @@protoc_insertion_point(field_mutable:pdpb.GetStoreResponse.store) return _msg; } -inline void GetStoreResponse::set_allocated_store(::metapb::Store* store) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetStoreResponse::set_allocated_store(::metapb::Store* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.store_); + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.store_); } - if (store) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(store)); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); if (message_arena != submessage_arena) { - store = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, store, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } - _impl_.store_ = store; + + _impl_.store_ = reinterpret_cast<::metapb::Store*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetStoreResponse.store) } @@ -3004,92 +3365,98 @@ inline void GetStoreResponse::set_allocated_store(::metapb::Store* store) { // GetMembersRequest // .pdpb.RequestHeader header = 1; -inline bool GetMembersRequest::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} inline bool GetMembersRequest::has_header() const { - return _internal_has_header(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr); + return value; } inline void GetMembersRequest::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.header_ != nullptr) _impl_.header_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::pdpb::RequestHeader& GetMembersRequest::_internal_header() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::RequestHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_RequestHeader_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_RequestHeader_default_instance_); } -inline const ::pdpb::RequestHeader& GetMembersRequest::header() const { +inline const ::pdpb::RequestHeader& GetMembersRequest::header() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetMembersRequest.header) return _internal_header(); } -inline void GetMembersRequest::unsafe_arena_set_allocated_header( - ::pdpb::RequestHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); +inline void GetMembersRequest::unsafe_arena_set_allocated_header(::pdpb::RequestHeader* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.header_); } - _impl_.header_ = header; - if (header) { - + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetMembersRequest.header) } inline ::pdpb::RequestHeader* GetMembersRequest::release_header() { - - ::pdpb::RequestHeader* temp = _impl_.header_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::pdpb::RequestHeader* released = _impl_.header_; _impl_.header_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::RequestHeader* GetMembersRequest::unsafe_arena_release_header() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetMembersRequest.header) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::pdpb::RequestHeader* temp = _impl_.header_; _impl_.header_ = nullptr; return temp; } inline ::pdpb::RequestHeader* GetMembersRequest::_internal_mutable_header() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::RequestHeader>(GetArenaForAllocation()); - _impl_.header_ = p; + auto* p = CreateMaybeMessage<::pdpb::RequestHeader>(GetArena()); + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(p); } return _impl_.header_; } -inline ::pdpb::RequestHeader* GetMembersRequest::mutable_header() { +inline ::pdpb::RequestHeader* GetMembersRequest::mutable_header() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::RequestHeader* _msg = _internal_mutable_header(); // @@protoc_insertion_point(field_mutable:pdpb.GetMembersRequest.header) return _msg; } -inline void GetMembersRequest::set_allocated_header(::pdpb::RequestHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetMembersRequest::set_allocated_header(::pdpb::RequestHeader* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.header_; + delete reinterpret_cast<::pdpb::RequestHeader*>(_impl_.header_); } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::RequestHeader*>(value)->GetArena(); if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.header_ = header; + + _impl_.header_ = reinterpret_cast<::pdpb::RequestHeader*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetMembersRequest.header) } @@ -3099,645 +3466,722 @@ inline void GetMembersRequest::set_allocated_header(::pdpb::RequestHeader* heade // string name = 1; inline void Member::clear_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.name_.ClearToEmpty(); } -inline const std::string& Member::name() const { +inline const std::string& Member::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.Member.name) return _internal_name(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Member::set_name(ArgT0&& arg0, ArgT... args) { - - _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Member::set_name(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:pdpb.Member.name) } -inline std::string* Member::mutable_name() { +inline std::string* Member::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_name(); // @@protoc_insertion_point(field_mutable:pdpb.Member.name) return _s; } inline const std::string& Member::_internal_name() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.name_.Get(); } inline void Member::_internal_set_name(const std::string& value) { - - _impl_.name_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.name_.Set(value, GetArena()); } inline std::string* Member::_internal_mutable_name() { - - return _impl_.name_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.name_.Mutable( GetArena()); } inline std::string* Member::release_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.Member.name) return _impl_.name_.Release(); } -inline void Member::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Member::set_allocated_name(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:pdpb.Member.name) } // uint64 member_id = 2; inline void Member::clear_member_id() { - _impl_.member_id_ = uint64_t{0u}; -} -inline uint64_t Member::_internal_member_id() const { - return _impl_.member_id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.member_id_ = ::uint64_t{0u}; } -inline uint64_t Member::member_id() const { +inline ::uint64_t Member::member_id() const { // @@protoc_insertion_point(field_get:pdpb.Member.member_id) return _internal_member_id(); } -inline void Member::_internal_set_member_id(uint64_t value) { - - _impl_.member_id_ = value; -} -inline void Member::set_member_id(uint64_t value) { +inline void Member::set_member_id(::uint64_t value) { _internal_set_member_id(value); // @@protoc_insertion_point(field_set:pdpb.Member.member_id) } +inline ::uint64_t Member::_internal_member_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.member_id_; +} +inline void Member::_internal_set_member_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.member_id_ = value; +} // repeated string peer_urls = 3; inline int Member::_internal_peer_urls_size() const { - return _impl_.peer_urls_.size(); + return _internal_peer_urls().size(); } inline int Member::peer_urls_size() const { return _internal_peer_urls_size(); } inline void Member::clear_peer_urls() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.peer_urls_.Clear(); } -inline std::string* Member::add_peer_urls() { - std::string* _s = _internal_add_peer_urls(); +inline std::string* Member::add_peer_urls() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_peer_urls()->Add(); // @@protoc_insertion_point(field_add_mutable:pdpb.Member.peer_urls) return _s; } -inline const std::string& Member::_internal_peer_urls(int index) const { - return _impl_.peer_urls_.Get(index); -} -inline const std::string& Member::peer_urls(int index) const { +inline const std::string& Member::peer_urls(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.Member.peer_urls) - return _internal_peer_urls(index); + return _internal_peer_urls().Get(index); } -inline std::string* Member::mutable_peer_urls(int index) { +inline std::string* Member::mutable_peer_urls(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:pdpb.Member.peer_urls) - return _impl_.peer_urls_.Mutable(index); + return _internal_mutable_peer_urls()->Mutable(index); } inline void Member::set_peer_urls(int index, const std::string& value) { - _impl_.peer_urls_.Mutable(index)->assign(value); + _internal_mutable_peer_urls()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:pdpb.Member.peer_urls) } inline void Member::set_peer_urls(int index, std::string&& value) { - _impl_.peer_urls_.Mutable(index)->assign(std::move(value)); + _internal_mutable_peer_urls()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:pdpb.Member.peer_urls) } inline void Member::set_peer_urls(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.peer_urls_.Mutable(index)->assign(value); + ABSL_DCHECK(value != nullptr); + _internal_mutable_peer_urls()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:pdpb.Member.peer_urls) } -inline void Member::set_peer_urls(int index, const char* value, size_t size) { - _impl_.peer_urls_.Mutable(index)->assign( - reinterpret_cast(value), size); +inline void Member::set_peer_urls(int index, const char* value, + std::size_t size) { + _internal_mutable_peer_urls()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:pdpb.Member.peer_urls) } -inline std::string* Member::_internal_add_peer_urls() { - return _impl_.peer_urls_.Add(); +inline void Member::set_peer_urls(int index, absl::string_view value) { + _internal_mutable_peer_urls()->Mutable(index)->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_set_string_piece:pdpb.Member.peer_urls) } inline void Member::add_peer_urls(const std::string& value) { - _impl_.peer_urls_.Add()->assign(value); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_peer_urls()->Add()->assign(value); // @@protoc_insertion_point(field_add:pdpb.Member.peer_urls) } inline void Member::add_peer_urls(std::string&& value) { - _impl_.peer_urls_.Add(std::move(value)); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_peer_urls()->Add(std::move(value)); // @@protoc_insertion_point(field_add:pdpb.Member.peer_urls) } inline void Member::add_peer_urls(const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.peer_urls_.Add()->assign(value); + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_peer_urls()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:pdpb.Member.peer_urls) } -inline void Member::add_peer_urls(const char* value, size_t size) { - _impl_.peer_urls_.Add()->assign(reinterpret_cast(value), size); +inline void Member::add_peer_urls(const char* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_peer_urls()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:pdpb.Member.peer_urls) } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Member::peer_urls() const { +inline void Member::add_peer_urls(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_peer_urls()->Add()->assign(value.data(), value.size()); + // @@protoc_insertion_point(field_add_string_piece:pdpb.Member.peer_urls) +} +inline const ::google::protobuf::RepeatedPtrField& +Member::peer_urls() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:pdpb.Member.peer_urls) - return _impl_.peer_urls_; + return _internal_peer_urls(); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Member::mutable_peer_urls() { +inline ::google::protobuf::RepeatedPtrField* +Member::mutable_peer_urls() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:pdpb.Member.peer_urls) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_peer_urls(); +} +inline const ::google::protobuf::RepeatedPtrField& +Member::_internal_peer_urls() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.peer_urls_; +} +inline ::google::protobuf::RepeatedPtrField* +Member::_internal_mutable_peer_urls() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.peer_urls_; } // repeated string client_urls = 4; inline int Member::_internal_client_urls_size() const { - return _impl_.client_urls_.size(); + return _internal_client_urls().size(); } inline int Member::client_urls_size() const { return _internal_client_urls_size(); } inline void Member::clear_client_urls() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.client_urls_.Clear(); } -inline std::string* Member::add_client_urls() { - std::string* _s = _internal_add_client_urls(); +inline std::string* Member::add_client_urls() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_client_urls()->Add(); // @@protoc_insertion_point(field_add_mutable:pdpb.Member.client_urls) return _s; } -inline const std::string& Member::_internal_client_urls(int index) const { - return _impl_.client_urls_.Get(index); -} -inline const std::string& Member::client_urls(int index) const { +inline const std::string& Member::client_urls(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.Member.client_urls) - return _internal_client_urls(index); + return _internal_client_urls().Get(index); } -inline std::string* Member::mutable_client_urls(int index) { +inline std::string* Member::mutable_client_urls(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:pdpb.Member.client_urls) - return _impl_.client_urls_.Mutable(index); + return _internal_mutable_client_urls()->Mutable(index); } inline void Member::set_client_urls(int index, const std::string& value) { - _impl_.client_urls_.Mutable(index)->assign(value); + _internal_mutable_client_urls()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:pdpb.Member.client_urls) } inline void Member::set_client_urls(int index, std::string&& value) { - _impl_.client_urls_.Mutable(index)->assign(std::move(value)); + _internal_mutable_client_urls()->Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:pdpb.Member.client_urls) } inline void Member::set_client_urls(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.client_urls_.Mutable(index)->assign(value); + ABSL_DCHECK(value != nullptr); + _internal_mutable_client_urls()->Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:pdpb.Member.client_urls) } -inline void Member::set_client_urls(int index, const char* value, size_t size) { - _impl_.client_urls_.Mutable(index)->assign( - reinterpret_cast(value), size); +inline void Member::set_client_urls(int index, const char* value, + std::size_t size) { + _internal_mutable_client_urls()->Mutable(index)->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:pdpb.Member.client_urls) } -inline std::string* Member::_internal_add_client_urls() { - return _impl_.client_urls_.Add(); +inline void Member::set_client_urls(int index, absl::string_view value) { + _internal_mutable_client_urls()->Mutable(index)->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_set_string_piece:pdpb.Member.client_urls) } inline void Member::add_client_urls(const std::string& value) { - _impl_.client_urls_.Add()->assign(value); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_client_urls()->Add()->assign(value); // @@protoc_insertion_point(field_add:pdpb.Member.client_urls) } inline void Member::add_client_urls(std::string&& value) { - _impl_.client_urls_.Add(std::move(value)); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_client_urls()->Add(std::move(value)); // @@protoc_insertion_point(field_add:pdpb.Member.client_urls) } inline void Member::add_client_urls(const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.client_urls_.Add()->assign(value); + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_client_urls()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:pdpb.Member.client_urls) } -inline void Member::add_client_urls(const char* value, size_t size) { - _impl_.client_urls_.Add()->assign(reinterpret_cast(value), size); +inline void Member::add_client_urls(const char* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_client_urls()->Add()->assign( + reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:pdpb.Member.client_urls) } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Member::client_urls() const { +inline void Member::add_client_urls(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_client_urls()->Add()->assign(value.data(), value.size()); + // @@protoc_insertion_point(field_add_string_piece:pdpb.Member.client_urls) +} +inline const ::google::protobuf::RepeatedPtrField& +Member::client_urls() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:pdpb.Member.client_urls) - return _impl_.client_urls_; + return _internal_client_urls(); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Member::mutable_client_urls() { +inline ::google::protobuf::RepeatedPtrField* +Member::mutable_client_urls() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:pdpb.Member.client_urls) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_client_urls(); +} +inline const ::google::protobuf::RepeatedPtrField& +Member::_internal_client_urls() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.client_urls_; +} +inline ::google::protobuf::RepeatedPtrField* +Member::_internal_mutable_client_urls() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.client_urls_; } // string leader_name = 5; inline void Member::clear_leader_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.leader_name_.ClearToEmpty(); } -inline const std::string& Member::leader_name() const { +inline const std::string& Member::leader_name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.Member.leader_name) return _internal_leader_name(); } -template -inline PROTOBUF_ALWAYS_INLINE -void Member::set_leader_name(ArgT0&& arg0, ArgT... args) { - - _impl_.leader_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +template +inline PROTOBUF_ALWAYS_INLINE void Member::set_leader_name(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.leader_name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:pdpb.Member.leader_name) } -inline std::string* Member::mutable_leader_name() { +inline std::string* Member::mutable_leader_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { std::string* _s = _internal_mutable_leader_name(); // @@protoc_insertion_point(field_mutable:pdpb.Member.leader_name) return _s; } inline const std::string& Member::_internal_leader_name() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.leader_name_.Get(); } inline void Member::_internal_set_leader_name(const std::string& value) { - - _impl_.leader_name_.Set(value, GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.leader_name_.Set(value, GetArena()); } inline std::string* Member::_internal_mutable_leader_name() { - - return _impl_.leader_name_.Mutable(GetArenaForAllocation()); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.leader_name_.Mutable( GetArena()); } inline std::string* Member::release_leader_name() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.Member.leader_name) return _impl_.leader_name_.Release(); } -inline void Member::set_allocated_leader_name(std::string* leader_name) { - if (leader_name != nullptr) { - - } else { - - } - _impl_.leader_name_.SetAllocated(leader_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.leader_name_.IsDefault()) { - _impl_.leader_name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +inline void Member::set_allocated_leader_name(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.leader_name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.leader_name_.IsDefault()) { + _impl_.leader_name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:pdpb.Member.leader_name) } // uint64 leader_id = 6; inline void Member::clear_leader_id() { - _impl_.leader_id_ = uint64_t{0u}; -} -inline uint64_t Member::_internal_leader_id() const { - return _impl_.leader_id_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.leader_id_ = ::uint64_t{0u}; } -inline uint64_t Member::leader_id() const { +inline ::uint64_t Member::leader_id() const { // @@protoc_insertion_point(field_get:pdpb.Member.leader_id) return _internal_leader_id(); } -inline void Member::_internal_set_leader_id(uint64_t value) { - - _impl_.leader_id_ = value; -} -inline void Member::set_leader_id(uint64_t value) { +inline void Member::set_leader_id(::uint64_t value) { _internal_set_leader_id(value); // @@protoc_insertion_point(field_set:pdpb.Member.leader_id) } +inline ::uint64_t Member::_internal_leader_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.leader_id_; +} +inline void Member::_internal_set_leader_id(::uint64_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.leader_id_ = value; +} // ------------------------------------------------------------------- // GetMembersResponse // .pdpb.ResponseHeader header = 1; -inline bool GetMembersResponse::_internal_has_header() const { - return this != internal_default_instance() && _impl_.header_ != nullptr; -} inline bool GetMembersResponse::has_header() const { - return _internal_has_header(); + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr); + return value; } inline void GetMembersResponse::clear_header() { - if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { - delete _impl_.header_; - } - _impl_.header_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.header_ != nullptr) _impl_.header_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::pdpb::ResponseHeader& GetMembersResponse::_internal_header() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::ResponseHeader* p = _impl_.header_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_ResponseHeader_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_ResponseHeader_default_instance_); } -inline const ::pdpb::ResponseHeader& GetMembersResponse::header() const { +inline const ::pdpb::ResponseHeader& GetMembersResponse::header() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetMembersResponse.header) return _internal_header(); } -inline void GetMembersResponse::unsafe_arena_set_allocated_header( - ::pdpb::ResponseHeader* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_); +inline void GetMembersResponse::unsafe_arena_set_allocated_header(::pdpb::ResponseHeader* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.header_); } - _impl_.header_ = header; - if (header) { - + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetMembersResponse.header) } inline ::pdpb::ResponseHeader* GetMembersResponse::release_header() { - - ::pdpb::ResponseHeader* temp = _impl_.header_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::pdpb::ResponseHeader* released = _impl_.header_; _impl_.header_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::ResponseHeader* GetMembersResponse::unsafe_arena_release_header() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetMembersResponse.header) - + + _impl_._has_bits_[0] &= ~0x00000001u; ::pdpb::ResponseHeader* temp = _impl_.header_; _impl_.header_ = nullptr; return temp; } inline ::pdpb::ResponseHeader* GetMembersResponse::_internal_mutable_header() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; if (_impl_.header_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::ResponseHeader>(GetArenaForAllocation()); - _impl_.header_ = p; + auto* p = CreateMaybeMessage<::pdpb::ResponseHeader>(GetArena()); + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(p); } return _impl_.header_; } -inline ::pdpb::ResponseHeader* GetMembersResponse::mutable_header() { +inline ::pdpb::ResponseHeader* GetMembersResponse::mutable_header() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::ResponseHeader* _msg = _internal_mutable_header(); // @@protoc_insertion_point(field_mutable:pdpb.GetMembersResponse.header) return _msg; } -inline void GetMembersResponse::set_allocated_header(::pdpb::ResponseHeader* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetMembersResponse::set_allocated_header(::pdpb::ResponseHeader* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.header_; + delete reinterpret_cast<::pdpb::ResponseHeader*>(_impl_.header_); } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::ResponseHeader*>(value)->GetArena(); if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000001u; } else { - + _impl_._has_bits_[0] &= ~0x00000001u; } - _impl_.header_ = header; + + _impl_.header_ = reinterpret_cast<::pdpb::ResponseHeader*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetMembersResponse.header) } // repeated .pdpb.Member members = 2; inline int GetMembersResponse::_internal_members_size() const { - return _impl_.members_.size(); + return _internal_members().size(); } inline int GetMembersResponse::members_size() const { return _internal_members_size(); } inline void GetMembersResponse::clear_members() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.members_.Clear(); } -inline ::pdpb::Member* GetMembersResponse::mutable_members(int index) { +inline ::pdpb::Member* GetMembersResponse::mutable_members(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable:pdpb.GetMembersResponse.members) - return _impl_.members_.Mutable(index); + return _internal_mutable_members()->Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pdpb::Member >* -GetMembersResponse::mutable_members() { +inline ::google::protobuf::RepeatedPtrField<::pdpb::Member>* GetMembersResponse::mutable_members() + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:pdpb.GetMembersResponse.members) - return &_impl_.members_; -} -inline const ::pdpb::Member& GetMembersResponse::_internal_members(int index) const { - return _impl_.members_.Get(index); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_members(); } -inline const ::pdpb::Member& GetMembersResponse::members(int index) const { +inline const ::pdpb::Member& GetMembersResponse::members(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetMembersResponse.members) - return _internal_members(index); + return _internal_members().Get(index); } -inline ::pdpb::Member* GetMembersResponse::_internal_add_members() { - return _impl_.members_.Add(); -} -inline ::pdpb::Member* GetMembersResponse::add_members() { - ::pdpb::Member* _add = _internal_add_members(); +inline ::pdpb::Member* GetMembersResponse::add_members() ABSL_ATTRIBUTE_LIFETIME_BOUND { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::pdpb::Member* _add = _internal_mutable_members()->Add(); // @@protoc_insertion_point(field_add:pdpb.GetMembersResponse.members) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::pdpb::Member >& -GetMembersResponse::members() const { +inline const ::google::protobuf::RepeatedPtrField<::pdpb::Member>& GetMembersResponse::members() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_list:pdpb.GetMembersResponse.members) + return _internal_members(); +} +inline const ::google::protobuf::RepeatedPtrField<::pdpb::Member>& +GetMembersResponse::_internal_members() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.members_; } +inline ::google::protobuf::RepeatedPtrField<::pdpb::Member>* +GetMembersResponse::_internal_mutable_members() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.members_; +} // .pdpb.Member leader = 3; -inline bool GetMembersResponse::_internal_has_leader() const { - return this != internal_default_instance() && _impl_.leader_ != nullptr; -} inline bool GetMembersResponse::has_leader() const { - return _internal_has_leader(); + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.leader_ != nullptr); + return value; } inline void GetMembersResponse::clear_leader() { - if (GetArenaForAllocation() == nullptr && _impl_.leader_ != nullptr) { - delete _impl_.leader_; - } - _impl_.leader_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.leader_ != nullptr) _impl_.leader_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; } inline const ::pdpb::Member& GetMembersResponse::_internal_leader() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::Member* p = _impl_.leader_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_Member_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_Member_default_instance_); } -inline const ::pdpb::Member& GetMembersResponse::leader() const { +inline const ::pdpb::Member& GetMembersResponse::leader() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetMembersResponse.leader) return _internal_leader(); } -inline void GetMembersResponse::unsafe_arena_set_allocated_leader( - ::pdpb::Member* leader) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.leader_); +inline void GetMembersResponse::unsafe_arena_set_allocated_leader(::pdpb::Member* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.leader_); } - _impl_.leader_ = leader; - if (leader) { - + _impl_.leader_ = reinterpret_cast<::pdpb::Member*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetMembersResponse.leader) } inline ::pdpb::Member* GetMembersResponse::release_leader() { - - ::pdpb::Member* temp = _impl_.leader_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::pdpb::Member* released = _impl_.leader_; _impl_.leader_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::Member* GetMembersResponse::unsafe_arena_release_leader() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetMembersResponse.leader) - + + _impl_._has_bits_[0] &= ~0x00000002u; ::pdpb::Member* temp = _impl_.leader_; _impl_.leader_ = nullptr; return temp; } inline ::pdpb::Member* GetMembersResponse::_internal_mutable_leader() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000002u; if (_impl_.leader_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::Member>(GetArenaForAllocation()); - _impl_.leader_ = p; + auto* p = CreateMaybeMessage<::pdpb::Member>(GetArena()); + _impl_.leader_ = reinterpret_cast<::pdpb::Member*>(p); } return _impl_.leader_; } -inline ::pdpb::Member* GetMembersResponse::mutable_leader() { +inline ::pdpb::Member* GetMembersResponse::mutable_leader() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::Member* _msg = _internal_mutable_leader(); // @@protoc_insertion_point(field_mutable:pdpb.GetMembersResponse.leader) return _msg; } -inline void GetMembersResponse::set_allocated_leader(::pdpb::Member* leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetMembersResponse::set_allocated_leader(::pdpb::Member* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.leader_; + delete reinterpret_cast<::pdpb::Member*>(_impl_.leader_); } - if (leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(leader); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::Member*>(value)->GetArena(); if (message_arena != submessage_arena) { - leader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, leader, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000002u; } else { - + _impl_._has_bits_[0] &= ~0x00000002u; } - _impl_.leader_ = leader; + + _impl_.leader_ = reinterpret_cast<::pdpb::Member*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetMembersResponse.leader) } // .pdpb.Member etcd_leader = 4; -inline bool GetMembersResponse::_internal_has_etcd_leader() const { - return this != internal_default_instance() && _impl_.etcd_leader_ != nullptr; -} inline bool GetMembersResponse::has_etcd_leader() const { - return _internal_has_etcd_leader(); + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.etcd_leader_ != nullptr); + return value; } inline void GetMembersResponse::clear_etcd_leader() { - if (GetArenaForAllocation() == nullptr && _impl_.etcd_leader_ != nullptr) { - delete _impl_.etcd_leader_; - } - _impl_.etcd_leader_ = nullptr; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (_impl_.etcd_leader_ != nullptr) _impl_.etcd_leader_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; } inline const ::pdpb::Member& GetMembersResponse::_internal_etcd_leader() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::pdpb::Member* p = _impl_.etcd_leader_; - return p != nullptr ? *p : reinterpret_cast( - ::pdpb::_Member_default_instance_); + return p != nullptr ? *p : reinterpret_cast(::pdpb::_Member_default_instance_); } -inline const ::pdpb::Member& GetMembersResponse::etcd_leader() const { +inline const ::pdpb::Member& GetMembersResponse::etcd_leader() const ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_get:pdpb.GetMembersResponse.etcd_leader) return _internal_etcd_leader(); } -inline void GetMembersResponse::unsafe_arena_set_allocated_etcd_leader( - ::pdpb::Member* etcd_leader) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.etcd_leader_); +inline void GetMembersResponse::unsafe_arena_set_allocated_etcd_leader(::pdpb::Member* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.etcd_leader_); } - _impl_.etcd_leader_ = etcd_leader; - if (etcd_leader) { - + _impl_.etcd_leader_ = reinterpret_cast<::pdpb::Member*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; } else { - + _impl_._has_bits_[0] &= ~0x00000004u; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pdpb.GetMembersResponse.etcd_leader) } inline ::pdpb::Member* GetMembersResponse::release_etcd_leader() { - - ::pdpb::Member* temp = _impl_.etcd_leader_; + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000004u; + ::pdpb::Member* released = _impl_.etcd_leader_; _impl_.etcd_leader_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return released; } inline ::pdpb::Member* GetMembersResponse::unsafe_arena_release_etcd_leader() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:pdpb.GetMembersResponse.etcd_leader) - + + _impl_._has_bits_[0] &= ~0x00000004u; ::pdpb::Member* temp = _impl_.etcd_leader_; _impl_.etcd_leader_ = nullptr; return temp; } inline ::pdpb::Member* GetMembersResponse::_internal_mutable_etcd_leader() { - + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000004u; if (_impl_.etcd_leader_ == nullptr) { - auto* p = CreateMaybeMessage<::pdpb::Member>(GetArenaForAllocation()); - _impl_.etcd_leader_ = p; + auto* p = CreateMaybeMessage<::pdpb::Member>(GetArena()); + _impl_.etcd_leader_ = reinterpret_cast<::pdpb::Member*>(p); } return _impl_.etcd_leader_; } -inline ::pdpb::Member* GetMembersResponse::mutable_etcd_leader() { +inline ::pdpb::Member* GetMembersResponse::mutable_etcd_leader() ABSL_ATTRIBUTE_LIFETIME_BOUND { ::pdpb::Member* _msg = _internal_mutable_etcd_leader(); // @@protoc_insertion_point(field_mutable:pdpb.GetMembersResponse.etcd_leader) return _msg; } -inline void GetMembersResponse::set_allocated_etcd_leader(::pdpb::Member* etcd_leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); +inline void GetMembersResponse::set_allocated_etcd_leader(::pdpb::Member* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { - delete _impl_.etcd_leader_; + delete reinterpret_cast<::pdpb::Member*>(_impl_.etcd_leader_); } - if (etcd_leader) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(etcd_leader); + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::pdpb::Member*>(value)->GetArena(); if (message_arena != submessage_arena) { - etcd_leader = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, etcd_leader, submessage_arena); + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - + _impl_._has_bits_[0] |= 0x00000004u; } else { - + _impl_._has_bits_[0] &= ~0x00000004u; } - _impl_.etcd_leader_ = etcd_leader; + + _impl_.etcd_leader_ = reinterpret_cast<::pdpb::Member*>(value); // @@protoc_insertion_point(field_set_allocated:pdpb.GetMembersResponse.etcd_leader) } #ifdef __GNUC__ - #pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) - } // namespace pdpb -PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::pdpb::ErrorType> : ::std::true_type {}; +namespace google { +namespace protobuf { + template <> -inline const EnumDescriptor* GetEnumDescriptor< ::pdpb::ErrorType>() { +struct is_proto_enum<::pdpb::ErrorType> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::pdpb::ErrorType>() { return ::pdpb::ErrorType_descriptor(); } -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_pdpb_2eproto +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_pdpb_2eproto_2epb_2eh diff --git a/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.cc b/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.cc index 0ce157562..7a6ef03f9 100644 --- a/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.cc +++ b/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.cc @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.h b/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.h index d75106baa..aaad73a2a 100644 --- a/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.h +++ b/ThirdParty/kvproto/generated/kvproto/tikvpb.grpc.pb.h @@ -19,13 +19,13 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.cc b/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.cc index 2ec37b97c..3a2d4679e 100644 --- a/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.cc +++ b/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.cc @@ -4,77 +4,100 @@ #include "tikvpb.pb.h" #include - -#include -#include -#include -#include -#include -#include -#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) -#include +// Must be included last. +#include "google/protobuf/port_def.inc" PROTOBUF_PRAGMA_INIT_SEG - -namespace _pb = ::PROTOBUF_NAMESPACE_ID; -namespace _pbi = _pb::internal; - +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; namespace tikvpb { } // namespace tikvpb -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_tikvpb_2eproto = nullptr; -static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_tikvpb_2eproto = nullptr; -const uint32_t TableStruct_tikvpb_2eproto::offsets[1] = {}; +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_tikvpb_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_tikvpb_2eproto = nullptr; +const ::uint32_t TableStruct_tikvpb_2eproto::offsets[1] = {}; static constexpr ::_pbi::MigrationSchema* schemas = nullptr; static constexpr ::_pb::Message* const* file_default_instances = nullptr; - -const char descriptor_table_protodef_tikvpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\014tikvpb.proto\022\006tikvpb\032\rkvrpcpb.proto2\345\005" - "\n\004Tikv\022;\n\006RawGet\022\026.kvrpcpb.RawGetRequest" - "\032\027.kvrpcpb.RawGetResponse\"\000\022J\n\013RawBatchG" - "et\022\033.kvrpcpb.RawBatchGetRequest\032\034.kvrpcp" - "b.RawBatchGetResponse\"\000\022;\n\006RawPut\022\026.kvrp" - "cpb.RawPutRequest\032\027.kvrpcpb.RawPutRespon" - "se\"\000\022J\n\013RawBatchPut\022\033.kvrpcpb.RawBatchPu" - "tRequest\032\034.kvrpcpb.RawBatchPutResponse\"\000" - "\022D\n\tRawDelete\022\031.kvrpcpb.RawDeleteRequest" - "\032\032.kvrpcpb.RawDeleteResponse\"\000\022S\n\016RawBat" - "chDelete\022\036.kvrpcpb.RawBatchDeleteRequest" - "\032\037.kvrpcpb.RawBatchDeleteResponse\"\000\022S\n\016R" - "awDeleteRange\022\036.kvrpcpb.RawDeleteRangeRe" - "quest\032\037.kvrpcpb.RawDeleteRangeResponse\"\000" - "\022F\n\021RawCompareAndSwap\022\026.kvrpcpb.RawCASRe" - "quest\032\027.kvrpcpb.RawCASResponse\"\000\022>\n\007RawS" - "can\022\027.kvrpcpb.RawScanRequest\032\030.kvrpcpb.R" - "awScanResponse\"\000\022S\n\016RawCoprocessor\022\036.kvr" - "pcpb.RawCoprocessorRequest\032\037.kvrpcpb.Raw" - "CoprocessorResponse\"\000B\022\n\020org.tikv.kvprot" - "ob\006proto3" - ; -static const ::_pbi::DescriptorTable* const descriptor_table_tikvpb_2eproto_deps[1] = { - &::descriptor_table_kvrpcpb_2eproto, +const char descriptor_table_protodef_tikvpb_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + "\n\014tikvpb.proto\022\006tikvpb\032\rkvrpcpb.proto2\345\005" + "\n\004Tikv\022;\n\006RawGet\022\026.kvrpcpb.RawGetRequest" + "\032\027.kvrpcpb.RawGetResponse\"\000\022J\n\013RawBatchG" + "et\022\033.kvrpcpb.RawBatchGetRequest\032\034.kvrpcp" + "b.RawBatchGetResponse\"\000\022;\n\006RawPut\022\026.kvrp" + "cpb.RawPutRequest\032\027.kvrpcpb.RawPutRespon" + "se\"\000\022J\n\013RawBatchPut\022\033.kvrpcpb.RawBatchPu" + "tRequest\032\034.kvrpcpb.RawBatchPutResponse\"\000" + "\022D\n\tRawDelete\022\031.kvrpcpb.RawDeleteRequest" + "\032\032.kvrpcpb.RawDeleteResponse\"\000\022S\n\016RawBat" + "chDelete\022\036.kvrpcpb.RawBatchDeleteRequest" + "\032\037.kvrpcpb.RawBatchDeleteResponse\"\000\022S\n\016R" + "awDeleteRange\022\036.kvrpcpb.RawDeleteRangeRe" + "quest\032\037.kvrpcpb.RawDeleteRangeResponse\"\000" + "\022F\n\021RawCompareAndSwap\022\026.kvrpcpb.RawCASRe" + "quest\032\027.kvrpcpb.RawCASResponse\"\000\022>\n\007RawS" + "can\022\027.kvrpcpb.RawScanRequest\032\030.kvrpcpb.R" + "awScanResponse\"\000\022S\n\016RawCoprocessor\022\036.kvr" + "pcpb.RawCoprocessorRequest\032\037.kvrpcpb.Raw" + "CoprocessorResponse\"\000B\022\n\020org.tikv.kvprot" + "ob\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_tikvpb_2eproto_deps[1] = + { + &::descriptor_table_kvrpcpb_2eproto, }; -static ::_pbi::once_flag descriptor_table_tikvpb_2eproto_once; +static ::absl::once_flag descriptor_table_tikvpb_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_tikvpb_2eproto = { - false, false, 809, descriptor_table_protodef_tikvpb_2eproto, + false, + false, + 809, + descriptor_table_protodef_tikvpb_2eproto, "tikvpb.proto", - &descriptor_table_tikvpb_2eproto_once, descriptor_table_tikvpb_2eproto_deps, 1, 0, - schemas, file_default_instances, TableStruct_tikvpb_2eproto::offsets, - nullptr, file_level_enum_descriptors_tikvpb_2eproto, + &descriptor_table_tikvpb_2eproto_once, + descriptor_table_tikvpb_2eproto_deps, + 1, + 0, + schemas, + file_default_instances, + TableStruct_tikvpb_2eproto::offsets, + nullptr, + file_level_enum_descriptors_tikvpb_2eproto, file_level_service_descriptors_tikvpb_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_tikvpb_2eproto_getter() { return &descriptor_table_tikvpb_2eproto; } - // Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_tikvpb_2eproto(&descriptor_table_tikvpb_2eproto); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_tikvpb_2eproto(&descriptor_table_tikvpb_2eproto); namespace tikvpb { - // @@protoc_insertion_point(namespace_scope) } // namespace tikvpb -PROTOBUF_NAMESPACE_OPEN -PROTOBUF_NAMESPACE_CLOSE - +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google // @@protoc_insertion_point(global_scope) -#include +#include "google/protobuf/port_undef.inc" diff --git a/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.h b/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.h index 2a76d3f17..9ab1157bf 100644 --- a/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.h +++ b/ThirdParty/kvproto/generated/kvproto/tikvpb.pb.h @@ -1,73 +1,92 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: tikvpb.proto +// Protobuf C++ Version: 4.25.3 -#ifndef GOOGLE_PROTOBUF_INCLUDED_tikvpb_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_tikvpb_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_tikvpb_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_tikvpb_2eproto_2epb_2eh #include #include +#include +#include -#include -#if PROTOBUF_VERSION < 3021000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION < 4025000 +#error "This file was generated by a newer version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please update" +#error "your headers." +#endif // PROTOBUF_VERSION + +#if 4025003 < PROTOBUF_MIN_PROTOC_VERSION +#error "This file was generated by an older version of protoc which is" +#error "incompatible with your Protocol Buffer headers. Please" +#error "regenerate this file with a newer version of protoc." +#endif // PROTOBUF_MIN_PROTOC_VERSION +#include "google/protobuf/port_undef.inc" +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export #include "kvrpcpb.pb.h" // @@protoc_insertion_point(includes) -#include + +// Must be included last. +#include "google/protobuf/port_def.inc" + #define PROTOBUF_INTERNAL_EXPORT_tikvpb_2eproto -PROTOBUF_NAMESPACE_OPEN + +namespace google { +namespace protobuf { namespace internal { class AnyMetadata; } // namespace internal -PROTOBUF_NAMESPACE_CLOSE +} // namespace protobuf +} // namespace google // Internal implementation detail -- do not use these members. struct TableStruct_tikvpb_2eproto { - static const uint32_t offsets[]; + static const ::uint32_t offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tikvpb_2eproto; -PROTOBUF_NAMESPACE_OPEN -PROTOBUF_NAMESPACE_CLOSE +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_tikvpb_2eproto; +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + namespace tikvpb { // =================================================================== + // =================================================================== + + // =================================================================== + #ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ #ifdef __GNUC__ - #pragma GCC diagnostic pop +#pragma GCC diagnostic pop #endif // __GNUC__ // @@protoc_insertion_point(namespace_scope) - } // namespace tikvpb + // @@protoc_insertion_point(global_scope) -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tikvpb_2eproto +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_tikvpb_2eproto_2epb_2eh diff --git a/evaluation/distributed/README.md b/evaluation/distributed/README.md new file mode 100644 index 000000000..7b2234908 --- /dev/null +++ b/evaluation/distributed/README.md @@ -0,0 +1,304 @@ +# Distributed Benchmark Evaluation — Insert Dominant + +Multi-machine SPTAG SPANN distributed benchmark for an **insert-dominant** workload +(1M base + 1M-10M inserts in batches, with concurrent search-during-insert) on +SIFT1B. All nodes share a single TiKV raft cluster (see "TiKV deployment model" +below). + +## Files in this folder + +| File | Purpose | +| --- | --- | +| `configs/benchmark_insert_dominant_template.ini` | 1M base + 1M insert, search-during-insert workload. | +| `configs/benchmark_10m_template.ini` | 9M base + 1M insert, growing-index workload. | +| `configs/benchmark_100m_template.ini` | 99M base + 1M insert, steady-state/freshness workload. | +| `configs/cluster_2node.conf`, `configs/cluster_3node.conf` | Example cluster topologies. Pick one (or write your own) and pass to the orchestrator. | +| `configs/tikv.toml` | TiKV server config baked into the containers. | +| `run_distributed.sh` | Orchestrator: `deploy` / `setup-bins` / `start-tikv` / `run` / `bench` / `stop-tikv` / `cleanup`. | +| `bin/` | `tikv-server` + `pd-server` binaries used by the containers (`setup-bins` downloads them if missing). | +| `README.md` | This file. | + +`run_distributed.sh` fills the template's `IndexPath`, `TiKVPDAddresses`, +`TiKVKeyPrefix`, and `[Distributed]` section from the cluster config. + +## Architecture + +``` + ┌────────────────────┐ + │ Driver = Worker 0│ (node 0) + │ + Dispatcher │ + └─┬──┬──┬────────────┘ + TCP Dispatch │ │ │ ▲ ▲ ▲ + (broadcast) │ │ │ │ │ │ status replies + ┌──────┘ │ └──────┐│ │ │ + ▼ ▼ ▼│ │ │ + ┌──────────┐ ┌──────────┐ ┌──────────┐ + │ Worker 1 │ │ Worker 2 │ │ Worker N │ + └──┬───▲───┘ └──┬───▲───┘ └──┬───▲───┘ + │ │ │ │ │ │ + └───┴────────┴───┴────────┴───┘ + PostingRouter peer-to-peer + (remote append / head sync / + merge hints, by hash owner) + │ + ▼ + ┌───────────────────┐ + │ Shared TiKV raft │ N PDs (one raft group) + + │ cluster │ N TiKV stores (max-replicas=1) + └───────────────────┘ +``` + +- **Driver** (node 0): also runs as **worker 0**. On top of the worker role, + it owns the dispatcher: builds the initial index, then broadcasts + Search/Insert/Stop commands to the other workers over TCP dispatch. +- **Workers** (nodes 0..N-1): each owns a shard of the head index by hash. + Workers talk to each other peer-to-peer through PostingRouter for remote + append, head sync, and merge hints — there is no driver-mediated forwarding. + On each `DispatchCommand` they execute the local part of the request and + report status back to the dispatcher. +- **Shared TiKV cluster**: every node runs a PD + TiKV container; all PDs join + one raft group, all TiKVs point to all PDs. PD routes each key to the store + that owns its region. +- **PostingRouter**: hash-based head routing, remote append, head sync, and + the TCP dispatch transport used by the dispatcher. + +## TiKV deployment model + +All nodes share **one** TiKV raft cluster: every node's PD joins the same raft +group, every node's TiKV registers as a store in that cluster, and PD routes +reads/writes to whichever store owns the region. `max-replicas=1` is set so +each region lives on exactly one store — we measure benchmark performance +without 3-way Raft replication. Compute nodes are stateless TiKV clients; they +read any posting through the shared client, so there is no cross-compute fetch +RPC during RNGSelection. + +Per-node ports (defaults from `configs/cluster_2node.conf`): + +| Service | Default port | Notes | +| --- | --- | --- | +| PD client | `23791` | TiKV client + `pd-ctl` connect here. | +| PD peer | `23801` | Inter-PD raft traffic. | +| TiKV client | `20171` | Per-node TiKV listens here. | +| Router | `30002+` | TCP dispatch / posting routing between nodes. **Driver's `router_port` must NOT be `30001`** — the dispatcher listens on `30001` and a collision will silently break worker registration. The shipped 2-node config uses `30011` on the driver for this reason. | + +## Prerequisites + +- `Release/SPTAGTest` built with TiKV support on the driver node: + ```bash + cd + cd ThirdParty/kvproto && ./generate_cpp.sh && cd ../.. + mkdir -p Release && cd Release + cmake .. -DTIKV=ON -DTBB=ON -DCMAKE_BUILD_TYPE=Release -DGPU=OFF + cmake --build . --target SPTAGTest -j$(nproc) + ``` + *Note: building the full project may fail on the Java wrapper + (`JAVASPTAGFileIO`) due to a pre-existing `FileIOInterface.h` signature + mismatch — the `SPTAGTest` target alone is sufficient.* +- Passwordless SSH from driver to every other node (configure `ssh_key` in + the cluster config). +- Docker installed on every node (TiKV/PD run as containers in host network mode). +- Same dataset path on every node (default `/mnt/nvme/sift1b/`): + - `/mnt/nvme/sift1b/bigann_base.u8bin` (1B × 128 × u8) + - `/mnt/nvme/sift1b/query.10K.u8bin` +- Same fast-storage path for index + TiKV data on every node (`data_dir` in + the cluster config, default `/mnt/nvme`). + +## Step 1 — Cluster config + +Pick one of the shipped templates and edit it for your hosts/paths: + +```bash +cp evaluation/distributed/configs/cluster_2node.conf my_cluster.conf +vim my_cluster.conf +``` + +Layout: + +```ini +[cluster] +ssh_user=superbench +ssh_key=/home/superbench/.ssh/id_rsa +sptag_dir=/home/superbench/zhangt/SPTAG +data_dir=/mnt/nvme +tikv_version=v8.5.1 +pd_version=v8.5.1 + +[nodes] +# host router_port (driver is first; router_port must not equal 30001) +10.0.1.1 30011 # driver +10.0.1.2 30002 # worker 1 + +[tikv] +# host pd_client_port pd_peer_port tikv_port +10.0.1.1 23791 23801 20171 +10.0.1.2 23791 23801 20171 +``` + +`run_distributed.sh` reads this file to fill the template's `[Distributed]`, +`TiKVPDAddresses`, `IndexPath`, and `TiKVKeyPrefix` automatically. + +## Step 2 — Deploy + +```bash +./evaluation/distributed/run_distributed.sh deploy my_cluster.conf +./evaluation/distributed/run_distributed.sh setup-bins my_cluster.conf +``` + +`deploy` rsyncs `Release/SPTAGTest` (and required shared libs) to every node +and ensures per-node TiKV / PD data directories exist under `data_dir`. +`setup-bins` downloads `tikv-server` / `pd-server` into `bin/` on every node +(idempotent; skipped automatically by `start-tikv` if binaries are already +present). + +## Step 3 — Start the shared TiKV cluster + +```bash +./evaluation/distributed/run_distributed.sh start-tikv my_cluster.conf +``` + +This starts one PD + one TiKV container per node in host-network mode and +joins them into a single raft cluster (`max-replicas=1`, no 3-way replication). + +Health check (single PD endpoint is enough — the cluster is shared): + +```bash +curl -s "http://10.0.1.1:23791/pd/api/v1/stores" \ + | python3 -c 'import json,sys; print([s["store"]["state_name"] for s in json.load(sys.stdin)["stores"]])' +# Expected: ['Up', 'Up'] (one entry per TiKV store). +``` + +## Step 4 — Run the benchmark + +```bash +# Single scale, explicit node count (driver + (N-1) workers): +./evaluation/distributed/run_distributed.sh run my_cluster.conf insert_dominant 2 + +# Or sweep 1-node baseline + N-node distributed for one or more scales: +./evaluation/distributed/run_distributed.sh bench my_cluster.conf insert_dominant +./evaluation/distributed/run_distributed.sh bench my_cluster.conf all +``` + +What `run` does: + +1. **Build** (driver only): driver builds the index locally with router + *disabled* (`Rebuild=true`, no `[Distributed]`). Output goes to + `…_n0/spann_index`. Because the TiKV cluster is shared, the driver writes + all postings straight to TiKV via PD-routed RPCs — there is no need for a + distributed build phase. +2. **Distribute**: rsync head index + perftest files from driver to each worker. +3. **Workers**: SSH-launches `SPTAGTest` on each remote worker (nodes 1..N-1) + with `WORKER_INDEX=i` and the per-node ini (router enabled, + `Rebuild=false`). Workers wire PostingRouter so they can reach every peer + directly for remote append / head sync. +4. **Driver**: relaunches `SPTAGTest` on node 0 with router enabled, + `Rebuild=false`. The same process acts as **worker 0** (owns its hash + shard like any other worker) **and** as the dispatcher (broadcasts Insert + / Search / Stop over TCP and waits for status replies). +5. **Collect**: driver sends Stop, joins worker logs into `benchmark_logs/`. + +> The "build on the driver, then distribute and run" split is a workaround: +> we don't yet have a real distributed SelectHead/BuildHead implementation, so +> Phase 1 is single-node-with-shared-TiKV. The `BuildOnly=true` / +> `RebuildSSDOnly=true` / `SkipSaveLoadCycles=true` / +> `tikv_switch_to_nocache` / `drop_caches` choreography exists because of +> this split; it is not a feature of the steady-state design. + +Useful environment overrides (see the header of `run_distributed.sh` for the +authoritative list): + +- `NOCACHE=1` — disable TiKV block cache, OS pagecache, and + `VersionCacheMaxChunks` for the search/insert phase. +- `BUILD_WITH_CACHE=1` — build with caches enabled, then drop caches before + search/insert (requires `NOCACHE=1`). Used at 100M scale where building + under nocache is impractical. +- `SKIP_TIKV_SWAP=1` — with `BUILD_WITH_CACHE`, skip the destructive TiKV + container restart that has corrupted recall at 100M scale. Relies on + drop_caches + `VersionCacheMaxChunks=0` for nocache semantics. +- `SKIP_SAVE_LOAD=1` — skip the post-build SaveIndex / per-batch + Load+Clone+Save cycle (`SkipSaveLoadCycles=true`). Required at 100M scale. +- `SKIP_HEAD_BUILD=1` — reuse existing HeadIndex if present + (`RebuildSSDOnly=true`); falls back to full build if HeadIndex is missing. + +## Step 5 — Stop / cleanup + +```bash +./evaluation/distributed/run_distributed.sh stop-tikv my_cluster.conf +./evaluation/distributed/run_distributed.sh cleanup my_cluster.conf # remove deployed files +``` + +## Key knobs in `benchmark_insert_dominant_template.ini` + +| Key | Value | Meaning | +| --- | --- | --- | +| `BaseVectorCount` | 1_000_000 | Initial index build size. | +| `InsertVectorCount` / `BatchNum` | 10_000_000 / 10 | 10 batches × 1M inserts. | +| `NumSearchThreads` | 4 | Threads for the standalone post-batch query benchmark. | +| `NumInsertThreads` | 16 | Threads driving `AddIndex` calls on the driver. | +| `AppendThreadNum` | 144 | Async append worker pool size — overprovisioned (≈3× cores) because each thread is I/O-bound on TiKV RPCs, so high concurrency increases in-flight RPCs. | +| `NumSearchDuringInsertThreads` | 1 | Concurrent search threads while inserting (continuous loop, ~1s sleep per query). | +| `NumQueries` | 200 | Size of the rotating query pool (in-insert search loops over it). | +| `WorkerTimeout` | 14400 | Seconds a worker waits for the driver before exiting. | +| `Storage` / `TiKVKeyPrefix` / `TiKVPDAddresses` | `TIKVIO` / filled / filled | Filled by `run_distributed.sh` from `cluster.conf`. | +| `Layers` | 2 | SPANN multi-layer head. | +| `BuildSSDIndex.UseMultiChunkPosting` | false | Single-key posting layout (one TiKV value per head). | +| `BuildSSDIndex.PostingPageLimit` | 8 | Posting page limit; runtime cap is logged as ~246 vectors. | +| `BuildSSDIndex.PostingCountCacheCapacity` | 1_000_000 | Posting-count cache capacity. | +| `BuildSSDIndex.DistributedVersionMap` | true | Use TiKV-backed distributed version map. | +| `BuildSSDIndex.ReassignK` | 64 | Split/reassign target fanout knob. | +| `BuildSSDIndex.AsyncMergeInSearch` | true | Async merge during search. | +| `BuildSSDIndex.VersionCacheMaxChunks` | 100_000 | Local version-chunk cache (set ≤0 to disable). | +| `BuildSSDIndex.LatencyLimit` | 100 | ms latency cap fed to SPANN. | +| `BuildSSDIndex.MaxCheck` | 8192 | Max posting checks per query. | +| `BuildSSDIndex.SearchInternalResultNum` | 64 | Internal candidate count during search. | + +## Output JSON structure (per batch) + +For each insert batch, `output.json/results.benchmark1_insert.batch_N` contains: + +- `Load timeSeconds` / `Load vectorCount` — reload of previous batch. +- `Clone timeSeconds`. +- In-insert concurrent search stats (continuous-loop variant): + `numQueries` (actual count issued), `meanLatency`, `p50/p90/p95/p99`, `qps`, + `batch barrier waitSeconds`. +- `inserted`, `insert timeSeconds`, `insert throughput`. +- `search` and `search_round2` — standalone `BenchmarkQueryPerformance` results + against the post-batch index (cold + warm), independent of the in-insert numbers. +- `save timeSeconds`. + +Pre-insert baseline lives at `results.benchmark0_query_before_insert` and +`results.benchmark0b_query_before_insert_round2`. + +## Dispatch Protocol + +The TCP dispatch protocol replaces file-based barriers. Communication flows through +PostingRouter's existing TCP transport: + +| Packet | Direction | Purpose | +|--------|-----------|---------| +| `DispatchCommand (0x09)` | Driver → Worker | Search/Insert/Stop with `dispatchId` + round. | +| `DispatchResult (0x89)` | Worker → Driver | Status + wallTime for aggregation. | + +- **Search**: Driver broadcasts to workers, runs local queries in parallel, collects + wall times for percentile stats. +- **Insert**: Driver broadcasts batch index, workers insert their shard, driver + waits for all to finish. +- **Stop**: Driver sends at end of benchmark; workers exit gracefully. + +Each command has a unique `dispatchId` (monotonic uint64) to avoid round collisions +between search and insert operations. + +## Troubleshooting + +- **Workers don't connect**: confirm `RouterNodeAddrs` ports (default 30001+) are + reachable between every pair of nodes — the router uses TCP with 2 io_context + threads. +- **TiKV timeout**: ensure each node's PD `advertise-client-urls` use a reachable + IP (not 127.0.0.1) — `start-tikv` sets this from `cluster.conf`. Check + `docker logs sptag-pd-0` on the affected node. +- **Worker exits prematurely**: check the worker logs in `benchmark_logs/`. + Common causes: TiKV not ready, index path mismatch, router connection failure. +- **Build fails on Java wrapper**: pre-existing issue unrelated to the benchmark. + Build only what's needed: + ```bash + cmake --build . --target SPTAGTest -j$(nproc) + ``` diff --git a/evaluation/distributed/configs/benchmark_100m_template.ini b/evaluation/distributed/configs/benchmark_100m_template.ini new file mode 100644 index 000000000..4a69f39a4 --- /dev/null +++ b/evaluation/distributed/configs/benchmark_100m_template.ini @@ -0,0 +1,71 @@ +; 100m: 99M base + 1M insert (insert is ~1% of base, "freshness / steady-state" workload). +; 100× larger base index than insert_dominant. Tests how the system behaves when +; the head index is large (~tens of millions of heads on layer 0) and the insert +; rate is moderate. Layers=2, L2 distance, SIFT1B dataset. +; +; Multi-machine deployment: run_distributed.sh fills PLACEHOLDER fields from +; cluster.conf (IndexPath, TiKVKeyPrefix, TiKVPDAddresses, [Distributed] addrs). +; +; Notes for 100M-scale operation: +; - First run MUST build the index (Rebuild=true). Build of 99M base takes hours; +; reuse with Rebuild=false on subsequent runs and SKIP_HEAD_BUILD=1 if the +; HeadIndex on disk is intact. +; - Truth (top-5 over 99M) is recomputed at start each run; expect ~minutes. +; - SaveIndex at 100M has been observed to hang in BG-job-drain on some hosts; +; use SKIP_SAVE_LOAD=1 when iterating to bypass the per-batch save/load cycle. +; - TiKV data will grow to ~50-100GB per store at this scale; both nodes need +; plenty of NVMe headroom (verified: driver has 6.2T, worker has 691G). +[Benchmark] +WorkerTimeout=14400 +VectorPath=/mnt/nvme/sift1b/bigann_base.u8bin +QueryPath=/mnt/nvme/sift1b/query.10K.u8bin +TruthPath=truth +IndexPath=PLACEHOLDER +ValueType=UInt8 +Dimension=128 +BaseVectorCount=99000000 +InsertVectorCount=1000000 +DeleteVectorCount=0 +BatchNum=1 +TopK=5 +NumSearchThreads=4 +NumInsertThreads=4 +AppendThreadNum=16 +NumSearchDuringInsertThreads=1 +NumQueries=200 +DistMethod=L2 +Rebuild=true +BuildOnly=false +Resume=-1 +Layers=2 + +Storage=TIKVIO +TiKVPDAddresses=PLACEHOLDER +TiKVKeyPrefix=PLACEHOLDER + +[SelectHead] +ParallelBKTBuild=true + +[BuildHead] +ParallelBKTBuild=true + +[BuildSSDIndex] +LatencyLimit=100 +MaxCheck=8192 +SearchInternalResultNum=64 +UseMultiChunkPosting=false +PostingPageLimit=8 +PostingCountCacheCapacity=10000000 +SearchCheckVersionMapOnlyLayer0=true +DistributedVersionMap=true +ReassignK=64 +AsyncMergeInSearch=true +VersionCacheMaxChunks=1000000 +AsyncRpcMaxInflight=512 + +[Distributed] +Enabled=true +DispatcherAddr=PLACEHOLDER +WorkerAddrs=PLACEHOLDER +StoreAddrs=PLACEHOLDER +PDAddrs=PLACEHOLDER diff --git a/evaluation/distributed/configs/benchmark_10m_template.ini b/evaluation/distributed/configs/benchmark_10m_template.ini new file mode 100644 index 000000000..f40203559 --- /dev/null +++ b/evaluation/distributed/configs/benchmark_10m_template.ini @@ -0,0 +1,62 @@ +; 10m: 9M base + 1M insert (insert is ~10% of base, "growing-index" workload). +; 10× larger base index than insert_dominant, 10× smaller than 100m. +; Useful for validating scaling between 1M and 100M without paying the +; multi-hour build cost of 100m. Layers=2, L2 distance, SIFT1B dataset +; (truncated to 10M of the 1B available). +; +; Multi-machine deployment: run_distributed.sh fills PLACEHOLDER fields from +; cluster.conf (IndexPath, TiKVKeyPrefix, TiKVPDAddresses, [Distributed] addrs). +[Benchmark] +WorkerTimeout=14400 +VectorPath=/mnt/nvme/sift1b/bigann_base.u8bin +QueryPath=/mnt/nvme/sift1b/query.10K.u8bin +TruthPath=truth +IndexPath=PLACEHOLDER +ValueType=UInt8 +Dimension=128 +BaseVectorCount=9000000 +InsertVectorCount=1000000 +DeleteVectorCount=0 +BatchNum=1 +TopK=5 +NumSearchThreads=4 +NumInsertThreads=4 +AppendThreadNum=16 +NumSearchDuringInsertThreads=1 +NumQueries=200 +DistMethod=L2 +Rebuild=true +BuildOnly=false +Resume=-1 +Layers=2 + +Storage=TIKVIO +TiKVPDAddresses=PLACEHOLDER +TiKVKeyPrefix=PLACEHOLDER + +[SelectHead] +ParallelBKTBuild=true + +[BuildHead] +ParallelBKTBuild=true + +[BuildSSDIndex] +LatencyLimit=100 +MaxCheck=8192 +SearchInternalResultNum=64 +UseMultiChunkPosting=false +PostingPageLimit=8 +PostingCountCacheCapacity=1000000 +SearchCheckVersionMapOnlyLayer0=true +DistributedVersionMap=true +ReassignK=64 +AsyncMergeInSearch=true +VersionCacheMaxChunks=1000000 +AsyncRpcMaxInflight=512 + +[Distributed] +Enabled=true +DispatcherAddr=PLACEHOLDER +WorkerAddrs=PLACEHOLDER +StoreAddrs=PLACEHOLDER +PDAddrs=PLACEHOLDER diff --git a/evaluation/distributed/configs/benchmark_insert_dominant_template.ini b/evaluation/distributed/configs/benchmark_insert_dominant_template.ini new file mode 100644 index 000000000..f8085c03b --- /dev/null +++ b/evaluation/distributed/configs/benchmark_insert_dominant_template.ini @@ -0,0 +1,58 @@ +; insert_dominant: 1M base + 1M insert with concurrent search-during-insert. +; Layers=2, L2 distance, SIFT1B dataset (truncated to 1M). +; +; Multi-machine deployment: run_distributed.sh fills PLACEHOLDER fields from +; cluster.conf (IndexPath, TiKVKeyPrefix, TiKVPDAddresses, [Distributed] addrs). +[Benchmark] +WorkerTimeout=14400 +VectorPath=/mnt/nvme/sift1b/bigann_base.u8bin +QueryPath=/mnt/nvme/sift1b/query.10K.u8bin +TruthPath=truth +IndexPath=PLACEHOLDER +ValueType=UInt8 +Dimension=128 +BaseVectorCount=1000000 +InsertVectorCount=1000000 +DeleteVectorCount=0 +BatchNum=1 +TopK=5 +NumSearchThreads=4 +NumInsertThreads=4 +AppendThreadNum=16 +NumSearchDuringInsertThreads=1 +NumQueries=200 +DistMethod=L2 +Rebuild=true +BuildOnly=false +Resume=-1 +Layers=2 + +Storage=TIKVIO +TiKVPDAddresses=PLACEHOLDER +TiKVKeyPrefix=PLACEHOLDER + +[SelectHead] +ParallelBKTBuild=true + +[BuildHead] +ParallelBKTBuild=true + +[BuildSSDIndex] +LatencyLimit=100 +MaxCheck=8192 +SearchInternalResultNum=64 +UseMultiChunkPosting=false +PostingPageLimit=8 +PostingCountCacheCapacity=1000000 +SearchCheckVersionMapOnlyLayer0=true +DistributedVersionMap=true +ReassignK=64 +AsyncMergeInSearch=true +VersionCacheMaxChunks=100000 + +[Distributed] +Enabled=true +DispatcherAddr=PLACEHOLDER +WorkerAddrs=PLACEHOLDER +StoreAddrs=PLACEHOLDER +PDAddrs=PLACEHOLDER diff --git a/evaluation/distributed/configs/cluster_2node.conf b/evaluation/distributed/configs/cluster_2node.conf new file mode 100644 index 000000000..f94500487 --- /dev/null +++ b/evaluation/distributed/configs/cluster_2node.conf @@ -0,0 +1,31 @@ +# 2-node cluster: driver/worker0 on dev-000003 (10.11.0.7), +# worker1 on dev-000006 (10.11.0.10). +# On 000006, /mnt/nvme is symlinked to /mnt_ssd/data7/sptag-bench (data lives on data7 NVMe). +# +# Cluster mode: SHARED TiKV raft cluster. Both PDs form one raft group; both +# TiKVs share the same cluster (max-replicas=1, so each region lives on +# exactly one store and PD routes reads to it). Compute nodes are stateless +# TiKV clients — no cross-compute fetch RPCs during RNGSelection. +[cluster] +ssh_user=superbench +ssh_key=/home/superbench/.ssh/id_rsa +sptag_dir=/home/superbench/zhangt/SPTAG +data_dir=/mnt/nvme +tikv_version=v8.5.1 +pd_version=v8.5.1 +# Image refs (optional). Defaults: +# tikv_image=sptag-tikv (with tag :${tikv_version}) +# pd_image=sptag-pd (with tag :${pd_version}) +# helper_image=mcr.microsoft.com/mirror/docker/library/ubuntu:22.04 +# Override here to use different registries / replace with pingcap/* etc. + +[nodes] +# host router_port +# node 0 (driver) router_port must differ from dispatcher port (hardcoded 30001). +10.11.0.7 30011 +10.11.0.10 30002 + +[tikv] +# host pd_client_port pd_peer_port tikv_port +10.11.0.7 23791 23801 20171 +10.11.0.10 23791 23801 20171 diff --git a/evaluation/distributed/configs/cluster_3node.conf b/evaluation/distributed/configs/cluster_3node.conf new file mode 100644 index 000000000..ff2ba8af4 --- /dev/null +++ b/evaluation/distributed/configs/cluster_3node.conf @@ -0,0 +1,34 @@ +# 3-node cluster: driver/worker0 on 172.27.0.4, +# worker1 on 172.27.0.5 (20.92.202.166), +# worker2 on 172.27.0.6 (20.5.138.158). +# Data lives on /mnt/md0 (NVMe RAID0, ~11T per node). +# +# Cluster mode: SHARED TiKV raft cluster. All PDs form one raft group; all +# TiKVs share the same cluster (max-replicas=1, so each region lives on +# exactly one store and PD routes reads to it). Compute nodes are stateless +# TiKV clients — no cross-compute fetch RPCs during RNGSelection. +[cluster] +ssh_user=azureuser +ssh_key=/home/azureuser/.ssh/id_rsa +sptag_dir=/home/azureuser/zhangt/SPTAG +data_dir=/mnt/md0 +tikv_version=v8.5.1 +pd_version=v8.5.1 +# Image refs (optional). Defaults: +# tikv_image=sptag-tikv (with tag :${tikv_version}) +# pd_image=sptag-pd (with tag :${pd_version}) +# helper_image=mcr.microsoft.com/mirror/docker/library/ubuntu:22.04 +# Override here to use different registries / replace with pingcap/* etc. + +[nodes] +# host router_port +# node 0 (driver) router_port must differ from dispatcher port (hardcoded 30001). +172.27.0.4 30011 +172.27.0.5 30002 +172.27.0.6 30003 + +[tikv] +# host pd_client_port pd_peer_port tikv_port +172.27.0.4 23791 23801 20171 +172.27.0.5 23791 23801 20171 +172.27.0.6 23791 23801 20171 diff --git a/evaluation/distributed/configs/tikv.toml b/evaluation/distributed/configs/tikv.toml new file mode 100755 index 000000000..4ba5282c0 --- /dev/null +++ b/evaluation/distributed/configs/tikv.toml @@ -0,0 +1,74 @@ +memory-usage-limit = "80GB" + +[server] +# v41: 16 → 32 to handle higher concurrent gRPC streams. 96-core host has +# plenty of headroom; previous setting was a default-y stab in the dark. +grpc-concurrency = 32 +grpc-memory-pool-quota = "16GB" + +[raftstore] +region-max-size = "512MB" +region-split-size = "384MB" +region-max-keys = 5120000 +region-split-keys = 3840000 +# v41: 4 → 32. apply-pool is the path raft-log → RocksDB writes go through. +# At 32 concurrent RMW ops per store (4 local insert + 16 receiver sub-workers +# + 4 search + 4 search-during-insert + misc), a 4-thread apply pool meant +# ~8× queue depth, which is the primary write-amp source we observed +# (TiKV at 7/96 cores while ops are still queueing). +apply-pool-size = 32 +# v41: 4 → 16. store-pool routes raft messages between peers and to apply. +store-pool-size = 16 +# v41: batch up raft entries per fsync. If we're disk-fsync bound (likely), +# this directly amortizes the sync cost. +raft-write-batch-size = "1MB" + +[storage] +reserve-space = "1GB" +# v41: 4 (default) → 16. KV scheduler is the front-end before raftstore. +scheduler-worker-pool-size = 16 + +[storage.block-cache] +capacity = "60GB" + +# v41: new section. Read pool default = 0.8×CPU = 76 on 96-core host, which +# would let reads steal CPU from writes. Cap at 32 to leave room for write +# path. Min 8 ensures reads stay responsive under light load. +[readpool.unified] +max-thread-count = 32 +min-thread-count = 8 + +[rocksdb] +max-background-jobs = 32 +max-sub-compactions = 8 +# v41: 8 dedicated flush threads (subset of max-background-jobs). Reduces +# the chance that compaction monopolizes background-jobs and starves flushes. +max-background-flushes = 8 +rate-bytes-per-sec = "0" + +[rocksdb.defaultcf] +# v41: 512MB → 1GB. Bigger memtable means fewer flushes (and thus fewer L0 +# files), reducing the chance of slowdown/stop write triggers under burst. +write-buffer-size = "1GB" +# v41: 5 → 8. More memtables = more headroom before flush back-pressure. +max-write-buffer-number = 8 +min-write-buffer-number-to-merge = 2 +level0-file-num-compaction-trigger = 12 +# v41: 28 → 40, 40 → 60. Loosen the L0 stall thresholds so bursts have more +# slack. With 10K-item chunks (v39+) we generate more small writes than v38 +# did, so we hit slowdown more often. +level0-slowdown-writes-trigger = 40 +level0-stop-writes-trigger = 60 +max-bytes-for-level-base = "2GB" +compression-per-level = ["no", "no", "no", "lz4", "lz4", "zstd", "zstd"] +target-file-size-base = "128MB" + +[rocksdb.writecf] +write-buffer-size = "128MB" +max-write-buffer-number = 5 + +[coprocessor] +region-max-size = "512MB" +region-split-size = "384MB" +region-max-keys = 5120000 +region-split-keys = 3840000 diff --git a/evaluation/distributed/run_distributed.sh b/evaluation/distributed/run_distributed.sh new file mode 100755 index 000000000..57f43f98b --- /dev/null +++ b/evaluation/distributed/run_distributed.sh @@ -0,0 +1,1338 @@ +#!/bin/bash +# Multi-machine distributed benchmark orchestrator for SPTAG. +# +# Usage: +# ./run_distributed.sh deploy Deploy binary + data to all nodes +# ./run_distributed.sh setup-bins Download tikv-server / pd-server to every node +# ./run_distributed.sh start-tikv [node_count] Start independent TiKV/PD instances +# ./run_distributed.sh stop-tikv [node_count] Stop TiKV/PD instances +# ./run_distributed.sh run Run benchmark +# ./run_distributed.sh bench [scale...] Run 1-node + N-node for each scale +# ./run_distributed.sh cleanup Remove deployed files from remote nodes +# +# Environment variables: +# NOCACHE=1 Disable all caches (TiKV block cache, OS page cache, VersionCache) +# BUILD_WITH_CACHE=1 (only with NOCACHE=1) Use cached TiKV+VersionCache during the +# build phase, then restart TiKV with nocache config and drop all +# OS caches before the search/insert phase. Useful for large scales +# (e.g. 100M) where building under nocache is impractical. +# SKIP_TIKV_SWAP=1 (only with BUILD_WITH_CACHE=1) Skip the TiKV container restart. +# Drop OS caches and rely on VersionCache=0 INI overrides for "nocache" +# semantics. Avoids docker rm -f corruption that has destroyed recall +# at 100M scale; TiKV block cache stays warm but contains mostly recent +# build writes (random search reads largely miss it anyway). +# SKIP_SAVE_LOAD=1 (only with NOCACHE=1) Bypass the post-build SaveIndex / per-batch +# LoadIndex / Clone / SaveIndex cycles. For 1-node, build+search+insert +# run in a single SPTAGTest process, dropping OS pagecache after build. +# For 2-node, the build phase skips the broken final SaveIndex (relies +# on the index files written during BuildLargeIndex). Required at 100M +# scale where SaveIndex's "wait for all background jobs to finish" loop +# never terminates and risks a gRPC SEGFAULT after several hours. +# VersionCache cannot be reset mid-process so it stays warm from build. +# SKIP_HEAD_BUILD=1 Reuse existing HeadIndex if present (RebuildSSDOnly). Falls back to +# full build if HeadIndex is missing. +# +# Prerequisites: +# - Passwordless SSH from driver to all nodes (configure ssh_key in cluster.conf) +# - Docker installed on all nodes (for TiKV) +# - cluster.conf configured (see cluster.conf.example) +# +# The driver (first node in [nodes]) orchestrates everything. +# Compute nodes share a single TiKV raft cluster: all PDs join one raft group, +# all TiKVs point to all PDs, max-replicas=1 (no replication, each region on +# exactly one store). With 2 nodes this gives 2 PDs + 2 TiKV stores in one +# cluster; any compute can read any posting via PD-routed TiKV calls, so the +# distributed routing layer no longer needs to forward reads between computes. + +set -o pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +LOGDIR="$(cd "$SCRIPT_DIR/../.." && pwd)/benchmark_logs" +mkdir -p "$LOGDIR" + +# ─── Config Parsing ─── + +declare -a NODE_HOSTS NODE_ROUTER_PORTS +declare -a TIKV_HOSTS TIKV_PD_CLIENT_PORTS TIKV_PD_PEER_PORTS TIKV_PORTS +declare SSH_USER SPTAG_DIR DATA_DIR TIKV_VERSION PD_VERSION SSH_KEY +declare TIKV_IMAGE PD_IMAGE HELPER_IMAGE BIN_DIR MIRROR +TOTAL_NODES=0 + +parse_config() { + local CONF="$1" + if [ ! -f "$CONF" ]; then + echo "ERROR: Config file not found: $CONF" + exit 1 + fi + + local SECTION="" + + while IFS= read -r line || [ -n "$line" ]; do + # Strip comments and whitespace + line="${line%%#*}" + line="$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" + [ -z "$line" ] && continue + + # Section header + if [[ "$line" =~ ^\[(.+)\]$ ]]; then + SECTION="${BASH_REMATCH[1]}" + continue + fi + + case "$SECTION" in + cluster) + local key="${line%%=*}" + local val="${line#*=}" + case "$key" in + ssh_user) SSH_USER="$val" ;; + sptag_dir) SPTAG_DIR="$val" ;; + data_dir) DATA_DIR="$val" ;; + tikv_version) TIKV_VERSION="$val" ;; + pd_version) PD_VERSION="$val" ;; + tikv_image) TIKV_IMAGE="$val" ;; + pd_image) PD_IMAGE="$val" ;; + helper_image) HELPER_IMAGE="$val" ;; + bin_dir) BIN_DIR="$val" ;; + mirror) MIRROR="$val" ;; + ssh_key) SSH_KEY="$val" ;; + esac + ;; + nodes) + read -r host rport <<< "$line" + NODE_HOSTS+=("$host") + NODE_ROUTER_PORTS+=("$rport") + ;; + tikv) + read -r host pd_client pd_peer tikv_port <<< "$line" + TIKV_HOSTS+=("$host") + TIKV_PD_CLIENT_PORTS+=("$pd_client") + TIKV_PD_PEER_PORTS+=("$pd_peer") + TIKV_PORTS+=("$tikv_port") + ;; + esac + done < "$CONF" + + # Defaults + SSH_USER="${SSH_USER:-$(whoami)}" + TIKV_VERSION="${TIKV_VERSION:-v8.5.1}" + PD_VERSION="${PD_VERSION:-v8.5.1}" + # Single image used for ALL containers (PD, TiKV, helper). Stock MCR + # ubuntu:22.04 — never modified, never layered, so security scanners see + # only the MCR base image. TiKV / PD binaries are downloaded to the host + # at $BIN_DIR by `setup-bins` and bind-mounted into the container. + HELPER_IMAGE="${HELPER_IMAGE:-mcr.microsoft.com/mirror/docker/library/ubuntu:22.04}" + TIKV_IMAGE="${TIKV_IMAGE:-${HELPER_IMAGE}}" + PD_IMAGE="${PD_IMAGE:-${HELPER_IMAGE}}" + # Host path on every node where tikv-server / pd-server live. Populated + # by `setup-bins`. Mounted read-only into containers as /sptag-bin. + BIN_DIR="${BIN_DIR:-${SPTAG_DIR}/evaluation/distributed/bin}" + MIRROR="${MIRROR:-https://tiup-mirrors.pingcap.com}" + + # Expand ~ in ssh_key path + if [ -n "$SSH_KEY" ]; then + SSH_KEY="${SSH_KEY/#\~/$HOME}" + fi + + TOTAL_NODES=${#NODE_HOSTS[@]} + + if [ "$TOTAL_NODES" -lt 1 ]; then + echo "ERROR: No compute nodes defined in [nodes]" + exit 1 + fi + if [ ${#TIKV_HOSTS[@]} -lt 1 ]; then + echo "ERROR: No TiKV instances defined in [tikv]" + exit 1 + fi + + echo "Cluster config loaded:" + echo " Compute nodes: $TOTAL_NODES (driver: ${NODE_HOSTS[0]})" + echo " TiKV instances: ${#TIKV_HOSTS[@]}" + echo " SSH user: $SSH_USER" + echo " SSH key: ${SSH_KEY:-(none)}" + echo " SPTAG dir: $SPTAG_DIR" + echo " Data dir: $DATA_DIR" +} + +# ─── SSH Helpers ─── + +# Build SSH options string (key + host checking) +_ssh_opts() { + local opts="-o StrictHostKeyChecking=no -o ConnectTimeout=10" + if [ -n "$SSH_KEY" ]; then + opts+=" -i $SSH_KEY" + fi + echo "$opts" +} + +# Run command on remote host (or locally if it's the driver) +remote_exec() { + local host="$1"; shift + if [ "$host" = "${NODE_HOSTS[0]}" ] || [ "$host" = "localhost" ] || [ "$host" = "127.0.0.1" ]; then + eval "$@" + else + ssh $(_ssh_opts) "$SSH_USER@$host" "$@" + fi +} + +# rsync files to remote host +remote_sync() { + local host="$1" + local src="$2" + local dst="$3" + if [ "$host" = "${NODE_HOSTS[0]}" ] || [ "$host" = "localhost" ]; then + # Local copy — skip if same path + if [ "$(realpath "$src")" != "$(realpath "$dst")" ]; then + rsync -az --progress "$src" "$dst" + fi + else + rsync -az --progress -e "ssh $(_ssh_opts)" "$src" "$SSH_USER@$host:$dst" + fi +} + +# ─── Deploy ─── + +cmd_deploy() { + echo "" + echo "=== Deploying SPTAG to ${#NODE_HOSTS[@]} nodes ===" + echo "" + + # Validate SSH connectivity + for host in "${NODE_HOSTS[@]}"; do + if [ "$host" = "${NODE_HOSTS[0]}" ]; then continue; fi + echo -n " Checking SSH to $host... " + if remote_exec "$host" "echo ok" >/dev/null 2>&1; then + echo "OK" + else + echo "FAILED" + echo "ERROR: Cannot SSH to $SSH_USER@$host" + exit 1 + fi + done + + # Deploy binary to all remote nodes + echo "" + echo "Deploying binary..." + local BINARY="$SPTAG_DIR/Release/SPTAGTest" + if [ ! -f "$BINARY" ]; then + echo "ERROR: Binary not found: $BINARY (run cmake build first)" + exit 1 + fi + + for host in "${NODE_HOSTS[@]}"; do + if [ "$host" = "${NODE_HOSTS[0]}" ]; then continue; fi + echo " → $host:$SPTAG_DIR/Release/" + remote_exec "$host" "mkdir -p $SPTAG_DIR/Release" + remote_sync "$host" "$BINARY" "$SPTAG_DIR/Release/SPTAGTest" + # Also deploy any shared libraries + if ls "$SPTAG_DIR/Release/"*.so 2>/dev/null; then + remote_sync "$host" "$SPTAG_DIR/Release/*.so" "$SPTAG_DIR/Release/" + fi + # Deploy bundled runtime libs (boost 1.73 / abseil / tbb / libstdc++) + # used by SPTAGTest. Not committed; produced locally on the driver. + if [ -d "$SPTAG_DIR/Release/runtime_libs" ]; then + remote_exec "$host" "mkdir -p $SPTAG_DIR/Release/runtime_libs" + rsync -az -e "ssh $(_ssh_opts)" \ + "$SPTAG_DIR/Release/runtime_libs/" \ + "$SSH_USER@$host:$SPTAG_DIR/Release/runtime_libs/" + fi + done + + # perftest_* data files are generated by SPTAGTest at runtime in SCRATCH_DIR + # and rsynced by distribute_perftest_files() during cmd_run, so cmd_deploy + # no longer needs to push them. (Pushing here also wouldn't know which + # scale's SCRATCH_DIR to source from.) + + echo "" + echo "Deploy complete." +} + +# ─── TiKV/PD Binary Setup ─── + +setup_bins_one_host() { + # Ensure tikv-server / pd-server are present at $BIN_DIR on $1. + # Downloads from $MIRROR if missing or version mismatch. Idempotent. + local host="$1" + local cmd + # shellcheck disable=SC2016 + cmd='set -e + mkdir -p "'"$BIN_DIR"'" + cd "'"$BIN_DIR"'" + need_tikv=1 + if [ -x tikv-server ] && ./tikv-server --version 2>/dev/null | grep -q "Release Version:[[:space:]]*'"${TIKV_VERSION#v}"'"; then + need_tikv=0 + fi + if [ "$need_tikv" = "1" ]; then + echo " Downloading tikv-'"${TIKV_VERSION}"'..." + curl -fsSL "'"${MIRROR}"'/tikv-'"${TIKV_VERSION}"'-linux-amd64.tar.gz" | tar -xz + chmod +x tikv-server + else + echo " tikv-'"${TIKV_VERSION}"' already present" + fi + need_pd=1 + if [ -x pd-server ] && ./pd-server --version 2>/dev/null | grep -q "Release Version:[[:space:]]*'"${PD_VERSION}"'"; then + need_pd=0 + fi + if [ "$need_pd" = "1" ]; then + echo " Downloading pd-'"${PD_VERSION}"'..." + curl -fsSL "'"${MIRROR}"'/pd-'"${PD_VERSION}"'-linux-amd64.tar.gz" | tar -xz + chmod +x pd-server pd-ctl pd-recover 2>/dev/null || true + else + echo " pd-'"${PD_VERSION}"' already present" + fi' + + if [ "$host" = "${NODE_HOSTS[0]}" ] || [ "$host" = "localhost" ] || [ "$host" = "127.0.0.1" ]; then + bash -c "$cmd" + else + remote_exec "$host" "$cmd" + fi +} + +cmd_setup_bins() { + # Download tikv-server + pd-server to ${BIN_DIR} on every distinct host + # used by the cluster (compute nodes ∪ tikv nodes). Idempotent. + echo "" + echo "=== Setting up TiKV/PD binaries ===" + echo " BIN_DIR : $BIN_DIR" + echo " TIKV : $TIKV_VERSION" + echo " PD : $PD_VERSION" + echo " MIRROR : $MIRROR" + + declare -A seen + local -a hosts=() + local h + for h in "${NODE_HOSTS[@]}" "${TIKV_HOSTS[@]}"; do + if [ -z "${seen[$h]:-}" ]; then + seen[$h]=1 + hosts+=("$h") + fi + done + + for h in "${hosts[@]}"; do + echo "" + echo "→ $h" + setup_bins_one_host "$h" + done + + echo "" + echo "Binary setup complete." +} + +# ─── TiKV Management (Independent Mode) ─── + + +tikv_start() { + # Start the first PD+TiKV pairs. + # + # node_count == 1: standalone PD + TiKV (1-node benchmarks). + # node_count >= 2: SHARED raft cluster — all PDs join one raft group, + # all TiKVs point to all PDs. max-replicas=1 so each + # region lives on exactly one store; PD routes reads + # to whichever store has the region. + local node_count="${1:-${#TIKV_HOSTS[@]}}" + echo "" + if [ "$node_count" -le 1 ]; then + echo "=== Starting 1 standalone TiKV instance ===" + else + echo "=== Starting $node_count-node SHARED TiKV raft cluster ===" + fi + + # Ensure binaries are present on every host that will run a container. + # Cheap if already there (version-grep, no download). + local i_host + for (( i_host=0; i_host/dev/null | tr -d '[:space:]') + fi + if [ "$present" != "yes" ]; then + echo " → $h: binaries missing, running setup-bins" + setup_bins_one_host "$h" + fi + done + + # Build the initial-cluster string used by every PD. + # For 1-node it's a single-member raft; for N>=2 every PD lists all members. + local initial_cluster="" + for (( i=0; i= 2 they form a raft group. + echo "Starting PD instances (initial-cluster=${initial_cluster})..." + for (( i=0; i/dev/null; \ + docker run -d --name sptag-pd-$i --net host \ + -v $DATA_DIR/tikv-data/pd-$i:/data \ + -v ${BIN_DIR}:/sptag-bin:ro \ + --entrypoint /sptag-bin/pd-server \ + ${PD_IMAGE} \ + --name=${pd_name} \ + --data-dir=/data \ + --client-urls=http://0.0.0.0:${client_port} \ + --advertise-client-urls=http://${host}:${client_port} \ + --peer-urls=http://0.0.0.0:${peer_port} \ + --advertise-peer-urls=http://${host}:${peer_port} \ + --initial-cluster=${initial_cluster}" + done + + echo "Waiting for PD raft to form..." + sleep 5 + + # Wait until every PD reports the expected member count (raft quorum up). + for (( i=0; i/dev/null \ + | python3 -c "import sys,json; d=json.load(sys.stdin); print(len(d.get('members',[])))" 2>/dev/null || echo 0) + if [ "$members" -ge "$node_count" ]; then + echo " PD $i ($host:$pd_port) healthy (members=${members})" + break + fi + if [ "$attempt" -eq 60 ]; then + echo " ERROR: PD $i ($host:$pd_port) only sees ${members}/${node_count} members after 60s" + return 1 + fi + sleep 1 + done + done + + # NOTE: max-replicas is configured AFTER TiKV starts (see below). Setting + # placement rules requires cluster bootstrap, which only happens once a + # TiKV store joins. Before bootstrap, /pd/api/v1/config/rule returns 500 + # ErrNotBootstrapped. We rely on the fact that no data is written until + # SPTAGTest connects (which happens after this function returns), so the + # brief window where bootstrap uses default max-replicas=3 is harmless. + + # Start TiKV instances pointing at the shared PD endpoints. + echo "Starting TiKV instances (pd-endpoints=${pd_endpoints})..." + for (( i=0; i/dev/null; \ + docker run -d --name sptag-tikv-$i --net host \ + --ulimit nofile=1048576:1048576 \ + -v $DATA_DIR/tikv-data/tikv-$i:/data \ + -v $DATA_DIR/tikv-data/conf:/conf \ + -v ${BIN_DIR}:/sptag-bin:ro \ + --entrypoint /sptag-bin/tikv-server \ + ${TIKV_IMAGE} \ + --config=/conf/tikv.toml \ + --addr=0.0.0.0:${tikv_port} \ + --advertise-addr=${host}:${tikv_port} \ + --data-dir=/data \ + --pd-endpoints=${pd_endpoints}" + done + + echo "Waiting for TiKV stores to register..." + sleep 5 + + # All stores show up in PD's store list (any PD works — they share state). + local pd_host="${TIKV_HOSTS[0]}" + local pd_port_first="${TIKV_PD_CLIENT_PORTS[0]}" + for attempt in $(seq 1 60); do + local store_count + store_count=$(curl -sf "http://${pd_host}:${pd_port_first}/pd/api/v1/stores" 2>/dev/null \ + | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('count',0))" 2>/dev/null || echo 0) + if [ "$store_count" -ge "$node_count" ]; then + echo " All ${store_count} TiKV stores registered" + break + fi + if [ "$attempt" -eq 60 ]; then + echo " WARNING: only ${store_count}/${node_count} TiKV stores registered after 60s" + fi + sleep 1 + done + + # Set max-replicas=1 on the shared cluster, NOW that cluster is bootstrapped. + # + # PD v6+ defaults to enable-placement-rules=true. The authoritative source + # for replica count is then the default placement rule, NOT the legacy + # max-replicas config. /config POST auto-syncs to the rule but is racy; + # we explicitly POST the rule too. Both endpoints require bootstrap. + # Bug seen v45: skipping this caused 30%+ of a 1-node run to execute with + # max-replicas=3 → PD endlessly tried to schedule replicas onto 1 store + # → constant region state changes → gRPC Deadline / region_error storm. + echo "Setting max-replicas=1 (default placement rule)..." + local target_replicas=1 + local mr_ok=0 + for attempt in $(seq 1 30); do + curl -sf "http://${pd_host}:${pd_port_first}/pd/api/v1/config" \ + -X POST -d "{\"max-replicas\": ${target_replicas}}" >/dev/null 2>&1 || true + curl -sf "http://${pd_host}:${pd_port_first}/pd/api/v1/config/rule" \ + -X POST -d "{\"group_id\":\"pd\",\"id\":\"default\",\"start_key\":\"\",\"end_key\":\"\",\"role\":\"voter\",\"count\":${target_replicas}}" \ + >/dev/null 2>&1 || true + sleep 1 + local got_cfg + got_cfg=$(curl -sf "http://${pd_host}:${pd_port_first}/pd/api/v1/config/replicate" 2>/dev/null \ + | python3 -c 'import sys,json;print(json.load(sys.stdin).get("max-replicas"))' 2>/dev/null) + local got_rule + got_rule=$(curl -sf "http://${pd_host}:${pd_port_first}/pd/api/v1/config/rule/pd/default" 2>/dev/null \ + | python3 -c 'import sys,json;print(json.load(sys.stdin).get("count"))' 2>/dev/null) + if [ "$got_cfg" = "$target_replicas" ] && [ "$got_rule" = "$target_replicas" ]; then + echo " max-replicas=${target_replicas} set (attempt $attempt, config & rule verified)" + mr_ok=1 + break + fi + sleep 1 + done + if [ "$mr_ok" != "1" ]; then + echo " ERROR: Failed to set max-replicas=${target_replicas} after 30 attempts. Aborting." >&2 + return 1 + fi + + echo "TiKV cluster started ($node_count node(s))." +} + +tikv_stop() { + # Stop the first TiKV+PD instances. + local node_count="${1:-${#TIKV_HOSTS[@]}}" + echo "" + echo "=== Stopping $node_count TiKV instances ===" + + for (( i=0; i/dev/null || true" + done + + echo "TiKV instances stopped." +} + +tikv_switch_to_nocache() { + # Restart TiKV containers (NOT PD) with the nocache config, so that the search + # and insert phases use cold block cache. Data on disk is preserved because we + # reuse the same data-dir; PD keeps the cluster metadata. + local node_count="${1:-${#TIKV_HOSTS[@]}}" + if [[ ! -f "$SCRIPT_DIR/configs/tikv_nocache.toml" ]]; then + echo " ERROR: configs/tikv_nocache.toml not found; cannot switch to nocache" + return 1 + fi + echo "" + echo "=== Restarting $node_count TiKV instances with tikv_nocache.toml ===" + + # Reconstruct the shared pd-endpoints list (same as tikv_start). + local pd_endpoints="" + for (( i=0; i/dev/null; \ + docker rm -f sptag-tikv-$i 2>/dev/null; \ + docker run -d --name sptag-tikv-$i --net host \ + --ulimit nofile=1048576:1048576 \ + -v $DATA_DIR/tikv-data/tikv-$i:/data \ + -v $DATA_DIR/tikv-data/conf:/conf \ + -v ${BIN_DIR}:/sptag-bin:ro \ + --entrypoint /sptag-bin/tikv-server \ + ${TIKV_IMAGE} \ + --config=/conf/tikv.toml \ + --addr=0.0.0.0:${tikv_port} \ + --advertise-addr=${host}:${tikv_port} \ + --data-dir=/data \ + --pd-endpoints=${pd_endpoints}" + done + + echo "Waiting for TiKV stores to re-register..." + sleep 5 + local pd_host_first="${TIKV_HOSTS[0]}" + local pd_port_first="${TIKV_PD_CLIENT_PORTS[0]}" + for attempt in $(seq 1 60); do + local store_count + store_count=$(curl -sf "http://${pd_host_first}:${pd_port_first}/pd/api/v1/stores" 2>/dev/null \ + | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('count',0))" 2>/dev/null || echo 0) + if [ "$store_count" -ge "$node_count" ]; then + echo " All ${store_count} TiKV stores re-registered" + break + fi + if [ "$attempt" -eq 60 ]; then + echo " WARNING: only ${store_count}/${node_count} stores re-registered after 60s" + fi + sleep 1 + done + echo "TiKV switched to nocache mode." +} + +tikv_clean() { + # Clean TiKV data for the first instances. + local node_count="${1:-${#TIKV_HOSTS[@]}}" + echo "" + echo "=== Cleaning TiKV data ($node_count instances) ===" + + for (( i=0; i/dev/null || true" + done +} + +# Legacy wrappers for the main case block +cmd_start_tikv() { tikv_start "${1:-${#TIKV_HOSTS[@]}}"; } +cmd_stop_tikv() { tikv_stop "${1:-${#TIKV_HOSTS[@]}}"; } + +# ─── Cache Management ─── + +drop_all_caches() { + # Drop OS page cache + dentries/inodes on the first nodes. + # This may take 30-60s per node if there are many dirty pages. + local node_count="${1:-1}" + if [[ "${SKIP_DROP_CACHES:-0}" == "1" ]]; then + echo "[SKIP_DROP_CACHES=1] skipping OS page-cache drop on $node_count node(s)" + return 0 + fi + echo "Dropping OS page cache on $node_count node(s) (timeout 10s per node)..." + for (( i=0; i /proc/sys/vm/drop_caches'" && echo "done" || echo "timeout/failed (non-fatal)" + done + echo "Cache drop complete." +} + +# ─── INI Generation ─── + +generate_ini() { + # Generate a benchmark INI from a template, filling in [Distributed] fields. + # Usage: generate_ini [overrides...] + local SCALE="$1" + local NODE_COUNT="$2" + shift 2 + + local IDX_PATH="$DATA_DIR/proidx_${SCALE}_${NODE_COUNT}node/spann_index" + local KEY_PREFIX="bench${SCALE}_${NODE_COUNT}node" + + # Build comma-separated address lists from the first node_count entries + local dispatcher_addr="${NODE_HOSTS[0]}:30001" + local worker_addrs="" store_addrs="" pd_addrs="" + for (( i=0; i&2 + return 1 + fi + + local OUT="$SCRIPT_DIR/configs/benchmark_${SCALE}_${NODE_COUNT}node.ini" + cp "$BASE_INI" "$OUT" + + # Fill in placeholder fields + sed -i "s|^IndexPath=.*|IndexPath=${IDX_PATH}|" "$OUT" + sed -i "s|^TiKVKeyPrefix=.*|TiKVKeyPrefix=${KEY_PREFIX}|" "$OUT" + sed -i "s|^DispatcherAddr=.*|DispatcherAddr=${dispatcher_addr}|" "$OUT" + sed -i "s|^WorkerAddrs=.*|WorkerAddrs=${worker_addrs}|" "$OUT" + sed -i "s|^StoreAddrs=.*|StoreAddrs=${store_addrs}|" "$OUT" + sed -i "s|^PDAddrs=.*|PDAddrs=${pd_addrs}|" "$OUT" + + # Apply extra overrides (key=value pairs) + for override in "$@"; do + local key="${override%%=*}" + local val="${override#*=}" + if grep -q "^${key}=" "$OUT"; then + sed -i "s|^${key}=.*|${key}=${val}|" "$OUT" + else + # Append to [Benchmark] section + sed -i "/^\[Benchmark\]/a ${key}=${val}" "$OUT" + fi + done + + echo "$OUT" +} + +# ─── Worker Management ─── + +WORKER_SSH_PIDS=() + +start_remote_worker() { + # Start a worker on a remote node. Returns immediately; worker runs in background. + local NODE_IDX="$1" + local INI="$2" + local SCALE="$3" + local NODE_COUNT="$4" + local host="${NODE_HOSTS[$NODE_IDX]}" + local LOG="$LOGDIR/benchmark_${SCALE}_${NODE_COUNT}node_worker${NODE_IDX}.log" + local SCRATCH_DIR="$DATA_DIR/scratch_${SCALE}_${NODE_COUNT}node" + + # Ensure scratch dir exists on remote, then copy INI there. SPTAGTest's CWD + # is set to SCRATCH_DIR so TestDataGenerator's relative perftest_*.bin + # files land on the big NVMe disk, not on /. + remote_exec "$host" "mkdir -p $SCRATCH_DIR" + remote_sync "$host" "$INI" "$SCRATCH_DIR/worker_n${NODE_IDX}.ini" + + # Start worker via SSH (foreground on remote, background locally). + # Use `ssh -n` to redirect stdin from /dev/null so SSH doesn't try to + # acquire a TTY when the parent script runs under `nohup`. Without -n, + # the SSH client sometimes silently re-points fd1 → /dev/null and fd2 + # → a deleted /tmp file, dropping the worker log. + ssh -n $(_ssh_opts) "$SSH_USER@$host" \ + "cd $SCRATCH_DIR && LD_LIBRARY_PATH=$SPTAG_DIR/Release/runtime_libs:/usr/lib/x86_64-linux-gnu:\${LD_LIBRARY_PATH:-} \ + WORKER_INDEX=${NODE_IDX} BENCHMARK_CONFIG=worker_n${NODE_IDX}.ini \ + $SPTAG_DIR/Release/SPTAGTest --run_test=SPFreshTest/BenchmarkFromConfig 2>&1" \ + "$LOG" 2>&1 & + local ssh_pid=$! + WORKER_SSH_PIDS+=($ssh_pid) + echo " Worker n${NODE_IDX} on $host (SSH PID: $ssh_pid, log: $LOG)" +} + +stop_remote_workers() { + # Wait for workers to self-exit (driver sends TCP Stop), then force-kill. + local TIMEOUT=${1:-30} + if [ ${#WORKER_SSH_PIDS[@]} -eq 0 ]; then return; fi + + echo "Waiting for ${#WORKER_SSH_PIDS[@]} remote workers to exit (${TIMEOUT}s timeout)..." + for pid in "${WORKER_SSH_PIDS[@]}"; do + local elapsed=0 + while kill -0 "$pid" 2>/dev/null && [ $elapsed -lt $TIMEOUT ]; do + sleep 1 + elapsed=$((elapsed + 1)) + done + if kill -0 "$pid" 2>/dev/null; then + echo " WARNING: SSH PID $pid still alive, force killing" + kill -9 "$pid" 2>/dev/null || true + wait "$pid" 2>/dev/null || true + else + echo " Worker (SSH PID $pid) exited gracefully" + fi + done + WORKER_SSH_PIDS=() +} + +# Watchdog: detect driver death (segfault, OOM, SIGKILL by oom_killer, ...) +# and tear down remote workers so they don't linger forever. +# The C++ heartbeat watchdog inside the worker is the primary defense (bounded +# at HeartbeatTimeoutSec, default 180s). This shell watchdog is a faster +# secondary path: as soon as the driver PID is gone we (a) kill the local SSH +# wrappers and (b) `pkill` the remote SPTAGTest processes. +DRIVER_WATCHDOG_PID="" + +start_driver_watchdog() { + local DRIVER_PID="$1" + local NODE_COUNT="$2" + if [ "$NODE_COUNT" -lt 2 ]; then return; fi + if [ ${#WORKER_SSH_PIDS[@]} -eq 0 ]; then return; fi + + # Snapshot what we need before backgrounding (subshell forks current env). + local _ssh_pids="${WORKER_SSH_PIDS[*]}" + local _hosts=() + for (( i=1; i/dev/null; do + sleep 5 + done + echo "[watchdog] Driver PID $DRIVER_PID is gone; tearing down remote workers" >&2 + for pid in $_ssh_pids; do + kill -TERM "$pid" 2>/dev/null || true + done + for host in $_hosts_str; do + ssh -n $_ssh_opts_str "$_ssh_user@$host" \ + "pkill -TERM -f 'SPTAGTest.*BenchmarkFromConfig' 2>/dev/null; \ + sleep 5; \ + pkill -KILL -f 'SPTAGTest.*BenchmarkFromConfig' 2>/dev/null; true" \ + /dev/null 2>&1 || true + done + for pid in $_ssh_pids; do + kill -0 "$pid" 2>/dev/null && kill -KILL "$pid" 2>/dev/null || true + done + ) & + DRIVER_WATCHDOG_PID=$! + echo " Driver watchdog started (PID: $DRIVER_WATCHDOG_PID, monitoring driver $DRIVER_PID)" +} + +stop_driver_watchdog() { + if [ -n "$DRIVER_WATCHDOG_PID" ] && kill -0 "$DRIVER_WATCHDOG_PID" 2>/dev/null; then + kill -TERM "$DRIVER_WATCHDOG_PID" 2>/dev/null || true + wait "$DRIVER_WATCHDOG_PID" 2>/dev/null || true + fi + DRIVER_WATCHDOG_PID="" +} + +# ─── Benchmark Run ─── + +distribute_head_index() { + # Copy the head index from driver to all worker nodes. + local SCALE="$1" + local NODE_COUNT="$2" + local SRC="$DATA_DIR/proidx_${SCALE}_${NODE_COUNT}node/spann_index" + + echo "Distributing head index to $((NODE_COUNT - 1)) workers..." + for (( i=1; i +resolve_build_mode() { + local SCALE="$1" NODE_COUNT="$2" + local IDX_DIR="$DATA_DIR/proidx_${SCALE}_${NODE_COUNT}node/spann_index" + local HEAD_DIR="$IDX_DIR/HeadIndex" + + BUILD_MODE_OVERRIDES=() + if [[ "${SKIP_HEAD_BUILD:-0}" == "1" ]] && [ -d "$HEAD_DIR" ] && [ -n "$(ls -A "$HEAD_DIR" 2>/dev/null)" ]; then + echo "HeadIndex found at $HEAD_DIR — using RebuildSSDOnly (skip SelectHead+BuildHead)" + BUILD_MODE_OVERRIDES=("RebuildSSDOnly=true") + else + if [[ "${SKIP_HEAD_BUILD:-0}" == "1" ]]; then + echo "SKIP_HEAD_BUILD=1 but HeadIndex not found at $HEAD_DIR — falling back to full build" + fi + BUILD_MODE_OVERRIDES=("Rebuild=true") + fi +} + +cmd_run() { + local SCALE="$1" + local NODE_COUNT="$2" + if [ -z "$SCALE" ] || [ -z "$NODE_COUNT" ]; then + echo "Usage: $0 run " + exit 1 + fi + + local BINARY="$SPTAG_DIR/Release/SPTAGTest" + # SCRATCH_DIR is the CWD for SPTAGTest invocations on the driver and on + # all workers. TestDataGenerator writes its perftest_*.bin files (notably + # perftest_vector.bin which is ~Dim*BaseVectorCount bytes — 118GB at 1B) + # to CWD, so this must live on the big NVMe data disk, never on /. + local SCRATCH_DIR="$DATA_DIR/scratch_${SCALE}_${NODE_COUNT}node" + mkdir -p "$SCRATCH_DIR" + + echo "" + echo "═══════════════════════════════════════════════════" + echo " ${SCALE}: ${NODE_COUNT}-node benchmark${NOCACHE:+ [NOCACHE]}" + echo " Start: $(date)" + echo "═══════════════════════════════════════════════════" + + if [ "$NODE_COUNT" -eq 1 ]; then + # ─── Single-node flow ─── + echo "" + echo "--- Phase 0: Prepare TiKV (1 instance) ---" + tikv_stop 1 + tikv_clean 1 + if ! tikv_start 1; then + echo "ERROR: tikv_start failed; aborting benchmark." >&2 + return 1 + fi + + # Resolve build mode before cleaning (SKIP_HEAD_BUILD needs existing dir) + resolve_build_mode "$SCALE" "$NODE_COUNT" + + if [[ " ${BUILD_MODE_OVERRIDES[*]} " != *"RebuildSSDOnly=true"* ]]; then + # Full build: clean old index dir + rm -rf "$DATA_DIR/proidx_${SCALE}_1node" + fi + mkdir -p "$DATA_DIR/proidx_${SCALE}_1node" + + if [[ "${NOCACHE:-0}" == "1" ]]; then + # NOCACHE: Split into build + cache-drop + search + local BUILD_VERSIONCACHE_OVERRIDES=("VersionCacheTTLMs=0" "VersionCacheMaxChunks=0") + if [[ "${BUILD_WITH_CACHE:-0}" == "1" ]]; then + # Build phase keeps caches enabled; the run phase below switches to nocache + BUILD_VERSIONCACHE_OVERRIDES=() + echo "" + echo "--- Phase 1: Build only (BUILD_WITH_CACHE=1, caches enabled) ---" + else + echo "" + echo "--- Phase 1: Build only (NOCACHE) ---" + fi + + if [[ "${SKIP_SAVE_LOAD:-0}" == "1" ]]; then + # Single-process flow: build + search + insert in one SPTAGTest invocation. + # SkipSaveLoadCycles=true bypasses the broken post-build SaveIndex and per-batch + # Load/Clone/Save. SPTAGTest itself drops OS pagecache after build, before query. + echo "[SKIP_SAVE_LOAD=1] running build + search + insert in a single SPTAGTest process" + local SINGLE_INI + SINGLE_INI=$(generate_ini "$SCALE" 1 "${BUILD_MODE_OVERRIDES[@]}" \ + "SkipSaveLoadCycles=true" "${BUILD_VERSIONCACHE_OVERRIDES[@]}") || exit 1 + + ( cd "$SCRATCH_DIR" && LD_LIBRARY_PATH="$SPTAG_DIR/Release/runtime_libs:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}" BENCHMARK_CONFIG="$SINGLE_INI" \ + BENCHMARK_OUTPUT="output_${SCALE}_1node.json" \ + "$BINARY" --run_test=SPFreshTest/BenchmarkFromConfig 2>&1 ) \ + | tee "$LOGDIR/benchmark_${SCALE}_1node_driver.log" + + echo "Done: $(date)" + tikv_stop 1 + return 0 + fi + + local BUILD_INI + BUILD_INI=$(generate_ini "$SCALE" 1 "${BUILD_MODE_OVERRIDES[@]}" "BuildOnly=true" "${BUILD_VERSIONCACHE_OVERRIDES[@]}") || exit 1 + + ( cd "$SCRATCH_DIR" && LD_LIBRARY_PATH="$SPTAG_DIR/Release/runtime_libs:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}" BENCHMARK_CONFIG="$BUILD_INI" \ + BENCHMARK_OUTPUT="output_${SCALE}_1node_build.json" \ + "$BINARY" --run_test=SPFreshTest/BenchmarkFromConfig 2>&1 ) \ + | tee "$LOGDIR/benchmark_${SCALE}_1node_build.log" + + echo "Build done: $(date)" + + if [[ "${BUILD_WITH_CACHE:-0}" == "1" && "${SKIP_TIKV_SWAP:-0}" != "1" ]]; then + echo "" + echo "--- Phase 1.4: Switch TiKV to nocache config ---" + tikv_switch_to_nocache 1 + elif [[ "${SKIP_TIKV_SWAP:-0}" == "1" ]]; then + echo "[SKIP_TIKV_SWAP=1] keeping TiKV containers running; relying on drop_caches + VersionCache=0" + fi + + echo "" + echo "--- Phase 1.5: Drop all caches (NOCACHE) ---" + drop_all_caches 1 + + echo "" + echo "--- Phase 2: Search+Insert (cold cache) ---" + local RUN_INI + RUN_INI=$(generate_ini "$SCALE" 1 "Rebuild=false" "VersionCacheTTLMs=0" "VersionCacheMaxChunks=0") || exit 1 + + ( cd "$SCRATCH_DIR" && LD_LIBRARY_PATH="$SPTAG_DIR/Release/runtime_libs:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}" BENCHMARK_CONFIG="$RUN_INI" \ + BENCHMARK_OUTPUT="output_${SCALE}_1node.json" \ + "$BINARY" --run_test=SPFreshTest/BenchmarkFromConfig 2>&1 ) \ + | tee "$LOGDIR/benchmark_${SCALE}_1node_driver.log" + else + echo "" + echo "--- Phase 1: Single-node run ---" + local INI + INI=$(generate_ini "$SCALE" 1 "${BUILD_MODE_OVERRIDES[@]}") || exit 1 + + echo "Starting driver on ${NODE_HOSTS[0]}..." + ( cd "$SCRATCH_DIR" && LD_LIBRARY_PATH="$SPTAG_DIR/Release/runtime_libs:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}" BENCHMARK_CONFIG="$INI" \ + BENCHMARK_OUTPUT="output_${SCALE}_1node.json" \ + "$BINARY" --run_test=SPFreshTest/BenchmarkFromConfig 2>&1 ) \ + | tee "$LOGDIR/benchmark_${SCALE}_1node_driver.log" + fi + + echo "Done: $(date)" + tikv_stop 1 + else + # ─── Multi-node flow ─── + echo "" + echo "--- Phase 0: Prepare TiKV ($NODE_COUNT instances) ---" + tikv_stop "$NODE_COUNT" + tikv_clean "$NODE_COUNT" + if ! tikv_start "$NODE_COUNT"; then + echo "ERROR: tikv_start failed; aborting benchmark." >&2 + return 1 + fi + + # --- Phase 1: Build index on driver --- + echo "" + echo "--- Phase 1: Build index on driver ---" + local BUILD_INI + local NOCACHE_OVERRIDES=() + local BUILD_NOCACHE_OVERRIDES=() + if [[ "${NOCACHE:-0}" == "1" ]]; then + NOCACHE_OVERRIDES=("VersionCacheTTLMs=0" "VersionCacheMaxChunks=0" "WorkerTimeout=14400") + if [[ "${BUILD_WITH_CACHE:-0}" == "1" ]]; then + # Build with cache, only run phase is nocache + BUILD_NOCACHE_OVERRIDES=() + echo "[BUILD_WITH_CACHE=1] build phase keeps caches; will switch before run phase" + else + BUILD_NOCACHE_OVERRIDES=("${NOCACHE_OVERRIDES[@]}") + fi + fi + + # Resolve build mode before cleaning (SKIP_HEAD_BUILD needs existing dir) + resolve_build_mode "$SCALE" "$NODE_COUNT" + + if [[ " ${BUILD_MODE_OVERRIDES[*]} " != *"RebuildSSDOnly=true"* ]]; then + # Full build: clean old index dirs on all nodes + for (( i=0; i "$BUILD_LOG" 2>&1 & + local BUILD_PID=$! + echo " Driver build PID: $BUILD_PID" + + # Shell-side watchdog: if the driver dies unexpectedly (segfault, OOM, + # SIGKILL) we want a fast failure path rather than hanging forever. + WORKER_SSH_PIDS=() + start_driver_watchdog "$BUILD_PID" "$NODE_COUNT" + + # Wait for the driver build to finish + echo " Waiting for driver build to complete..." + wait "$BUILD_PID" + local BUILD_RC=$? + echo "Driver build done (exit=$BUILD_RC): $(date)" + stop_driver_watchdog + + if [[ $BUILD_RC -ne 0 ]] || grep -q "===== SEGFAULT" "$BUILD_LOG"; then + echo "" + echo "ERROR: Build phase failed (exit=$BUILD_RC, segfault=$(grep -c '===== SEGFAULT' "$BUILD_LOG"))" + echo "Refusing to proceed to run phase with broken build state." + echo "Tail of build log:" + tail -30 "$BUILD_LOG" + tikv_stop "$NODE_COUNT" + exit 1 + fi + + echo "Build done: $(date)" + + # --- Phase 2: Distribute data --- + echo "" + echo "--- Phase 2: Distribute head index + data ---" + rm -f "$DATA_DIR/proidx_${SCALE}_${NODE_COUNT}node/spann_index/checkpoint.txt" + + distribute_head_index "$SCALE" "$NODE_COUNT" + distribute_perftest_files "$SCALE" "$NODE_COUNT" + + # Sync SPTAGTest binary + bundled runtime libs to all workers so + # they pick up the latest compiled changes. (cmd_deploy is a separate + # subcommand; without this step a stale binary on the worker silently + # diverges from the driver.) + echo "" + echo "Syncing SPTAGTest binary + runtime_libs to workers..." + for host in "${NODE_HOSTS[@]}"; do + if [ "$host" = "${NODE_HOSTS[0]}" ]; then continue; fi + remote_exec "$host" "mkdir -p $SPTAG_DIR/Release" + remote_sync "$host" "$SPTAG_DIR/Release/SPTAGTest" "$SPTAG_DIR/Release/SPTAGTest" + if [ -d "$SPTAG_DIR/Release/runtime_libs" ]; then + remote_exec "$host" "mkdir -p $SPTAG_DIR/Release/runtime_libs" + rsync -az -e "ssh $(_ssh_opts)" \ + "$SPTAG_DIR/Release/runtime_libs/" \ + "$SSH_USER@$host:$SPTAG_DIR/Release/runtime_libs/" + fi + done + + # --- Phase 3: Start driver first (contains dispatcher), then workers --- + echo "" + + # Drop caches if NOCACHE mode + if [[ "${NOCACHE:-0}" == "1" ]]; then + if [[ "${BUILD_WITH_CACHE:-0}" == "1" && "${SKIP_TIKV_SWAP:-0}" != "1" ]]; then + echo "--- Phase 2.4: Switch TiKV to nocache config ---" + tikv_switch_to_nocache "$NODE_COUNT" + elif [[ "${SKIP_TIKV_SWAP:-0}" == "1" ]]; then + echo "[SKIP_TIKV_SWAP=1] keeping TiKV containers running; relying on drop_caches + VersionCache=0" + fi + echo "--- Phase 2.5: Drop all caches (NOCACHE) ---" + drop_all_caches "$NODE_COUNT" + fi + + echo "--- Phase 3: Distributed run ---" + + local RUN_INI + RUN_INI=$(generate_ini "$SCALE" "$NODE_COUNT" "Rebuild=false" "${NOCACHE_OVERRIDES[@]}") || exit 1 + + # Start driver in background first — it contains the dispatcher that + # workers need to connect to for ring registration. + local DRIVER_LOG="$LOGDIR/benchmark_${SCALE}_${NODE_COUNT}node_driver.log" + echo "Starting driver (dispatcher+worker0) on ${NODE_HOSTS[0]}..." + ( cd "$SCRATCH_DIR" && LD_LIBRARY_PATH="$SPTAG_DIR/Release/runtime_libs:/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}" BENCHMARK_CONFIG="$RUN_INI" \ + BENCHMARK_OUTPUT="output_${SCALE}_${NODE_COUNT}node.json" \ + "$BINARY" --run_test=SPFreshTest/BenchmarkFromConfig ) \ + > "$DRIVER_LOG" 2>&1 & + local DRIVER_PID=$! + echo " Driver PID: $DRIVER_PID" + + # Wait for dispatcher to start listening before launching workers + local DISP_PORT=30001 + echo " Waiting for dispatcher to listen on port $DISP_PORT..." + for attempt in $(seq 1 60); do + if ss -tlnp 2>/dev/null | grep -q ":${DISP_PORT} " || \ + netstat -tlnp 2>/dev/null | grep -q ":${DISP_PORT} "; then + echo " Dispatcher listening (${attempt}s)" + break + fi + if ! kill -0 "$DRIVER_PID" 2>/dev/null; then + echo " ERROR: Driver exited prematurely" + cat "$DRIVER_LOG" + return 1 + fi + if [ "$attempt" -eq 60 ]; then + echo " WARNING: Dispatcher not detected on port $DISP_PORT after 60s, proceeding anyway" + fi + sleep 1 + done + + # Now start remote workers — they can connect to the dispatcher + WORKER_SSH_PIDS=() + for (( i=1; i/dev/null || true + done + + tikv_stop "$NODE_COUNT" + fi + + echo "" + echo "═══════════════════════════════════════════════════" + echo " ${SCALE} ${NODE_COUNT}-node done: $(date)" + echo " Results: output_${SCALE}_${NODE_COUNT}node.json" + echo " Logs: $LOGDIR/benchmark_${SCALE}_${NODE_COUNT}node_*.log" + echo "═══════════════════════════════════════════════════" +} + +cmd_bench() { + # Run 1-node baseline + N-node distributed for each specified scale. + # Usage: cmd_bench [scale...] + # Special scale "all" expands to all scales with templates in configs/. + local scales=() + for arg in "$@"; do + if [ "$arg" = "all" ]; then + for tmpl in "$SCRIPT_DIR"/configs/benchmark_*_template.ini; do + local name + name="$(basename "$tmpl")" + name="${name#benchmark_}" + name="${name%_template.ini}" + scales+=("$name") + done + else + scales+=("$arg") + fi + done + + if [ ${#scales[@]} -eq 0 ]; then + echo "Usage: $0 bench [scale...] | all" + echo "Available scales:" + for tmpl in "$SCRIPT_DIR"/configs/benchmark_*_template.ini; do + local name + name="$(basename "$tmpl")" + name="${name#benchmark_}" + name="${name%_template.ini}" + echo " $name" + done + exit 1 + fi + + echo "" + echo "═══════════════════════════════════════════════════" + echo " Benchmark suite: ${scales[*]}" + echo " Cluster: $TOTAL_NODES nodes" + echo " Start: $(date)" + echo "═══════════════════════════════════════════════════" + + for scale in "${scales[@]}"; do + echo "" + echo "▶▶▶ Scale: $scale — 1-node baseline" + cmd_run "$scale" 1 + + if [ "$TOTAL_NODES" -gt 1 ]; then + echo "" + echo "▶▶▶ Scale: $scale — ${TOTAL_NODES}-node distributed" + cmd_run "$scale" "$TOTAL_NODES" + else + echo " (Skipping multi-node: cluster has only 1 node)" + fi + done + + echo "" + echo "═══════════════════════════════════════════════════" + echo " Benchmark suite complete: $(date)" + echo "═══════════════════════════════════════════════════" +} + +# ─── Cleanup ─── + +cmd_cleanup() { + echo "" + echo "=== Cleaning up remote nodes ===" + + for i in $(seq 1 $((${#NODE_HOSTS[@]} - 1))); do + local host="${NODE_HOSTS[$i]}" + echo " Cleaning $host..." + # Older runs wrote perftest_* and worker_*.ini directly under + # $SPTAG_DIR; current runs put them in $DATA_DIR/scratch_*/. Clean both. + remote_exec "$host" "rm -rf $SPTAG_DIR/Release/SPTAGTest $SPTAG_DIR/perftest_* $SPTAG_DIR/worker_*.ini" + remote_exec "$host" "rm -rf $DATA_DIR/scratch_*" + # Clean index directories + remote_exec "$host" "rm -rf $DATA_DIR/proidx_*" + done + echo "Cleanup complete." +} + +# ─── Main ─── + +CMD="$1" +CONF="$2" + +if [ -z "$CMD" ] || [ -z "$CONF" ]; then + echo "Usage: $0 [args...]" + echo "" + echo "Commands:" + echo " deploy Deploy binary and data to all nodes" + echo " start-tikv Start independent TiKV/PD instances" + echo " stop-tikv Stop TiKV/PD instances" + echo " run Run benchmark: $0 run cluster.conf " + echo " bench Run full benchmark suite: $0 bench cluster.conf [scale...] | all" + echo " cleanup Remove deployed files from remote nodes" + exit 1 +fi + +parse_config "$CONF" + +# Trap for cleanup on interrupt +trap 'echo ""; echo "Interrupted!"; stop_driver_watchdog; stop_remote_workers 5; cmd_stop_tikv; exit 1' INT TERM + +case "$CMD" in + deploy) + cmd_deploy + ;; + setup-bins) + cmd_setup_bins + ;; + start-tikv) + cmd_start_tikv "${3:-}" + ;; + stop-tikv) + cmd_stop_tikv "${3:-}" + ;; + run) + cmd_run "$3" "$4" + ;; + bench) + shift 2 # skip cmd and conf + cmd_bench "$@" + ;; + cleanup) + cmd_cleanup + ;; + *) + echo "Unknown command: $CMD" + echo "Valid commands: deploy, setup-bins, start-tikv, stop-tikv, run, bench, cleanup" + exit 1 + ;; +esac