bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

Mismatch between javadoc of `org.apache.bookkeeper.client.api.LedgerEntry.getLength` and its implementation

Open kezhuw opened this issue 4 years ago • 1 comments

BUG REPORT

Describe the bug

  • Javadoc here:
      /**
       * The length of the entry, that is the size of the content expressed in bytes.
       *
       * @return the size of the content
       */
      long getLength();
    
  • The implementation returns accumulated entry payload(no metadata) length till returned entry(inclusive).

To Reproduce Omit.

Expected behavior Consistent between javadoc and its implementation.

Screenshots

None.

Additional context I checked commit tree where LedgerEntry interface has not been added. getLength returned accumulated length. If this is intended, I think it deserve a more verbose name.

kezhuw avatar Dec 22 '21 11:12 kezhuw

@kezhuw do you mean that we should point out it contains ledgerid and entryid length?

hezhangjian avatar Apr 11 '24 08:04 hezhangjian