reddycharan commented on a change in pull request #2182: Add API for Bookie
checksum verification writeFlags
URL: https://github.com/apache/bookkeeper/pull/2182#discussion_r336285903
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/WriteFlag.java
##########
@@ -30,12 +30,32 @@
public enum WriteFlag {
/**
- * Writes will be acknowledged after writing to the filesystem
+ * Bit 0 - Writes will be acknowledged after writing to the filesystem
* but not yet been persisted to disks.
*
* @see ForceableHandle#force()
*/
- DEFERRED_SYNC(0x1 << 0);
+ DEFERRED_SYNC(0x1 << 0),
+ /**
+ * Bits 1,2,3 - value 0.
Review comment:
yes, we have to use this `static final int DIGEST_TYPE_BITS = 0x7 << 2;` in
`getWriteFlags()` method. Basically to know the digestType we should do logical
and with DIGEST_TYPE_BITS first and then do the logical and with the
corresponding enum value. Basically we are making it clear in getWriteFlags
method that these bits are considered to be related to DigestType.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services