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

HRegion.addAndGetGlobalMemstoreSize returns previous size

    XMLWordPrintableJSON

Details

    Description

      HRegion.addAndGetGlobalMemstoreSize(addedSize) is called once some write succeeds and 'addedSize' is the size of the edits newly put to the memstore, the returned value of HRegion.addAndGetGlobalMemstoreSize(addedSize) is then checked against the flush threshold to determine if a flush for the region should be triggered.

      By design the returned value should be the updated memstore size after adding 'addedSize', but current implementation uses this.memstoreSize.getAndAdd which returns the previous size before adding, actually 'addAndGet' rather than 'getAndAdd' should be used here.

      Attachments

        1. HBASE-10539-trunk_v1.patch
          0.6 kB
          Honghua Feng

        Activity

          People

            fenghh Honghua Feng
            fenghh Honghua Feng
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: