* Refactor SimpleRingBuffer
- Use std::allocator for memory management
- Add destructor to properly destroy elements and prevent memory leaks
- Remove incorrect modulo in iterator increment
- Fix iterator post-increment operator returning reference
- Use constraints (std::constructible_from) for push/emplace
- Add size() and clear() methods
* tests: fix build and avoid NodeInfoWrapper copy
The copy constructor for SimpleRingBuffer is explicitly disabled in
src/common/utils/SimpleRingBuffer.h. Since NodeInfoWrapper contains
a SimpleRingBuffer, it is also non-copyable.
This commit optimizes the MgmtdOperator tests to use pointers instead
of object copies when retrieving NodeInfoWrapper, avoiding build
failures caused by dereferencing and copying.
The bug was in TransportPool::get() where creating a new transport
always incremented acceptedCount, regardless of addr.ip value.
When addr.ip != 0 (outgoing connection), the code should increment
connectedCount instead. The mismatch caused:
1. get() creates connection with addr.ip != 0 -> increments acceptedCount (wrong)
2. remove() for that connection -> decrements connectedCount (correct)
3. connectedCount underflows (wraps to UINT32_MAX)
This fix adds the same addr.ip check that exists in add() and remove()
to ensure the correct counter is incremented when creating transports.
Fixes#366🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: yurekami <yurekami@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Modify CMakeLists.txt to set `-march=armv8-a+crc`. This enables the use of hardware-accelerated CRC32 instructions, significantly improving the performance of CRC32C calculations on compatible ARM targets.
* Fix race condition in chunk removal and compaction leading to metadata corruption
Concurrent execution of chunk removal and compaction could lead to race conditions, causing stale or inconsistent metadata.
The change uses the meta cache entry lock to serialize access during both operations, ensuring atomic updates and consistent metadata.
* remove useless enumerate in batch_remove
The actual type of targetId is uint64_t. In set-preferred-target-order cmd it is parsed as uint32_t. An error will be reported when using set-preferred-target-order cmd.