Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20422 Synchronous replication for HBase phase II
  3. HBASE-21451

The way we maintain the lastestPaths in ReplicationSourceManager is broken when sync replication is used

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1
    • Replication
    • None
    • Reviewed

    Description

      Here is the problematic code

            // Add to latestPaths
            Iterator<Path> iterator = latestPaths.iterator();
            while (iterator.hasNext()) {
              Path path = iterator.next();
              if (path.getName().contains(logPrefix)) {
                iterator.remove();
                break;
              }
            }
            this.latestPaths.add(newLog);
      

      Here we just use contains, but for sync replication wal group, it just adds something after the default prefix for regionserver, so the code will be broken...

      Attachments

        1. HBASE-21451.patch
          6 kB
          Duo Zhang
        2. HBASE-21451-v1.patch
          6 kB
          Duo Zhang
        3. HBASE-21451-v1.patch
          6 kB
          Duo Zhang

        Activity

          People

            zhangduo Duo Zhang
            zhangduo Duo Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: