make ledger rollover check task internal#8946
Conversation
|
@wuzhanpeng Please help take a look, thanks. |
| }), timeoutSec, timeoutSec, TimeUnit.SECONDS); | ||
| } | ||
|
|
||
| if (config.getMaximumRolloverTimeMs() > 0) { |
There was a problem hiding this comment.
I think it would be better to separate the timing task of checking that current ledger is full from scheduleTimeoutTask and put it in the ledger initialize method.
There was a problem hiding this comment.
Ok, I move it into individual method.
|
/pulsarbot run-failure-checks |
3 similar comments
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
| /** | ||
| * Roll current ledger if it is full | ||
| */ | ||
| void rollCurrentLedgerIfFull(); |
There was a problem hiding this comment.
@hangc0276 we shouldn't remove a method from an interface directly. we should keep the method and mark it as deprecated.
There was a problem hiding this comment.
Ok, i move it back.
|
/pulsarbot run-failure-checks |
1 similar comment
|
/pulsarbot run-failure-checks |
9fe915a to
534326d
Compare
|
/pulsarbot run-failure-checks |
1 similar comment
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
Fix apache#7195 ### Changes 1. add a schedulerTask to rollover the ledger in `ManagedLedgerImpl` instead of `BrokerService` 2. add the test.
Fix apache#7195 1. add a schedulerTask to rollover the ledger in `ManagedLedgerImpl` instead of `BrokerService` 2. add the test. (cherry picked from commit b4ef76e)
The PR #11116 couldn't be cherry-picked to `branch-2.7`, because there are too many conflicts. In PR #8946 the ledger rollover task had been moved from `BrokerService` to `ManagedLedgerImpl`, and this PR is based on it. ### Motivation Currently, the ledger rollover scheduled task will execute before reach the ledger maximum rollover time, this will cause the ledger doesn't roll over in time. ### Modifications Only make the ledger rollover scheduled task after the ledger created successfully. If the scheduled task was executed when there is no entry in the current ledger, the scheduled task will not be re-executed, and if there is new entry is added the ledger will rollover.
Fix #7195
Changes
ManagedLedgerImplinstead ofBrokerService