-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance: timetick interceptor implementation #34238
enhance: timetick interceptor implementation #34238
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chyezh 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 |
1ce0cfb
to
429774f
Compare
const ( | ||
ServiceMethodPrefix = "/milvus.proto.log" | ||
InitialTerm = int64(-1) | ||
) | ||
|
||
func NewDeliverAll() *DeliverPolicy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant code here
429774f
to
fdeada5
Compare
fdeada5
to
46bbe8c
Compare
@chyezh E2e jenkins job failed, comment |
Signed-off-by: chyezh <chyezh@outlook.com>
46bbe8c
to
915c301
Compare
@chyezh E2e jenkins job failed, comment |
/run-cpu-e2e |
@chyezh E2e jenkins job failed, comment |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #34238 +/- ##
==========================================
- Coverage 84.61% 80.87% -3.74%
==========================================
Files 817 1096 +279
Lines 113473 137783 +24310
==========================================
+ Hits 96013 111438 +15425
- Misses 13238 22116 +8878
- Partials 4222 4229 +7
|
@@ -0,0 +1,76 @@ | |||
package resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource package is used to access the streamingnode global singleton.
for _, opt := range opts { | ||
opt(ta.detail) | ||
} | ||
ta.acknowledged.Store(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acknowledged should not be true if the error is not nil with ack option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The acknowledgement here is for timetick manager.
All allocated timetick must be acked, Otherwise, the timetick interceptor based on heap got stuck.
The error here need to be handled by outside AckDetail management, but current behaviour is just ignored, and drop the illegal message at scanner side.
} | ||
|
||
// Construct time tick message. | ||
msg, err := newTimeTickMsg(impl.ackDetails.LastAllAcknowledgedTimestamp(), impl.sourceID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we could ignore the error acknowledgement, may be skip some timtick sent, but I think it's make no sense.
Just drop the illegal message at scanner side based on timetick rule is best error-handling.
logger.Info("start to sync time tick...") | ||
defer logger.Info("sync time tick stopped") | ||
|
||
// Send first timetick message to wal before interceptor is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the following code snippet into a separate method named tryToSyncTimeTickUntilReady.
/lgtm |
issue: milvus-io#33285 - optimize the message package - add interceptor package to achieve append operation intercepting. - add timetick interceptor to attach timetick properties for message. - add timetick background task to send timetick message. Signed-off-by: chyezh <chyezh@outlook.com>
issue: #33285