keyboardbobo commented on issue #21672: URL: https://github.com/apache/pulsar/issues/21672#issuecomment-1844817305
@Technoboy- I found that this problem has been indirectly solved by this PR, although not the same problem : https://github.com/apache/pulsar/pull/17283 Close the ledger '` ledgerHandle.closeAsync()` ' when the schema is written instead of when reading the schema metadata, thus avoiding concurrency. ``` @NotNull private CompletableFuture<SchemaStorageFormat.PositionInfo> addNewSchemaEntryToStore( String schemaId, List<SchemaStorageFormat.IndexEntry> index, byte[] data ) { SchemaStorageFormat.SchemaEntry schemaEntry = newSchemaEntry(index, data); return createLedger(schemaId).thenCompose(ledgerHandle -> { final long ledgerId = ledgerHandle.getId(); return addEntry(ledgerHandle, schemaEntry) .thenApply(entryId -> { ledgerHandle.closeAsync(); return Functions.newPositionInfo(ledgerId, entryId); }); }); } ``` -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org