This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 5ace365e8c0 branch-4.1: [fix](cloud) Separate HTTP encoding for job
recycle and check keys #67243 (#67271)
5ace365e8c0 is described below
commit 5ace365e8c022983cc1d7f741ff62ed2c06177c2
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Aug 28 21:04:38 2026 +0800
branch-4.1: [fix](cloud) Separate HTTP encoding for job recycle and check
keys #67243 (#67271)
Cherry-picked from #67243
Co-authored-by: Yixuan Wang <[email protected]>
---
cloud/src/meta-service/http_encode_key.cpp | 3 ++-
cloud/src/meta-store/keys.h | 1 +
cloud/test/http_encode_key_test.cpp | 12 ++++++++++++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/cloud/src/meta-service/http_encode_key.cpp
b/cloud/src/meta-service/http_encode_key.cpp
index 638fce07541..cae621cbfa9 100644
--- a/cloud/src/meta-service/http_encode_key.cpp
+++ b/cloud/src/meta-service/http_encode_key.cpp
@@ -265,7 +265,8 @@ static std::unordered_map<std::string_view,
{"CopyJobKey", {{"instance_id", "stage_id", "table_id",
"copy_id", "group_id"}, [](param_type& p) { return
copy_job_key(KeyInfoSetter<CopyJobKeyInfo>{p}.get());
}, parse<CopyJobPB> , parse_json<CopyJobPB>}},
{"CopyFileKey", {{"instance_id", "stage_id", "table_id",
"obj_key", "obj_etag"}, [](param_type& p) { return
copy_file_key(KeyInfoSetter<CopyFileKeyInfo>{p}.get());
}, parse<CopyFilePB> , parse_json<CopyFilePB>}},
{"RecycleStageKey", {{"instance_id", "stage_id"},
[](param_type& p) { return
recycle_stage_key(KeyInfoSetter<RecycleStageKeyInfo>{p}.get());
}, parse<RecycleStagePB> , parse_json<RecycleStagePB>}},
- {"JobRecycleKey", {{"instance_id"},
[](param_type& p) { return
job_check_key(KeyInfoSetter<JobRecycleKeyInfo>{p}.get());
}, parse<JobRecyclePB> , parse_json<JobRecyclePB>}},
+ {"JobRecycleKey", {{"instance_id"},
[](param_type& p) { return
job_recycle_key(KeyInfoSetter<JobRecycleKeyInfo>{p}.get());
}, parse<JobRecyclePB> , parse_json<JobRecyclePB>}},
+ {"JobCheckKey", {{"instance_id"},
[](param_type& p) { return
job_check_key(KeyInfoSetter<JobRecycleKeyInfo>{p}.get());
}, parse<JobRecyclePB> , parse_json<JobRecyclePB>}},
{"MetaSchemaKey", {{"instance_id", "index_id",
"schema_version"}, [](param_type& p) { return
meta_schema_key(KeyInfoSetter<MetaSchemaKeyInfo>{p}.get());
}, parse_tablet_schema ,
parse_json<doris::TabletSchemaCloudPB>}},
{"MetaDeleteBitmap", {{"instance_id", "tablet_id", "rowest_id",
"version", "seg_id"}, [](param_type& p) { return
meta_delete_bitmap_key(KeyInfoSetter<MetaDeleteBitmapInfo>{p}.get());
}, parse_delete_bitmap , parse_json<DeleteBitmapPB>}},
{"MetaDeleteBitmapUpdateLock", {{"instance_id", "table_id",
"partition_id"}, [](param_type& p) { return
meta_delete_bitmap_update_lock_key(KeyInfoSetter<MetaDeleteBitmapUpdateLockInfo>{p}.get());
}, parse<DeleteBitmapUpdateLockPB> , parse_json<DeleteBitmapUpdateLockPB>}},
diff --git a/cloud/src/meta-store/keys.h b/cloud/src/meta-store/keys.h
index 4fc48c652fc..be05418979a 100644
--- a/cloud/src/meta-store/keys.h
+++ b/cloud/src/meta-store/keys.h
@@ -428,6 +428,7 @@ void job_check_key(const JobRecycleKeyInfo& in,
std::string* out);
void job_snapshot_data_migrator_key(const JobSnapshotDataMigratorKeyInfo& in,
std::string* out);
void job_snapshot_chain_compactor_key(const JobSnapshotChainCompactorKeyInfo&
in, std::string* out);
static inline std::string job_check_key(const JobRecycleKeyInfo& in) {
std::string s; job_check_key(in, &s); return s; }
+static inline std::string job_recycle_key(const JobRecycleKeyInfo& in) {
std::string s; job_recycle_key(in, &s); return s; }
static inline std::string job_snapshot_data_migrator_key(const
JobSnapshotDataMigratorKeyInfo& in) { std::string s;
job_snapshot_data_migrator_key(in, &s); return s; }
static inline std::string job_snapshot_chain_compactor_key(const
JobSnapshotChainCompactorKeyInfo& in) { std::string s;
job_snapshot_chain_compactor_key(in, &s); return s; }
void job_tablet_key(const JobTabletKeyInfo& in, std::string* out);
diff --git a/cloud/test/http_encode_key_test.cpp
b/cloud/test/http_encode_key_test.cpp
index a01a2ead202..1d29076313d 100644
--- a/cloud/test/http_encode_key_test.cpp
+++ b/cloud/test/http_encode_key_test.cpp
@@ -461,6 +461,18 @@ merged_stats:
{"idx":{"table_id":"10086","index_id":"100010","partition_id":"100
Input {
"JobRecycleKey",
"instance_id=gavin-instance",
+
{"01106a6f62000110676176696e2d696e7374616e636500011072656379636c650001"},
+ []() -> std::vector<std::string> {
+ JobRecyclePB pb;
+ pb.set_instance_id("gavin-instance");
+ pb.set_ip_port("host_1");
+ return {pb.SerializeAsString()};
+ },
+ R"({"instance_id":"gavin-instance","ip_port":"host_1"})",
+ },
+ Input {
+ "JobCheckKey",
+ "instance_id=gavin-instance",
{"01106a6f62000110676176696e2d696e7374616e6365000110636865636b0001"},
[]() -> std::vector<std::string> {
JobRecyclePB pb;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]