Please sign in to comment.
Decode TAP mutation flags as host byte order.
In trying to decode the item flags from a tap mutation, it was found that the flags are stored in the server in network byte order, but when sent over tap it goes through htonl() conversion, making it a double conversion. Future versions of the server now allow for the client to specify it would like the flags sent correctly, via a TAP flag, and the server will set a flag to say they're being sent correctly. With this change, we now request things to be correct and if we don't receive a flag saying it's correct, we swap the bytes (assuming we are talking to a 'broken' server). In developing this change, a test was also developed but to complete the test correctly, some other issues had to be fixed. Thus the test isn't in this commit, but rather in it's own commit after cleaning up the mess. Change-Id: I63b69273cac194163b784211474ec2ff77bd7959 Reviewed-on: http://review.couchbase.org/13510 Reviewed-by: Trond Norbye <firstname.lastname@example.org> Reviewed-by: Michael Wiederhold <email@example.com> Tested-by: Matt Ingenthron <firstname.lastname@example.org>
- Loading branch information...
Showing with 19 additions and 3 deletions.
- +1 −0 src/main/java/net/spy/memcached/protocol/binary/TapBackfillOperationImpl.java
- +3 −1 src/main/java/net/spy/memcached/protocol/binary/TapCustomOperationImpl.java
- +1 −0 src/main/java/net/spy/memcached/protocol/binary/TapDumpOperationImpl.java
- +8 −1 src/main/java/net/spy/memcached/tapmessage/BaseMessage.java
- +6 −1 src/main/java/net/spy/memcached/tapmessage/ResponseMessage.java