Skip to content
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: wal adaptor implementation #34122

Merged

Conversation

chyezh
Copy link
Contributor

@chyezh chyezh commented Jun 25, 2024

issue: #33285

  • add adaptor to implement walimpls into wal interface.
  • implement timetick sorted and filtering scanner.
  • add test for wal.

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chyezh
To complete the pull request process, please assign wxyucs after the PR has been reviewed.
You can assign the PR to them by writing /assign @wxyucs 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 size/XXL Denotes a PR that changes 1000+ lines. area/dependency Pull requests that update a dependency file labels Jun 25, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Jun 25, 2024
@chyezh chyezh force-pushed the feat_streaming_service_wal_adaptor branch from ff488e3 to b660a25 Compare June 26, 2024 08:29
@chyezh chyezh force-pushed the feat_streaming_service_wal_adaptor branch 2 times, most recently from 7a1a506 to 5932f22 Compare June 27, 2024 08:12
@mergify mergify bot added the ci-passed label Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 90.07444% with 40 lines in your changes missing coverage. Please review.

Project coverage is 80.85%. Comparing base (feb13cd) to head (beeeff8).
Report is 11 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #34122      +/-   ##
==========================================
+ Coverage   80.58%   80.85%   +0.27%     
==========================================
  Files        1095     1114      +19     
  Lines      137929   138464     +535     
==========================================
+ Hits       111145   111958     +813     
+ Misses      22573    22254     -319     
- Partials     4211     4252      +41     
Files Coverage Δ
...ternal/streamingnode/server/wal/adaptor/builder.go 66.66% <100.00%> (ø)
...nternal/streamingnode/server/wal/adaptor/opener.go 100.00% <100.00%> (ø)
...node/server/wal/utility/immutable_message_queue.go 100.00% <100.00%> (ø)
...l/streamingnode/server/wal/utility/message_heap.go 100.00% <100.00%> (ø)
...streamingnode/server/wal/utility/reorder_buffer.go 100.00% <100.00%> (ø)
internal/util/streamingutil/status/checker.go 100.00% <100.00%> (ø)
...util/streamingutil/status/client_stream_wrapper.go 100.00% <100.00%> (ø)
internal/util/streamingutil/util/id_allocator.go 100.00% <100.00%> (ø)
pkg/metrics/metrics.go 100.00% <ø> (ø)
pkg/util/typeutil/type.go 0.00% <ø> (ø)
... and 7 more

... and 42 files with indirect coverage changes

@chyezh chyezh force-pushed the feat_streaming_service_wal_adaptor branch from 5932f22 to f8de92c Compare July 2, 2024 06:57
@mergify mergify bot removed the ci-passed label Jul 2, 2024
@chyezh chyezh force-pushed the feat_streaming_service_wal_adaptor branch from f8de92c to 3b16b36 Compare July 2, 2024 06:59

// AllocateScannerName a scanner name for a scanner.
// The scanner name should be persistent on meta for garbage clean up.
func (m *scannerRegistry) AllocateScannerName() (string, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If some walimpls can not create stateless consumer.
we need to implement a garbage collector to collect the consumers.

Copy link
Contributor

mergify bot commented Jul 2, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 2, 2024

/run-cpu-e2e

@chyezh
Copy link
Contributor Author

chyezh commented Jul 2, 2024

rerun ut

@chyezh chyezh force-pushed the feat_streaming_service_wal_adaptor branch from 3b16b36 to 5b7025b Compare July 2, 2024 10:17
Copy link
Contributor

mergify bot commented Jul 2, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 2, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 2, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 2, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 2, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 2, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 2, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 3, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 3, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 3, 2024

/run-cpu-e2e

4 similar comments
@chyezh
Copy link
Contributor Author

chyezh commented Jul 3, 2024

/run-cpu-e2e

@chyezh
Copy link
Contributor Author

chyezh commented Jul 3, 2024

/run-cpu-e2e

@chyezh
Copy link
Contributor Author

chyezh commented Jul 3, 2024

/run-cpu-e2e

@chyezh
Copy link
Contributor Author

chyezh commented Jul 3, 2024

/run-cpu-e2e

chyezh added 3 commits July 3, 2024 18:17
- add adaptor to implement walimpls into wal interface.
- add test for wal.

Signed-off-by: chyezh <[email protected]>
@chyezh chyezh force-pushed the feat_streaming_service_wal_adaptor branch from 8e65ada to beeeff8 Compare July 3, 2024 10:17
Copy link
Contributor

mergify bot commented Jul 3, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 4, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 4, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 4, 2024

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jul 4, 2024

@chyezh E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@chyezh
Copy link
Contributor Author

chyezh commented Jul 4, 2024

/run-cpu-e2e

@mergify mergify bot added the ci-passed label Jul 4, 2024
return scanner.Chan(), nil
}
// TODO: configurable pending count.
if s.pendingQueue.Len()+s.reorderBuffer.Len() > 1024 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

here, if our timetick interval is greater than 1024, the scanner get stucked.
Should be modified into another strategy.

}

// blockUntilSyncTimeTickReady blocks until the first time tick message is sent.
func (impl *timeTickAppendInterceptor) blockUntilSyncTimeTickReady(underlyingWALImpls walimpls.WALImpls) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

move first timetick sent as a single function.

return scanner.Chan(), nil
}
// TODO: configurable pending count.
if s.pendingQueue.Len()+s.reorderBuffer.Len() > 1024 {
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't restrict the pending queue length as it might block receiving all messages within the timetick window. Two key points for message packing are:

  1. Use the pending queue of a bounded length to accommodate all messages within a timetick window.
  2. Activate back pressure mechanism with sendingCh if downstream consumption is too slow.

@jaime0815
Copy link
Contributor

All refinements or fixes will be done in the next PR.

@jaime0815
Copy link
Contributor

/lgtm

@jaime0815 jaime0815 merged commit 7611128 into milvus-io:master Jul 4, 2024
11 of 12 checks passed
@chyezh chyezh deleted the feat_streaming_service_wal_adaptor branch July 4, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/compilation area/dependency Pull requests that update a dependency file ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants