Skip to content

feat:add migrate for 4.0#3180

Merged
chejinge merged 3 commits intoOpenAtomFoundation:unstablefrom
chejinge:migrate_tools_unstable
Oct 20, 2025
Merged

feat:add migrate for 4.0#3180
chejinge merged 3 commits intoOpenAtomFoundation:unstablefrom
chejinge:migrate_tools_unstable

Conversation

@chejinge
Copy link
Collaborator

@chejinge chejinge commented Oct 15, 2025

Summary by CodeRabbit

  • New Features

    • Added comprehensive ACL (Access Control List) system for user and permission management
    • Added in-memory cache layer for improved performance
    • Added support for Redis stream commands
    • Added consensus coordination for replication
    • Restructured database architecture from table/partition-centric to DB-centric model
  • Improvements

    • Updated build system to CMake for better compatibility
    • Enhanced replication and migration capabilities
    • Improved networking layer with modern abstractions
  • Version

    • Major version bump: 3.2.7 → 4.0.2

@github-actions github-actions bot added ✏️ Feature New feature or request 📒 Documentation Improvements or additions to documentation labels Oct 15, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 15, 2025

Caution

Review failed

Failed to post review comments

Walkthrough

This PR introduces a comprehensive pika-migrate tool with CMake build support, enabling data migration from Pika to Redis/Pika systems. It adds numerous command implementations, caching subsystems, replication coordination, ACL management, and associated utilities, representing a substantial architectural expansion of the tools directory.

Changes

Cohort / File(s) Summary
Build Configuration
CMakeLists.txt, build.sh, format_code.sh, protogen.cmake, .gitattributes, .gitignore, .travis.yml, Dockerfile, Makefile
Added CMake-based build system with external project dependencies (gtest, gflags, glog, fmt, snappy, protobuf, rocksdb, jemalloc, gperftools, etc.); removed legacy Travis CI config, Dockerfile, and Makefile; added build scripts and code formatting utilities
Core Configuration & Documentation
conf/pika.conf, pika-migrate.md, README.md, LICENSE, pika_version.h
Reorganized and expanded pika configuration with new migrate settings, RocksDB tuning, cache configuration, and rate limiting; updated version to 4.0.2; added migration tool documentation; removed old documentation
Build Support
build_version.cc.in, detect_environment
Updated build version generation with CMake placeholders (@PIKA_GIT_SHA@, @PIKA_BUILD_DATE@); removed tcmalloc/malloc_extension detection
ACL & Authorization
include/acl.h, src/acl.cc
Added comprehensive ACL subsystem with User, AclSelector, Acl classes supporting permissions, selectors, key/channel patterns, and logging
Server & Connection Management
include/pika_server.h, include/pika_client_conn.h, include/pika_client_processor.h, include/pika_dispatch_thread.h
Refactored from pink-based to net-based threading; added DB-centric operations replacing partition model; introduced new async task handling and cache integration
Command Framework
include/pika_command.h, include/pika_cmd_table_manager.h, include/pika_admin.h, include/pika_acl.h, include/pika_transaction.h
Expanded command API to uint32_t flags with explicit ACL categories; added transaction commands (MULTI/EXEC/DISCARD/WATCH); added command statistics tracking; reorganized command table management
Data Type Command Headers
include/pika_kv.h, include/pika_hash.h, include/pika_list.h, include/pika_set.h, include/pika_zset.h, include/pika_stream.h
Updated all command constructors from uint16_t to uint32_t flags with AclCategory initialization; added unified Do/ReadCache/DoThroughDB/DoUpdateCache/Split/Merge/Clone lifecycle; replaced blackwidow types with storage types
Geo & HyperLogLog
include/pika_geo.h, include/pika_geohash*.h, include/pika_hyperloglog.h
Converted geo/HLL command constructors to uint32_t flag model; refactored geohash types to explicit structs; updated public API signatures
Pub/Sub & Misc Commands
include/pika_pubsub.h, include/pika_bit.h
Updated constructors and lifecycle methods following new command pattern; replaced blackwidow types with storage equivalents
Binlog & Versioning
include/pika_binlog.h, include/pika_binlog_reader.h, include/pika_binlog_transverter.h, include/pika_stable_log.h
Migrated from slash::Status to pstd::Status; replaced pthread_rwlock_t with std::shared_mutex; updated binlog reader/writer interfaces; added StableLog for consensus support
Database & Storage
include/pika_db.h, include/pika_conf.h
Added DB-centric model replacing partition abstractions; expanded configuration getters/setters; integrated cache and binlog management; updated threading and locking primitives
Replication & Synchronization
include/pika_rm.h, include/pika_consensus.h, include/pika_repl_*.h, include/rsync_*.h
Added ConsensusCoordinator, Context, MemLog, StableLog for consensus; converted from pink to net-based replication clients/servers; added SyncDB/SyncMasterDB/SyncSlaveDB model
Migration Tools
include/pika_migrate_thread.h, include/pika_slot_command.h, include/redis_sender.h, include/migrator_thread.h
Added migration-specific threading and command handling; replaced pink::Thread with net::Thread; introduced RedisSender for Redis command forwarding
Utilities & Infrastructure
include/pika_monotonic_time.h, include/pika_instant.h, include/pika_statistic.h, include/pika_slave_node.h, include/throttle.h
Added monotonic time, instantaneous metrics, and statistical tracking; added SyncWinItem/SyncWindow for binlog synchronization window management; added throttling support for rsync
Cache Subsystem
include/pika_cache.h, include/pika_cache_load_thread.h, src/cache/*
Added comprehensive Redis-backed caching layer with support for all data types (KV, Hash, List, Set, ZSet, Bit); implemented cache loading thread and TTL-aware operations
Data Structures
include/pika_define.h, include/pika_data_distribution.h
Updated with DB-centric structures (DBInfo, DBStruct, DBSyncArg); added cache-related constants; refactored offset types (LogOffset, BinlogOffset, LogicOffset, LogicOffset); removed partition-centric types
Removed Headers
include/pika_table.h, include/pika_partition.h, include/pika_meta.h, include/pika_cluster.h, include/pika_slot.h
Deleted partition/table/cluster management abstractions, replaced by DB-centric model; removed legacy cluster command classes
Threading & Network
include/pika_auxiliary_thread.h, include/pika_monitor_thread.h, include/pika_slaveping_thread.h
Migrated from pink/slash to net/pstd primitives; updated thread base classes and synchronization types; replaced legacy mutexes with pstd equivalents
Configuration Support
src/cache/include/config.h
Added cache configuration structure with memory limits and eviction policies

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes

Rationale: This diff is exceptionally large with 100+ file changes spanning multiple subsystems (build system, command framework, database model, replication/consensus, migration tool, caching layer). The changes are highly heterogeneous—mix of architectural refactoring (pink→net migration), new subsystems (ACL, consensus, migration, cache), API reshaping (uint16_t→uint32_t flags, partition→DB model), and complete removal of legacy abstractions. Logic density is moderate-to-high with many interdependencies across layers requiring careful cross-file review.

Possibly related PRs

Suggested reviewers

  • cheniujh
  • wangshao1

🐰 A migration tale in whispers bright,
Where Pika dances into Redis night,
With ACLs guarding, caches swift and keen,
Four-point-oh's the finest ever seen!
Consensus threads now coordinate with grace,
While slots and streams find their rightful place.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat:add migrate for 4.0" succinctly identifies a feature addition for migration targeted at version 4.0 and aligns with the large, migration-focused changes under tools/pika_migrate in this PR; it is therefore on-topic and summarizes the main intent. It is concise though slightly terse and could be made grammatically clearer.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 111

♻️ Duplicate comments (1)
tools/pika_migrate_v4.0/src/net/examples/thread_pool_test.cc (1)

64-66: Same ownership concern as lines 44-46.

The raw pointer allocation pattern here has the same potential leak issue discussed in the earlier comment.

Also applies to: 83-85

@@ -0,0 +1 @@
### Contributing to pika
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add actual contribution guidelines.

This file currently contains only a placeholder heading without any guidance for contributors. Consider adding sections on:

  • How to set up the development environment
  • Coding standards and style guides
  • How to submit pull requests
  • Testing requirements
  • Communication channels

Would you like me to generate a comprehensive contribution guide template?

🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/CONTRIBUTING.md around lines 1 to 1, the file only
has a placeholder heading and lacks contribution guidance; replace the
placeholder with a structured CONTRIBUTING guide that includes sections for:
development environment setup (prereqs, install, run), coding standards/style
and linting rules, testing requirements and how to run tests, PR process and
commit message format, and communication channels/issue templates; keep sections
concise, include example commands where helpful, and ensure the document links
to relevant config files (eslint, prettier, CI) and a template PR checklist.

@@ -0,0 +1,14 @@
#!/bin/bash

find include src tools -regex '.*\.\(cpp\|hpp\|c\|h\|cc\)' | xargs clang-format -i
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Use null-terminated filenames for robustness.

The current find | xargs pattern can break on filenames containing spaces or special characters.

Apply this diff:

-find include src tools -regex '.*\.\(cpp\|hpp\|c\|h\|cc\)' | xargs clang-format -i
+find include src tools -regex '.*\.\(cpp\|hpp\|c\|h\|cc\)' -print0 | xargs -0 clang-format -i

Based on static analysis (SC2038).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
find include src tools -regex '.*\.\(cpp\|hpp\|c\|h\|cc\)' | xargs clang-format -i
find include src tools -regex '.*\.\(cpp\|hpp\|c\|h\|cc\)' -print0 | xargs -0 clang-format -i
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 3-3: Use 'find .. -print0 | xargs -0 ..' or 'find .. -exec .. +' to allow non-alphanumeric filenames.

(SC2038)

🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/format_code.sh around line 3, the current pipeline
uses find | xargs which breaks on filenames with spaces/special characters;
modify the command to use null-terminated filenames by using find ... -print0
and piping to xargs -0 (or alternatively replace with find ... -exec
clang-format -i {} +) so filenames are handled robustly.

Comment on lines +9 to +14
# for FILE in $(git diff --cached --name-only | grep -E '.*\.(cpp|hpp|c|h|cc)')
# do
# if [[ "$FILE" =~ .*.(cpp|hpp|c|h)$ ]];then
# clang-format -i $FILE
# fi
# done
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix regex pattern in commented pre-commit hook.

Line 11 has two issues:

  1. The dot before the extension needs to be escaped: \.(cpp|hpp|c|h)$
  2. The pattern excludes .cc files mentioned in line 9

Apply this diff to fix:

-#    if [[ "$FILE" =~ .*.(cpp|hpp|c|h)$ ]];then
+#    if [[ "$FILE" =~ \.(cpp|hpp|c|h|cc)$ ]];then
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# for FILE in $(git diff --cached --name-only | grep -E '.*\.(cpp|hpp|c|h|cc)')
# do
# if [[ "$FILE" =~ .*.(cpp|hpp|c|h)$ ]];then
# clang-format -i $FILE
# fi
# done
# for FILE in $(git diff --cached --name-only | grep -E '.*\.(cpp|hpp|c|h|cc)')
# do
# if [[ "$FILE" =~ \.(cpp|hpp|c|h|cc)$ ]];then
# clang-format -i $FILE
# fi
# done
🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/format_code.sh around lines 9-14, the commented
pre-commit hook uses an incorrect regex: the dot before the extension must be
escaped and the `.cc` extension is missing in the conditional; update both
occurrences so the pattern reads `\.(cpp|hpp|c|h|cc)$` (use this escaped,
anchored pattern in the grep -E and in the [[ ... =~ ... ]] test) to correctly
match .cpp/.hpp/.c/.h/.cc files.


#include "include/redis_sender.h"

class MigratorThread : public net::Thread {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Missing include for base class net::Thread (likely compile error).

This header derives from net::Thread but doesn’t include its declaration. Include net_thread.h explicitly to avoid ODR/implicit include dependency.

Apply this diff:

 #include <iostream>
 #include <mutex>
+#include <atomic>
 
 #include "storage/storage.h"
-#include "net/include/redis_cli.h"
+#include "net/include/net_thread.h"
+#include "net/include/redis_cli.h"

Also applies to: 7-11

🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/include/migrator_thread.h around lines 12 (and also
applies to lines 7-11), the header declares class MigratorThread : public
net::Thread but does not include the net::Thread declaration; add an explicit
include of the header that defines net::Thread (e.g., include "net/thread.h" or
the project's net_thread.h path) at the top of migrator_thread.h so the base
class is declared before use and remove any implicit/ODR-dependent reliance on
transitive includes.

Comment on lines +31 to +33
void Stop() {
should_exit_ = true;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Data race on should_exit_ (set in Stop, read in worker loops).

should_exit_ is mutated from another thread without synchronization. Use std::atomic.

Apply this diff:

-  void Stop() {
-	  should_exit_ = true;
-  }
+  void Stop() {
+    should_exit_.store(true, std::memory_order_relaxed);
+  }

And:

-  bool should_exit_;
+  std::atomic<bool> should_exit_{false};

Also applies to: 55-56

🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/include/migrator_thread.h around lines 31-33 and also
at 55-56, the member should_exit_ is written from Stop() on one thread and read
in worker loops on another thread without synchronization; change its type to
std::atomic<bool> (include <atomic>) and update Stop() to use
should_exit_.store(true) and worker-loop checks to use should_exit_.load()
(optionally with explicit memory_order semantics) so accesses are thread-safe.

Comment on lines +71 to +75
if (argc < 2) {
printf("Usage: ./simple_http_server port");
} else {
port = atoi(argv[1]);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Missing return statement causes undefined behavior.

When argc < 2, the program prints usage but continues execution with an uninitialized port variable (Line 70). This will cause undefined behavior when port is passed to NewDispatchThread on Line 80.

Apply this diff:

   if (argc < 2) {
-    printf("Usage: ./simple_http_server port");
+    printf("Usage: ./simple_http_server port\n");
+    return 1;
   } else {
     port = atoi(argv[1]);
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (argc < 2) {
printf("Usage: ./simple_http_server port");
} else {
port = atoi(argv[1]);
}
if (argc < 2) {
printf("Usage: ./simple_http_server port\n");
return 1;
} else {
port = atoi(argv[1]);
}
🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/src/net/examples/simple_http_server.cc around lines
71 to 75, the code prints usage when argc < 2 but then continues with an
uninitialized port variable; modify the branch so the program exits immediately
after printing the usage (for example return 1; or call exit(1)) to avoid
undefined behavior and ensure port is only used when initialized.

if (argc < 2) {
printf("Usage: ./simple_http_server port");
} else {
port = atoi(argv[1]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Validate port number input.

atoi returns 0 for invalid input and doesn't detect errors. Invalid inputs like "abc" or out-of-range values will cause runtime failures.

Apply this diff to add proper validation:

-    port = atoi(argv[1]);
+    char* endptr;
+    long port_long = strtol(argv[1], &endptr, 10);
+    if (*endptr != '\0' || port_long < 1 || port_long > 65535) {
+      printf("Error: Invalid port number. Must be between 1 and 65535.\n");
+      return 1;
+    }
+    port = static_cast<int>(port_long);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
port = atoi(argv[1]);
char* endptr;
long port_long = strtol(argv[1], &endptr, 10);
if (*endptr != '\0' || port_long < 1 || port_long > 65535) {
printf("Error: Invalid port number. Must be between 1 and 65535.\n");
return 1;
}
port = static_cast<int>(port_long);
🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/src/net/examples/simple_http_server.cc around line
74, replace the unsafe atoi call with robust validation: parse argv[1] using
strtol (or strtoul), check errno for ERANGE, ensure endptr points to end of
string (no non-numeric chars), and verify the resulting value is within the
valid port range (1–65535); on any validation failure print a clear usage/error
message and exit with non-zero status so invalid or out-of-range inputs (e.g.,
"abc" or huge numbers) are rejected safely.

Comment on lines +104 to +105
BackendThread(ConnFactory* conn_factory, int cron_interval, int keepalive_timeout, BackendHandle* handle,
void* private_data);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

❓ Verification inconclusive

Clarify ownership semantics for raw pointers.

The constructor accepts raw pointers for conn_factory, handle, and private_data without clear ownership semantics. While own_handle_ (line 143) suggests conditional ownership for the handle, ownership for conn_factory_ and private_data_ is unclear. This could lead to memory leaks or double-free issues.

Run the following script to verify ownership patterns and lifecycle management:

Also applies to: 151-151


🏁 Script executed:

#!/bin/bash
# Find BackendThread destructor implementation and constructor usage
ast-grep --pattern 'BackendThread::~BackendThread() {
  $$$
}'

# Search for BackendThread instantiation patterns to understand ownership
rg -n -C5 --type=cpp 'new BackendThread\(' 

# Look for delete or cleanup of conn_factory and private_data
rg -n -C3 --type=cpp '\bdelete\s+(conn_factory|private_data)'

Length of output: 0


Clarify ownership semantics for BackendThread constructor parameters
The raw pointers conn_factory, handle, and private_data passed into BackendThread lack documented ownership: own_handle_ hints at conditional handle ownership, but it’s unclear who owns and deletes the others. Either document and implement cleanup in the destructor or switch to std::unique_ptr/std::shared_ptr to make ownership explicit.

🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/src/net/include/backend_thread.h around lines
104-105, the constructor parameters conn_factory, handle, and private_data lack
clear ownership semantics; update the API to make ownership explicit by either
(A) changing conn_factory and handle to std::shared_ptr or std::unique_ptr
(choose shared_ptr if ownership may be shared, unique_ptr if BackendThread
exclusively owns them) and replace void* private_data with a
std::shared_ptr<void> or a typed smart pointer, or (B) document in the header
that BackendThread does not take ownership of conn_factory and private_data
while own_handle_ controls only handle ownership, and implement proper cleanup
in the destructor (delete handle when own_handle_ is true, do not delete
non-owned pointers) and update comments accordingly.

Comment on lines +153 to +157
pstd::Mutex mu_;
std::map<int, std::vector<std::string>> to_send_; // ip+":"+port, to_send_msg

std::map<int, std::shared_ptr<NetConn>> conns_;
std::set<int> connecting_fds_;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify thread-safe access to connection data structures.

The mu_ mutex explicitly protects to_send_ (line 154), but it's unclear whether conns_ (line 156) and connecting_fds_ (line 157) are also protected by this mutex. Methods like GetConn(int fd), Write(int fd, ...), and Close(int fd) likely access these structures from multiple threads and require proper synchronization.

Run the following script to verify mutex usage patterns:


🏁 Script executed:

#!/bin/bash
# Find implementations of thread-sensitive methods
ast-grep --pattern 'Status BackendThread::Write($_, $_) {
  $$$
}'

ast-grep --pattern 'std::shared_ptr<NetConn> BackendThread::GetConn($_) {
  $$$
}'

# Search for mutex lock patterns around conns_ and connecting_fds_ access
rg -n -C5 --type=cpp 'std::lock_guard.*mu_|mu_\.lock\(\)' tools/pika_migrate_v4.0/src/net/

Length of output: 33378


I need to investigate connecting_fds_ usage patterns more thoroughly to determine if there's a real issue.

[/skip_cloning]


---

🏁 Script executed:

```shell
#!/bin/bash
# Search for all connecting_fds_ usage patterns
rg -n 'connecting_fds_' tools/pika_migrate_v4.0/src/net/ --type=cpp --type=h

Length of output: 2111


🏁 Script executed:

#!/bin/bash
# Also check how connecting_fds_ interacts with the lock in the full context
rg -n -B5 -A5 'connecting_fds_' tools/pika_migrate_v4.0/src/net/src/backend_thread.cc

Length of output: 2470


Protect connecting_fds_ with mu_
All insert/erase/iteration on connecting_fds_ must be performed under mu_ to avoid data races (e.g., wrap the call in SetWaitConnectOnEpoll at backend_thread.cc:125 and the erases in the event-loop handlers around lines 457–462 with std::lock_guardstd::mutex l(mu_)).

🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/src/net/include/backend_thread.h around lines
153–157, connecting_fds_ is accessed without synchronization; protect all
insert/erase/iteration on connecting_fds_ with the mutex mu_. Specifically, add
a lock (e.g., std::lock_guard<std::mutex> l(mu_)) around the call site in
SetWaitConnectOnEpoll at backend_thread.cc:125 and around the erase/iteration
logic in the event-loop handlers near lines 457–462 so every modification and
traversal of connecting_fds_ happens while mu_ is held.

};

} // namespace net
#endif // NET_INCLUDE_CLIENT_THREAD_H_
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Include guard mismatch.

The closing include guard uses NET_INCLUDE_CLIENT_THREAD_H_ but the opening guard at line 6 uses NET_INCLUDE_BACKEND_THREAD_H_. This breaks include guard protection and will cause compilation errors if a client_thread.h header also exists in the project.

Apply this diff to fix the guard:

-#endif  // NET_INCLUDE_CLIENT_THREAD_H_
+#endif  // NET_INCLUDE_BACKEND_THREAD_H_
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#endif // NET_INCLUDE_CLIENT_THREAD_H_
#endif // NET_INCLUDE_BACKEND_THREAD_H_
🤖 Prompt for AI Agents
In tools/pika_migrate_v4.0/src/net/include/backend_thread.h around line 161, the
closing include guard macro is incorrect (NET_INCLUDE_CLIENT_THREAD_H_) while
the opening guard is NET_INCLUDE_BACKEND_THREAD_H_; update the final #endif
comment to use NET_INCLUDE_BACKEND_THREAD_H_ so the opening and closing guards
match exactly, ensuring the include guard protection is restored.

@chejinge chejinge merged commit 7153e72 into OpenAtomFoundation:unstable Oct 20, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📒 Documentation Improvements or additions to documentation ✏️ Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants