-
Notifications
You must be signed in to change notification settings - Fork 345
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
Fix: Potential data race #1338
base: master
Are you sure you want to change the base?
Fix: Potential data race #1338
Conversation
This bug has been discussed in #1333, and this PR should be merged after #1333 and #1336 , may be rebase is required. |
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.
LGTM
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.
You should not check the cnx
is nil, this is incorrect, I think the previous commit is correct, I know the CI failed.
Please check https://github.com/apache/pulsar-client-go/actions/runs/13538441376/job/37836739015
2025-02-26T08:20:54.6856030Z producer_test.go:475:
2025-02-26T08:20:54.6856682Z Error Trace: /pulsar/pulsar-client-go/pulsar/producer_test.go:475
2025-02-26T08:20:54.6857513Z Error: Expected nil, but got: &errors.errorString{s:"request timed out"}
2025-02-26T08:20:54.6858292Z Test: TestFlushInPartitionedProducer
2025-02-26T08:20:54.6858745Z --- FAIL: TestFlushInPartitionedProducer (30.02s)
2025-02-26T08:20:54.6859183Z panic: runtime error: invalid memory address or nil pointer dereference [recovered]
2025-02-26T08:20:54.6859909Z panic: runtime error: invalid memory address or nil pointer dereference
2025-02-26T08:20:54.6860253Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12c4163]
2025-02-26T08:20:54.6860265Z
2025-02-26T08:20:54.6860426Z goroutine 14599 [running]:
2025-02-26T08:20:54.6860710Z testing.tRunner.func1.2({0x1505d80, 0x1ef9000})
2025-02-26T08:20:54.6860964Z /pulsar/go/src/testing/testing.go:1632 +0x3fc
2025-02-26T08:20:54.6861127Z testing.tRunner.func1()
2025-02-26T08:20:54.6861355Z /pulsar/go/src/testing/testing.go:1635 +0x6b6
2025-02-26T08:20:54.6861512Z panic({0x1505d80?, 0x1ef9000?})
2025-02-26T08:20:54.6861720Z /pulsar/go/src/runtime/panic.go:785 +0x132
2025-02-26T08:20:54.6862233Z github.com/apache/pulsar-client-go/pulsar.TestFlushInPartitionedProducer(0xc000374000)
2025-02-26T08:20:54.6862565Z /pulsar/pulsar-client-go/pulsar/producer_test.go:476 +0x343
2025-02-26T08:20:54.6862751Z testing.tRunner(0xc000374000, 0x16a9940)
2025-02-26T08:20:54.6862985Z /pulsar/go/src/testing/testing.go:1690 +0x227
2025-02-26T08:20:54.6863352Z created by testing.(*T).Run in goroutine 1
2025-02-26T08:20:54.6863588Z /pulsar/go/src/testing/testing.go:1743 +0x826
2025-02-26T08:20:54.6863859Z FAIL github.com/apache/pulsar-client-go/pulsar 285.026s
Your changes break this test, please fix test.
mark is as draft until #1336 is merged |
Fixes #1337
(or if this PR is one task of a github issue, please add
Master Issue: #<xyz>
to link to the master issue.)Master Issue: #1337
Motivation
Fix potential data race
Modifications
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
No
Documentation