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

Lack of synchronization for childrenCache in ZooCache#getChildren()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.5, 1.7.1, 1.8.0
    • Component/s: None
    • Labels:
      None

      Description

      For run() method:

            public void run(ZooKeeper zooKeeper) throws KeeperException, InterruptedException {
      
              if (childrenCache.containsKey(zPath))
                return;
      
              try {
                List<String> children = zooKeeper.getChildren(zPath, watcher);
                childrenCache.put(zPath, children);
      

      access to childrenCache isn't protected by ZooCache.this

        Activity

        Hide
        bhavanki Bill Havanki added a comment -

        It looks like this problem also exists for access to cache, which is accessed from a Runnable in the same way.

        Show
        bhavanki Bill Havanki added a comment - It looks like this problem also exists for access to cache , which is accessed from a Runnable in the same way.

          People

          • Assignee:
            Unassigned
            Reporter:
            yuzhihong@gmail.com Ted Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            2 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 - 1h 10m
              1h 10m

                Development