You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/07/12 07:44:33 UTC
[GitHub] [pulsar] littleorca opened a new issue #11282: NPE in OpReadEntry
littleorca opened a new issue #11282:
URL: https://github.com/apache/pulsar/issues/11282
In OpReadEntry.create:
> op.readPosition = cursor.ledger.startReadOperationOnLedger(readPositionRef, op); // op.cursor not assigned yet
> op.cursor = cursor;
In ManagedLedgerImpl.startReadOperationOnLedger:
> if (null == ledgerId) {
> opReadEntry.readEntriesFailed(new ManagedLedgerException.NoMoreEntriesToReadException("The ceilingKey(K key) method is used to return the " +
> "least key greater than or equal to the given key, or null if there is no such key"), null);
> }
Back to OpReadEntry.readEntriesFailed:
> cursor.readOperationCompleted(); // NPE raised here!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] littleorca commented on issue #11282: NPE in OpReadEntry
Posted by GitBox <gi...@apache.org>.
littleorca commented on issue #11282:
URL: https://github.com/apache/pulsar/issues/11282#issuecomment-897304788
> @littleorca I am a litter confused for the NPE in `cursor.readOperationCompleted()`, would you please provide the stack of the NPE?
Try this test case:
```java
@Test
public void readEntryNPE() throws Exception {
MetadataStore metadataStore = new ZKMetadataStore(ZK_CONNECTION, MetadataStoreConfig.builder().build());
ClientConfiguration bkClientConf = new ClientConfiguration();
bkClientConf.setMetadataServiceUri(METADATA_SERVICE_URI);
ManagedLedgerFactoryImpl factory = new ManagedLedgerFactoryImpl(metadataStore, bkClientConf);
ManagedLedger ml = factory.open(ML_NAME);
ManagedCursor c = ml.openCursor(CURSOR_NAME);
Position pos = ml.addEntry("Hello world!".getBytes(StandardCharsets.UTF_8));
c.close();
ml.close();
factory.shutdown();
factory = new ManagedLedgerFactoryImpl(metadataStore, bkClientConf);
ml = factory.open(ML_NAME);
c = ml.openCursor(CURSOR_NAME);
c.markDelete(pos);
ml.terminate();
ml.close();
factory.shutdown();
factory = new ManagedLedgerFactoryImpl(metadataStore, bkClientConf);
ml = factory.open(ML_NAME);
c = ml.openCursor(CURSOR_NAME);
c.seek(pos);
c.readEntries(1);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] hangc0276 commented on issue #11282: NPE in OpReadEntry
Posted by GitBox <gi...@apache.org>.
hangc0276 commented on issue #11282:
URL: https://github.com/apache/pulsar/issues/11282#issuecomment-896680220
@littleorca I am a litter confused for the NPE in `cursor.readOperationCompleted()`, would you please provide the stack of the NPE?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] hangc0276 commented on issue #11282: NPE in OpReadEntry
Posted by GitBox <gi...@apache.org>.
hangc0276 commented on issue #11282:
URL: https://github.com/apache/pulsar/issues/11282#issuecomment-898223813
OK, thanks for your feedback, I will deep into it. @littleorca
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on issue #11282: NPE in OpReadEntry
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #11282:
URL: https://github.com/apache/pulsar/issues/11282#issuecomment-1058888348
The issue had no activity for 30 days, mark with Stale label.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org