Skip to content

fix: treat ttl_seconds as an ignored push_config field - #587

Open
xiaofan-luan wants to merge 1 commit into
milvus-io:masterfrom
xiaofan-luan:fix/push-config-ttl-seconds
Open

fix: treat ttl_seconds as an ignored push_config field#587
xiaofan-luan wants to merge 1 commit into
milvus-io:masterfrom
xiaofan-luan:fix/push-config-ttl-seconds

Conversation

@xiaofan-luan

Copy link
Copy Markdown
Contributor

Summary

  • ttl_seconds is a field of the server-side push API (PushClientCommandRequest / POST /_telemetry/commands), not of ClientCommand, so it never reaches clients by design (see the TTL section of the design doc).
  • Stop type-validating it in the push_config command handler and report it as ignored like any other unknown field, so a stray value can no longer fail the whole command.
  • Update RejectsWrongCommandPayloadTypes accordingly: an invalid ttl_seconds now succeeds with ignored: ["ttl_seconds"] and leaves the applied config untouched.

This is a follow-up to #585 (the change was pushed to the head branch shortly after merge and did not land).

pr: #585

Related work

Verification

  • focused unit tests: ClientTelemetryTest.* 26/26 passed
  • full unit suite rebuilt against latest master

ttl_seconds is a field of the server-side push API (PushClientCommandRequest),
not of ClientCommand, so it never reaches clients by design. Stop validating
its type and report it as ignored like any other unknown field, so a stray
value can no longer fail the whole command.

Co-Authored-By: opencode <noreply@opencode.ai>
Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xiaofan-luan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

{{"push", "push_config", R"({"enabled":"false"})", 1, false, ""},
{"collection", "collection_metrics", R"({"enabled":false,"collections":"books"})", 2, false, ""},
{"ttl", "push_config", R"({"enabled":true,"ttl_seconds":"bad"})", 3, false, ""}});
{"ttl", "push_config", R"({"ttl_seconds":"bad"})", 3, true, ""}});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

test/ut/TestClientTelemetry.cpp line:1022
Low ---- The persistent flag on this command changed from false to true (with enabled removed from the payload) without a comment. Since ProcessCommands computes CalculateConfigHash for persistent commands, this hash now incorporates the {"ttl_seconds":"bad"} payload. The test does not assert the config hash, so this is harmless here, but could you confirm whether the flag change is intentional (e.g. to mirror a real persistent push_config) and, if so, worth a brief note in the test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants