Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-12873

Improve ContainerData statistics synchronization

    XMLWordPrintableJSON

Details

    Description

        /** parameters for read/write statistics on the container. **/
        private final AtomicLong readBytes;
        private final AtomicLong writeBytes;
        private final AtomicLong readCount;
        private final AtomicLong writeCount;
        private final AtomicLong bytesUsed;
        private final AtomicLong blockCount;
      

      In ContainerData, the fields shown above are for statistics. The synchronization in current code is incorrect when updating multiple fields.

      It is better to create a class for them and then synchronize the new class.

      Attachments

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: