Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-3096

Scans stuck and seeing error message about constraint violation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.0, 1.5.1, 1.6.0
    • 1.5.2, 1.6.1, 1.7.0
    • None
    • None

    Description

      Just helped someone debug an issue. Their scans were getting stuck on a certain tserver (determined tserver by turning on debug in shell). On the tserver, there was a contant stream of messages about a metadata table contstraint violate because Bulk load transaction no longer running.

      The following code in Tablet.importMapFiles()

                synchronized (timeLock) {
                  if (bulkTime > persistedTime)
                    persistedTime = bulkTime;
      
                  MetadataTableUtil.updateTabletDataFile(tid, extent, paths, tabletTime.getMetadataValue(persistedTime), creds, tabletServer.getLock());
                }
      

      Ended up calling the following code in MetadataTableUtil.

      public static void update(Credentials credentials, ZooLock zooLock, Mutation m, KeyExtent extent) {
          Writer t = extent.isMeta() ? getRootTable(credentials) : getMetadataTable(credentials);
          if (zooLock != null)
            putLockID(zooLock, m);
          while (true) {
            try {
              t.update(m);
              return;
            } catch (AccumuloException e) {
              log.error(e, e);
            } catch (AccumuloSecurityException e) {
              log.error(e, e);
            } catch (ConstraintViolationException e) {
              log.error(e, e);
            } catch (TableNotFoundException e) {
              log.error(e, e);
            }
            UtilWaitThread.sleep(1000);
          }
      
        }
      

      So when the constraint failed, it retried forever. It did this while holding timeLock, which in turn prevented compactions from completing, which eventually gummed up scans.

      Attachments

        1. ACCUMULO-3096-1.6.1-SNAPSHOT-4.patch
          6 kB
          Keith Turner
        2. ACCUMULO-3096-1.6.1-SNAPSHOT-1.patch
          6 kB
          Keith Turner

        Issue Links

          Activity

            People

              kturner Keith Turner
              kturner Keith Turner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m