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

The usage of mutation from CP is weird.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0, 1.4.0, 2.0.0
    • 1.4.0, 2.0.0
    • None
    • None
    • Reviewed

    Description

      HRegion#doMiniBatchMutate
      Mutation cpMutation = cpMutations[j];
      Map<byte[], List<Cell>> cpFamilyMap = cpMutation.getFamilyCellMap();
      checkAndPrepareMutation(cpMutation, replay, cpFamilyMap, now);
       // Acquire row locks. If not, the whole batch will fail.
      acquiredRowLocks.add(getRowLockInternal(cpMutation.getRow(), true));
      if (cpMutation.getDurability() == Durability.SKIP_WAL) {
        recordMutationWithoutWal(cpFamilyMap);
      }
      // Returned mutations from coprocessor correspond to the Mutation at index i. We can
       // directly add the cells from those mutations to the familyMaps of this mutation.
      mergeFamilyMaps(familyMaps[i], cpFamilyMap); // will get added to the memstore later
      

      1. Does the returned mutation from coprocessor have the same row as the corresponded mutation? If so, the acquiredRowLocks() can be saved. If not, the corresponded mutation may maintain the cells with different row due to mergeFamilyMaps().
      2. Is returned mutation's durability useful? If so, we should deal with the different durabilities before mergeFamilyMaps(). If not, the recordMutationWithoutWal can be saved.
      3. If both the returned mutation and corresponded mutation have Durability.SKIP_WAL, the recordMutationWithoutWal() may record the duplicate cells due to mergeFamilyMaps().

      Any comment? Thanks.

      Attachments

        1. HBASE-16992.branch-1.v0.patch
          6 kB
          Chia-Ping Tsai
        2. HBASE-16992.v0.patch
          8 kB
          Chia-Ping Tsai
        3. HBASE-16992.v1.patch
          8 kB
          Chia-Ping Tsai
        4. HBASE-16992.branch-1.v1.patch
          8 kB
          Chia-Ping Tsai

        Issue Links

          Activity

            People

              chia7712 Chia-Ping Tsai
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: