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: implement kafka for wal #38598

Merged

Conversation

chyezh
Copy link
Contributor

@chyezh chyezh commented Dec 19, 2024

issue: #38399

@sre-ci-robot sre-ci-robot added the size/XL Denotes a PR that changes 500-999 lines. label Dec 19, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 54.16667% with 11 lines in your changes missing coverage. Please review.

Project coverage is 81.08%. Comparing base (5304707) to head (8eb9821).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
pkg/streaming/util/message/adaptor/message_id.go 40.00% 6 Missing ⚠️
pkg/util/paramtable/param_item.go 55.55% 4 Missing ⚠️
internal/querynodev2/delegator/delegator_data.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #38598       +/-   ##
===========================================
+ Coverage   69.33%   81.08%   +11.74%     
===========================================
  Files         292     1381     +1089     
  Lines       26187   195226   +169039     
===========================================
+ Hits        18158   158307   +140149     
- Misses       8029    31338    +23309     
- Partials        0     5581     +5581     
Components Coverage Δ
Client 78.26% <ø> (∅)
Core 69.33% <ø> (ø)
Go 83.08% <54.16%> (∅)
Files with missing lines Coverage Δ
internal/distributed/streaming/streaming.go 100.00% <ø> (ø)
internal/distributed/streaming/wal.go 62.13% <100.00%> (ø)
internal/streamingnode/server/server.go 93.75% <ø> (ø)
...treamingnode/server/wal/adaptor/scanner_adaptor.go 89.20% <100.00%> (ø)
internal/util/pipeline/stream_pipeline.go 93.20% <100.00%> (ø)
internal/querynodev2/delegator/delegator_data.go 84.78% <0.00%> (ø)
pkg/util/paramtable/param_item.go 83.14% <55.55%> (ø)
pkg/streaming/util/message/adaptor/message_id.go 50.98% <40.00%> (ø)

... and 1081 files with indirect coverage changes

@chyezh chyezh force-pushed the enhance_enable_kafka_for_streaming branch from 2123f40 to 97b3bd4 Compare December 20, 2024 01:51
@chyezh chyezh added this to the 2.6.0 milestone Dec 20, 2024
Copy link
Contributor

mergify bot commented Dec 20, 2024

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

@chyezh chyezh force-pushed the enhance_enable_kafka_for_streaming branch 3 times, most recently from 312b193 to 4fbc9b8 Compare December 22, 2024 11:02
@mergify mergify bot added the ci-passed label Dec 22, 2024
// and there's no commit opeartions.
consumerConfig := cloneKafkaConfig(w.consumerConfig)
consumerConfig.SetKey("group.id", opt.Name)
switch opt.DeliverPolicy.GetPolicy().(type) {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove unnecessary code snippets.

}

// getProducerAndConsumerConfig returns the producer and consumer config.
func (b *builderImpl) getProducerAndConsumerConfig() (producerConfig kafka.ConfigMap, consumerConfig kafka.ConfigMap) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maintain single responsibility in methods by separating them into getProducerConfig and getConsumerConfig.

}
default:
// ignore other events
log.Info("kafka producer incoming non-message, non-error event", zap.String("event", ev.String()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Use debug log level

return
}
if c, ok := err.(kafka.Error); ok && c.Code() == kafka.ErrTimedOut {
continue
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 always retry when the context error is not nil and consider adding a log if the error occurs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The retry opeartion is executed by the scanner adaptor layer and consumer layer.
Same implementation as pulsar scanner.
The current scanner adaptor layer implementation is ill, will be fixed in next pr.

@chyezh chyezh force-pushed the enhance_enable_kafka_for_streaming branch from 4fbc9b8 to 8eb9821 Compare December 24, 2024 12:44
@mergify mergify bot added ci-passed and removed ci-passed labels Dec 24, 2024
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: chyezh

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

The pull request process is described 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

@jaime0815
Copy link
Contributor

/lgtm

@sre-ci-robot sre-ci-robot merged commit 285289d into milvus-io:master Dec 25, 2024
19 of 20 checks passed
@chyezh chyezh deleted the enhance_enable_kafka_for_streaming branch December 25, 2024 03:16
NicoYuan1986 pushed a commit to NicoYuan1986/milvus that referenced this pull request Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/XL Denotes a PR that changes 500-999 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants