Skip to content

Conversation

@sijie-ni-0214
Copy link
Contributor

issue: #46166

Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sijie-ni-0214
To complete the pull request process, please assign liliu-z after the PR has been reviewed.
You can assign the PR to them by writing /assign @liliu-z in a comment when ready.

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

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

@sre-ci-robot sre-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines. label Dec 8, 2025
@mergify mergify bot added dco-passed DCO check passed. kind/feature Issues related to feature request from users labels Dec 8, 2025
@sre-ci-robot
Copy link
Contributor

[ci-v2-notice]
Notice: We are gradually rolling out the new ci-v2 system.

  • Legacy CI jobs remain unaffected, you can just ignore ci-v2 if you don't want to run it.
  • Additional "ci-v2/*" checkers will run for this PR to ensure the new ci-v2 system is working as expected.
  • For tests that exist in both v1 and v2, passing in either system is considered PASS.

To rerun ci-v2 checks, comment with:

  • /ci-rerun-code-check // for ci-v2/code-check
  • /ci-rerun-build // for ci-v2/build
  • /ci-rerun-ut-integration // for ci-v2/ut-integration
  • /ci-rerun-ut-go // for ci-v2/ut-go
  • /ci-rerun-ut-cpp // for ci-v2/ut-cpp
  • /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp
  • /ci-rerun-e2e-arm // for ci-v2/e2e-arm [master branch only]
  • /ci-rerun-e2e-default // for ci-v2/e2e-default [master branch only]

If you have any questions or requests, please contact @zhikunyao.

@mergify
Copy link
Contributor

mergify bot commented Dec 8, 2025

@sijie-ni-0214 cpu-e2e job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Dec 8, 2025

@sijie-ni-0214 go-sdk check failed, comment rerun go-sdk can trigger the job again.

}
}

message DropSegmentsByTimeRequest {
Copy link
Contributor

Choose a reason for hiding this comment

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

please don't introduce new cross-coord rpc.
we can just add new function into mixcoord client,
we will remove those redundant rpc in future.

refer to the implmentation of NotifyDropPartition.

*
* @return Status
*/
rpc TruncateCollection(milvus.TruncateCollectionRequest) returns (common.Status) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be a bad design for an api to set the response as a enum but not a message struct.
If you want to return other things in future, such as deletion rows, you can not extend the api anymore.

rpc UpdateLoadConfig(UpdateLoadConfigRequest) returns (common.Status) {}
rpc RunAnalyzer(RunAnalyzerRequest) returns(milvus.RunAnalyzerResponse){}
rpc ValidateAnalyzer(ValidateAnalyzerRequest) returns(common.Status){}
rpc ManualUpdateCurrentTarget(ManualUpdateCurrentTargetRequest) returns(common.Status){}
Copy link
Contributor

Choose a reason for hiding this comment

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

also remove the cross-coord rpc use function directly.

clone := make(Str2Str)
for key, value := range m {
clone[key] = value
if m1 == nil || m2 == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is empty map equal to nil map in this semantic?
the semantic of current implementation is not equal to the original implement.

zap.Duration("duration", dropSegmentsDuration))

// Check if the collection is loaded in QueryCoord, if not, skip ManualUpdateCurrentTarget
resp, err := c.mixCoord.ShowLoadCollections(ctx, &querypb.ShowCollectionsRequest{
Copy link
Contributor

Choose a reason for hiding this comment

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

please wrap following operation at querycoord side, return collection not loaded in ManualUpdateCurrentTarget.
handle the error directly, ErrCollectionNotLoaded is just a ignorable error.

return err
}
dropSegmentsDuration := dropSegmentsTr.ElapseSpan()
log.Ctx(ctx).Info("mydebug: drop segments by time done",
Copy link
Contributor

Choose a reason for hiding this comment

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

wired log "mydebug"

}

// ManualUpdateCurrentTarget is used to manually update the current target for TruncateCollection
func (s *Server) ManualUpdateCurrentTarget(ctx context.Context, req *querypb.ManualUpdateCurrentTargetRequest) (*commonpb.Status, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It can be a function, but not a grpc api.

if t.Base == nil {
t.Base = commonpbutil.NewMsgBase()
}
t.Base.MsgType = commonpb.MsgType_DropCollection
Copy link
Contributor

Choose a reason for hiding this comment

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

although it's a deprecated filed, but wrong message type here, make it correct.

log.Ctx(ctx).Info("receive DropSegmentsByTime request",
zap.Int64("collectionID", req.GetCollectionID()))

channels, err := s.getChannelsByCollectionID(ctx, req.GetCollectionID())
Copy link
Contributor

Choose a reason for hiding this comment

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

why get channel list here, it's already in the FlushTsList.

return merr.Status(err), nil
}
// get segments to drop
segments := s.meta.GetSegmentsByChannel(channelName)
Copy link
Contributor

Choose a reason for hiding this comment

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

we should introduce a new api such as TruncateChannel(timetick uint64).
otherwise, the read and write operation is not protected by the mutex of meta.

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

Labels

area/compilation area/internal-api dco-passed DCO check passed. kind/feature Issues related to feature request from users size/XXL Denotes a PR that changes 1000+ lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants