eolivelli commented on code in PR #3197:
URL: https://github.com/apache/bookkeeper/pull/3197#discussion_r852094149
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java:
##########
@@ -260,7 +261,8 @@ public void cancelWaitForLastAddConfirmedUpdate(long
ledgerId,
@Override
public void checkpoint(final Checkpoint checkpoint) throws IOException {
long numBytesFlushed = memTable.flush(this, checkpoint);
-
interleavedLedgerStorage.getEntryLogger().prepareSortedLedgerStorageCheckpoint(numBytesFlushed);
+ ((DefaultEntryLogger) interleavedLedgerStorage.getEntryLogger())
Review Comment:
This looks like a problem.it means that this implementation works only with
the default implementation of EntryLogger
We should at least fail fast at construction time and do not wait for this
method to be called.
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/CompactionEntryLog.java:
##########
@@ -0,0 +1,91 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.bookkeeper.bookie.storage;
+
+import io.netty.buffer.ByteBuf;
+import java.io.IOException;
+
+/**
+ * An entrylog to received compacted entries.
+ * <p/>
+ * The expected lifecycle for a compaction entry log is:
+ * 1. Creation
+ * 2. Mark compacted
+ * 3. Make available
+ * 4. Cleanup
+ * <p/>
+ * Abort can happen at during any step.
+ */
+public interface CompactionEntryLog {
+ /**
+ * Add an entry to the log.
+ * @param ledgerId the ledger the entry belong to
+ * @param entry the payload of the entry
Review Comment:
It is not clear about how we deal with the ref count of the entry. Can you
please explicitly describe the behaviour? Will the method decrease the refcount?
--
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]