Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4074

Race condition in LazyValueGetter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.12.0
    • None

    Description

      There is a race condition between acquiring the lock and the values map being initialized here.

      @Override
        public ImmutableBytesWritable getLatestValue(ColumnReference ref) throws IOException {
          // ensure we have a backing map
          if (values == null) {
            synchronized (this) {
              values = Collections.synchronizedMap(new HashMap<ColumnReference, ImmutableBytesWritable>());
            }
          }
      

      Attachments

        1. PHOENIX-4074_v2.patch
          5 kB
          James R. Taylor
        2. PHOENIX-4074.patch
          1 kB
          Samarth Jain

        Activity

          People

            samarthjain Samarth Jain
            samarthjain Samarth Jain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: