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

WALEdits under replay will also be replicated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None
    • Reviewed

    Description

      I need to verify this but seeing the code

      try {
              // We are about to append this edit; update the region-scoped sequence number.  Do it
              // here inside this single appending/writing thread.  Events are ordered on the ringbuffer
              // so region sequenceids will also be in order.
              regionSequenceId = entry.stampRegionSequenceId();
              // Edits are empty, there is nothing to append.  Maybe empty when we are looking for a
              // region sequence id only, a region edit/sequence id that is not associated with an actual
              // edit. It has to go through all the rigmarole to be sure we have the right ordering.
              if (entry.getEdit().isEmpty()) {
                return;
              }
      
              // Coprocessor hook.
              if (!coprocessorHost.preWALWrite(entry.getHRegionInfo(), entry.getKey(),
                  entry.getEdit())) {
                if (entry.getEdit().isReplay()) {
                  // Set replication scope null so that this won't be replicated
                  entry.getKey().setScopes(null);
                }
              }
              if (!listeners.isEmpty()) {
                for (WALActionsListener i: listeners) {
                  // TODO: Why does listener take a table description and CPs take a regioninfo?  Fix.
                  i.visitLogEntryBeforeWrite(entry.getHTableDescriptor(), entry.getKey(),
                    entry.getEdit());
                }
              }
      

      When a WALEdit is in replay we set the Logkey to null. But in the visitLogEntryBeforeWrite() we again set the LogKey based on the replication scope associated with the cells. So the previous step of setting null does not work here?

      Attachments

        1. HBASE-15259_v1.patch
          4 kB
          Heng Chen
        2. HBASE-15259.patch
          4 kB
          Heng Chen

        Activity

          People

            chenheng Heng Chen
            ram_krish ramkrishna.s.vasudevan
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: