[fix][client] Avert extensive time consumption during table view construction#21270
Merged
Conversation
…truction ### Motivation If a topic persistently experiences a substantial quantity of data inputs, the act of reading all the messages present in this topic to build a TableView can take an excessive amount of time. ### Modification In the process of constructing the TableView, initially, the last message ID of the current topic is procured. Consequently, once this last message ID has been reached, the creation ensues to its completion.
Demogorgon314
approved these changes
Oct 23, 2023
codelipenghui
requested changes
Oct 26, 2023
15 tasks
Demogorgon314
requested changes
Oct 26, 2023
BewareMyPower
approved these changes
Nov 2, 2023
Demogorgon314
approved these changes
Nov 2, 2023
codelipenghui
approved these changes
Nov 3, 2023
Contributor
|
/pulsarbot run-failure-checks |
| readAllExistingMessages(reader, future, startTime, messagesRead); | ||
| if (maxMessageIds.isEmpty()) { | ||
| future.complete(reader); | ||
| readTailMessages(reader); |
Contributor
There was a problem hiding this comment.
Instead of adding readTailMessages here, it would be more clear to add a thenAccept to the future in readAllExistingMessages(Reader<T> reader).
future.thenAccept(__ -> readTailMessages(reader));Otherwise, if future.complete could be called somewhere else in future, the author might forget to call readTailMessages.
BewareMyPower
approved these changes
Nov 6, 2023
Technoboy-
pushed a commit
that referenced
this pull request
Nov 10, 2023
…truction (#21270) Reopen #21170 ### Motivation If a topic persistently experiences a substantial quantity of data inputs, the act of reading all the messages present in this topic to build a TableView can take an excessive amount of time. ### Modification In the process of constructing the TableView, initially, the last message ID of the current topic is procured. Consequently, once this last message ID has been reached, the creation ensues to its completion.
Technoboy-
pushed a commit
that referenced
this pull request
Nov 10, 2023
…truction (#21270) Reopen #21170 ### Motivation If a topic persistently experiences a substantial quantity of data inputs, the act of reading all the messages present in this topic to build a TableView can take an excessive amount of time. ### Modification In the process of constructing the TableView, initially, the last message ID of the current topic is procured. Consequently, once this last message ID has been reached, the creation ensues to its completion.
nborisov
pushed a commit
to nborisov/pulsar
that referenced
this pull request
Nov 13, 2023
…truction (apache#21270) Reopen apache#21170 ### Motivation If a topic persistently experiences a substantial quantity of data inputs, the act of reading all the messages present in this topic to build a TableView can take an excessive amount of time. ### Modification In the process of constructing the TableView, initially, the last message ID of the current topic is procured. Consequently, once this last message ID has been reached, the creation ensues to its completion.
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 20, 2023
…truction (apache#21270) Reopen apache#21170 ### Motivation If a topic persistently experiences a substantial quantity of data inputs, the act of reading all the messages present in this topic to build a TableView can take an excessive amount of time. ### Modification In the process of constructing the TableView, initially, the last message ID of the current topic is procured. Consequently, once this last message ID has been reached, the creation ensues to its completion.
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 20, 2023
…iew construction (apache#21270)" This reverts commit c46ed2d.
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 20, 2023
…truction (apache#21270) Reopen apache#21170 ### Motivation If a topic persistently experiences a substantial quantity of data inputs, the act of reading all the messages present in this topic to build a TableView can take an excessive amount of time. ### Modification In the process of constructing the TableView, initially, the last message ID of the current topic is procured. Consequently, once this last message ID has been reached, the creation ensues to its completion.
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Dec 20, 2023
…iew construction (apache#21270)" This reverts commit c46ed2d.
mukesh-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 1, 2024
…iew construction (apache#21270)" This reverts commit c46ed2d. (cherry picked from commit ceafb3b)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reopen #21170
Motivation
If a topic persistently experiences a substantial quantity of data inputs, the act of reading all the messages present in this topic to build a TableView can take an excessive amount of time.
Modification
In the process of constructing the TableView, initially, the last message ID of the current topic is procured. Consequently, once this last message ID has been reached, the creation ensues to its completion.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: