Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6023

ThreadCache#sizeBytes() should check overflow

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: streams
    • Labels:
      None

      Description

          long sizeBytes() {
              long sizeInBytes = 0;
              for (final NamedCache namedCache : caches.values()) {
                  sizeInBytes += namedCache.sizeInBytes();
              }
              return sizeInBytes;
          }
      

      The summation w.r.t. sizeInBytes may overflow.
      Check similar to what is done in size() should be performed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sssanthalingam siva santhalingam
                Reporter:
                yuzhihong@gmail.com Ted Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: