-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] Fix cursor should use latest ledger config #22644
[fix][broker] Fix cursor should use latest ledger config #22644
Conversation
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
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
a test needs updating:
|
This lead to too many changes, can we just update Cursor#config when the config changed? |
Sounds like a good idea, but we need to add a new method to cursor interface. |
Yes, but I believe it's a better way |
@lhotari Do you have any suggestions? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22644 +/- ##
============================================
- Coverage 73.57% 72.68% -0.89%
+ Complexity 32624 32324 -300
============================================
Files 1877 1887 +10
Lines 139502 141018 +1516
Branches 15299 15480 +181
============================================
- Hits 102638 102504 -134
- Misses 28908 30648 +1740
+ Partials 7956 7866 -90
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 774a5d4) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 774a5d4) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 774a5d4) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 774a5d4) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 774a5d4) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 774a5d4)
Signed-off-by: Zixuan Liu <nodeces@gmail.com> (cherry picked from commit 774a5d4)
Motivation
When the ledger opens a cursor, the cursor uses a field to hold a managed ledger configuration. Once the managed ledger configuration is renewed(The managed ledger configuration will be renewed when the namespace/topic policies change) in the managed ledger, the cursor cannot use the latest ledger config.
This will break the ledger feature like
autoSkipNonRecoverableData
.Modifications
cursor.getConfig
instead ofcursor.config
, which method always gets the managed ledger config for managed ldeger.Documentation
doc
doc-required
doc-not-needed
doc-complete