You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
currently we did not do compress while produce and fetch messages. It would be good to add support for this feature.
The message handling are mostly in class "MessageRecordUtils".
The text was updated successfully, but these errors were encountered:
…gs (streamnative#78)
Master issue: streamnative/ksn#26
### Motivation
`testListOffsetForEmptyRolloverLedger` is very flaky, from the logs we
can see the ledger rollover did not clear the last ledger:
```
15:32:07.523 [awaitility-thread:io.streamnative.pulsar.handlers.kop.e2e.MultiLedgerTest@227] INFO io.streamnative.pulsar.handlers.kop.e2e.MultiLedgerTest - Managed ledger status: [LedgerOpened], ledgers info: [{9=ledgerId: 9
entries: 2
size: 116
timestamp: 1691508727345
, 10=ledgerId: 10
timestamp: 0
}]
...
15:32:22.256 [awaitility-thread:io.streamnative.pulsar.handlers.kop.e2e.MultiLedgerTest@227] INFO io.streamnative.pulsar.handlers.kop.e2e.MultiLedgerTest - Managed ledger status: [LedgerOpened], ledgers info: [{9=ledgerId: 9
entries: 2
size: 116
timestamp: 1691508727345
, 10=ledgerId: 10
timestamp: 0
}]
```
It appears that the `rollCurrentLedgerIfFull` does not work as expected.
The condition check is:
```java
if (currentLedgerEntries > 0 && currentLedgerIsFull()
&& STATE_UPDATER.compareAndSet(this, State.LedgerOpened, State.ClosingLedger)) {
```
`currentLedgerEntries` and `state` should be fine, the only issue is
that `currentLedgerIsFull` could return false when metadata service is
not available:
```java
private boolean currentLedgerIsFull() {
if (!factory.isMetadataServiceAvailable()) {
// We don't want to trigger metadata operations if we already know that we're currently disconnected
return false;
}
```
### Modifications
- Retry `rollCurrentLedgerIfFull` when there are more than 1 ledgers
- Wait until `isMetadataServiceAvailable()` returns true.
- Set `minimumRolloverTimeMs` with 0 so that `currentLedgerIsFull()`
returns true once `currentLedgerEntries >=
config.getMaxEntriesPerLedger()` is satisfied.
- Enable debug logs for `org.apache.bookkeeper.mledger.impl` so that
`ManagedLedgerImpl` could have debug logs.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
currently we did not do compress while produce and fetch messages. It would be good to add support for this feature.
The message handling are mostly in class "MessageRecordUtils".
The text was updated successfully, but these errors were encountered: