@Override
        public void record(final int actualWroteBytes) {
            if (actualWroteBytes <= SIZE_TABLE[Math.max(0, this.index - INDEX_DECREMENT - 1)]) {
                if (this.decreaseNow) {
                    this.index = Math.max(this.index - INDEX_DECREMENT, this.minIndex);
                    this.nextAllocateBufSize = SIZE_TABLE[this.index];
                    this.decreaseNow = false;
                } else {
                    this.decreaseNow = true;
                }
            } else if (actualWroteBytes >= this.nextAllocateBufSize) {
                this.index = Math.min(this.index + INDEX_INCREMENT, this.maxIndex);
                this.nextAllocateBufSize = SIZE_TABLE[this.index];
                this.decreaseNow = false;
            }
        }
Records the the actual number of wrote bytes in the previous write operation so that the allocator
allocates the buffer with potentially more correct capacity.

@param actualWroteBytes the actual number of wrote bytes in the previous allocate operation
jraft-core/src/main/java/com/alipay/sofa/jraft/util/AdaptiveBufAllocator.java