codelipenghui commented on code in PR #21208:
URL: https://github.com/apache/pulsar/pull/21208#discussion_r1360511164
##########
pulsar-broker/src/main/java/org/apache/pulsar/compaction/TopicCompactionService.java:
##########
@@ -60,4 +60,20 @@ public interface TopicCompactionService extends
AutoCloseable {
* @return a future that will be completed with the last compacted
position, this position can be null.
*/
CompletableFuture<Position> getLastCompactedPosition();
+
+ /**
+ * Find the first entry that greater or equal to target publishTime.
+ *
+ * @param publishTime the publish time of entry.
+ * @return the first entry metadata that greater or equal to target
publishTime, this entry can be null.
+ */
+ CompletableFuture<Entry> findEntryByPublishTime(long publishTime);
+
+ /**
+ * Find the first entry that greater or equal to target entryIndex.
Review Comment:
It requires the broker entry metadata. So we'd better improve the Javadoc to
explain the behavior of broker entry metadata missed.
And please also add a test for this case.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]