Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase, mail # dev - Some HLog issues


+
lars hofhansl 2013-06-15, 00:25
Copy link to this message
-
答复: Some HLog issues
谢良 2013-06-15, 01:02
Personally, i hope to have a config key like "innodb_flush_log_at_trx_commit" playing in MySQL:)
________________________________________
发件人: lars hofhansl [[EMAIL PROTECTED]]
发送时间: 2013年6月15日 8:25
收件人: hbase-dev
主题: Some HLog issues

While looking at the HLog code I saw some funny methods that are *only* called from tests.
For example:

  public long append(HRegionInfo regionInfo, HLogKey logKey, WALEdit logEdit,
                     HTableDescriptor htd, boolean doSync)
which seems to be (almost) a carbon copy of:
  private long append(HRegionInfo info, byte [] tableName, WALEdit edits, UUID clusterId,
      final long now, HTableDescriptor htd, boolean doSync)
I plan to remove the former.

Second:
Should we think about the notion of "group commits". Many relational databases delay the commit of a transaction a bit in order to group multiple commits together.
Only after all such grouped transactions are committed are the respective clients notified.

HBase does a bit of this. If Puts hit the same RegionServer at the same time, the edits get added to WAL and all outstanding edits are sync'ed at the end of the Put.
We could widen the window by delaying this by (say) a second or so, and thus reduce the number of hflushes (or more importantly hsyncs, once I finally get to adding them to HBase).
Or is the current logic good enough?
-- Lars

+
Jean-Daniel Cryans 2013-06-15, 02:34