asdf2014 opened a new pull request, #8467:
URL: https://github.com/apache/hbase/pull/8467

   ### Problem
   Several size-tracking variables in the replication source pipeline use `int`.
   Once a WAL entry batch (or a bulk load's referenced store files) exceeds
   `Integer.MAX_VALUE` (~2GB), the value silently overflows: the `shippedBytes`
   JMX metric goes negative and the (negative) size is fed to the bandwidth
   throttler, breaking throttling.
   
   ### Fix
   Widen the size to `long` end-to-end (shipper heap size, `tryThrottle` /
   `getNextSleepInterval`, `MetricsSource#shipBatch`, `ReplicateContext#size`,
   and `ReplicationSourceWALReader#sizeOfStoreFilesIncludeBulkLoad`).
   
   ### Testing
   - New `TestReplicationSizeOverflow` and a >2GB case in 
`TestReplicationThrottler`.
   - Before/after: reintroducing the `int` cast makes the store-file test fail 
with
     `expected: <3500000000> but was: <-794967296>`.
   - `spotbugs:check` reports 0 bugs; changed lines are checkstyle-clean.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to