eolivelli commented on a change in pull request #9292:
URL: https://github.com/apache/pulsar/pull/9292#discussion_r566070165
##########
File path:
managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorTest.java
##########
@@ -2817,7 +2817,9 @@ public void operationFailed(MetaStoreException e) {
LedgerEntry entry = seq.nextElement();
PositionInfo positionInfo;
positionInfo =
PositionInfo.parseFrom(entry.getEntry());
-
individualDeletedMessagesCount.set(positionInfo.getIndividualDeletedMessagesCount());
+ c1.recoverIndividualDeletedMessages(positionInfo);
+
individualDeletedMessagesCount.set(c1.getIndividuallyDeletedMessagesSet().asRanges().size());
+
//individualDeletedMessagesCount.set(positionInfo.getIndividualDeletedMessagesCount());
Review comment:
nit: drop commented line
##########
File path:
pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/LongPairRangeSet.java
##########
@@ -125,6 +128,26 @@
*/
Range<T> lastRange();
+ /**
+ * Retrieve internal-ranges {@link LongPairRangeSet} to byte[].
+ *
+ * @param maxRanges
+ * to retrieve limited ranges.
+ * @return
+ */
+ default Map<Long, long[]> toRanges(int maxRanges) {
+ return Collections.emptyMap();
Review comment:
isn't it better to throw UnsupportedOperationException ?
also, if I retrieve only a subset of the data, how do I know that there
would be more ranges ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]