Apache9 commented on a change in pull request #753: HBASE-23181 Blocked WAL
archive: "LogRoller: Failed to schedule flush…
URL: https://github.com/apache/hbase/pull/753#discussion_r339287086
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WAL.java
##########
@@ -97,44 +97,59 @@
void close() throws IOException;
/**
- * Append a set of edits to the WAL. The WAL is not flushed/sync'd after
this transaction
- * completes BUT on return this edit must have its region edit/sequence id
assigned
- * else it messes up our unification of mvcc and sequenceid. On return
<code>key</code> will
- * have the region edit/sequence id filled in.
+ * Append a set of data edits to the WAL. 'Data' here means that the content
in the edits will
+ * also be added to memstore.
+ * <p/>
+ * The WAL is not flushed/sync'd after this transaction completes BUT on
return this edit must
+ * have its region edit/sequence id assigned else it messes up our
unification of mvcc and
+ * sequenceid. On return <code>key</code> will have the region edit/sequence
id filled in.
* @param info the regioninfo associated with append
* @param key Modified by this call; we add to it this edits region
edit/sequence id.
* @param edits Edits to append. MAY CONTAIN NO EDITS for case where we want
to get an edit
- * sequence id that is after all currently appended edits.
- * @param inMemstore Always true except for case where we are writing a
compaction completion
- * record into the WAL; in this case the entry is just so we can finish an
unfinished compaction
- * -- it is not an edit for memstore.
+ * sequence id that is after all currently appended edits.
* @return Returns a 'transaction id' and <code>key</code> will have the
region edit/sequence id
- * in it.
+ * in it.
+ * @see #appendMarker(RegionInfo, WALKeyImpl, WALEdit, boolean)
*/
- long append(RegionInfo info, WALKeyImpl key, WALEdit edits, boolean
inMemstore) throws IOException;
+ long appendData(RegionInfo info, WALKeyImpl key, WALEdit edits) throws
IOException;
+
+ /**
+ * Append a marker edit to the WAL. A marker could be a FlushDescriptor, a
compaction marker, or
+ * region event marker. The difference here is that, a marker will not be
added to memstore.
+ * <p/>
+ * The WAL is not flushed/sync'd after this transaction completes BUT on
return this edit must
+ * have its region edit/sequence id assigned else it messes up our
unification of mvcc and
+ * sequenceid. On return <code>key</code> will have the region edit/sequence
id filled in.
+ * @param info the regioninfo associated with append
+ * @param key Modified by this call; we add to it this edits region
edit/sequence id.
+ * @param edits Edits to append. MAY CONTAIN NO EDITS for case where we want
to get an edit
+ * sequence id that is after all currently appended edits.
+ * @param closeRegion Whether this is a region close marker, i.e, the last
wal edit for this
Review comment:
Adding more works to the disruptor thread is a no no, it is on the write
critical path, all edits will be processed by this thread. And since this is an
IA.Private interface, let's use follow on issues to polish it? It can be
changed even in a patched release.
What I can imagine is that, we still have the closeRegion flag in
FSWALEntry, but remove it in the method parameters and in appendMarker we test
whether it is a close marker. But it is still a bit annoying that, we just
serialize the protobuf message before calling the method, and right in the
method, we deserialize it, which really makes me unhappy...
----------------------------------------------------------------
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]
With regards,
Apache Git Services