Skip to content

Commit

Permalink
Polish the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
RongtongJin committed Apr 24, 2023
1 parent 9c6f6c1 commit 4ed3faf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ public class BatchConsumeQueue implements ConsumeQueueInterface {
* │ Store Unit │
* │ │
* </pre>
* BatchConsumeQueue's store unit. Size: CommitLog Physical Offset(8) + Body Size(4) + Tag HashCode(8) + Store
* time(8) + msgBaseOffset(8) + batchSize(2) + compactedOffset(4) + reserved(4)= 46 Bytes
* BatchConsumeQueue's store unit. Size:
* CommitLog Physical Offset(8) + Body Size(4) + Tag HashCode(8) + Store time(8) +
* msgBaseOffset(8) + batchSize(2) + compactedOffset(4) + reserved(4)= 46 Bytes
*/
public static final int CQ_STORE_UNIT_SIZE = 46;
public static final int MSG_TAG_OFFSET_INDEX = 12;
Expand Down Expand Up @@ -618,9 +619,8 @@ private static int ceil(int pos) {
}

/**
* Gets SelectMappedBufferResult by batch-message offset Node: the caller is responsible for the release of
* SelectMappedBufferResult
*
* Gets SelectMappedBufferResult by batch-message offset
* Node: the caller is responsible for the release of SelectMappedBufferResult
* @param msgOffset
* @return SelectMappedBufferResult
*/
Expand Down Expand Up @@ -818,8 +818,8 @@ private MappedFile searchTimeFromFiles(long timestamp) {
}

/**
* Find the offset of which the value is equal or larger than the given targetValue. If there are many values equal
* to the target, then find the earliest one.
* Find the offset of which the value is equal or larger than the given targetValue.
* If there are many values equal to the target, then find the earliest one.
*/
public static int binarySearchRight(ByteBuffer byteBuffer, int left, int right, final int unitSize,
final int unitShift,
Expand Down Expand Up @@ -855,8 +855,8 @@ public static int binarySearchRight(ByteBuffer byteBuffer, int left, int right,
}

/**
* Here is vulnerable, the min value of the bytebuffer must be smaller or equal then the given value. Otherwise it
* may get -1
* Here is vulnerable, the min value of the bytebuffer must be smaller or equal then the given value.
* Otherwise, it may get -1
*/
protected int binarySearch(ByteBuffer byteBuffer, int left, int right, final int unitSize, final int unitShift,
long targetValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public interface ConsumeQueueInterface extends FileQueueLifeCycle {


/**
* increase queue offset.
* Increase queue offset.
* @param queueOffsetAssigner the delegated queue offset assigner
* @param msg message itself
* @param messageNum message number
Expand Down

0 comments on commit 4ed3faf

Please sign in to comment.