Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-8208

In some situations data is not replicated to slaves when deferredLogSync is enabled

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.98.0, 0.94.6, 0.95.0
    • Fix Version/s: 0.98.0, 0.94.7, 0.95.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This is a subtle issue. When deferredLogSync is enabled, there are chances we could flush data before syncing all HLog entries. Assuming we just flush the internal cache and the server dies with some unsynced hlog entries.

      Data is not lost at the source cluster while replication is based on WAL files and some changes we flushed at the source won't be replicated the slave clusters.

      Although enabling deferredLogSync with tolerances of data loss, it breaks the replication assumption that whatever persisted in the source should be replicated to its slave clusters.

      In short, the slave cluster could end up with double losses: the data loss in the source and some data stored in source cluster may not be replicated to slaves either.

      The fix of the issue isn't hard. Basically we can invoke sync during each flush when replication is enabled for a region server. Since sync returns immediately when nothing to sync so there should be no performance impact.

      Please let me know what you think!

      Thanks,
      -Jeffrey

        Attachments

        1. hbase-8208.patch
          2 kB
          Jeffrey Zhong
        2. hbase-8208-v1.patch
          2 kB
          Jeffrey Zhong
        3. hbase-8208_v2.patch
          3 kB
          Jeffrey Zhong
        4. hbase-8208-0.94.patch
          3 kB
          Jeffrey Zhong

          Activity

            People

            • Assignee:
              jeffreyz Jeffrey Zhong
              Reporter:
              jeffreyz Jeffrey Zhong
            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: