You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/02/22 21:48:43 UTC

[GitHub] ccma14 commented on issue #831: ZOOKEEPER-3286: xid wrap-around causes connection loss/segfault when hitting predefined XIDs

ccma14 commented on issue #831: ZOOKEEPER-3286: xid wrap-around causes connection loss/segfault when hitting predefined XIDs
URL: https://github.com/apache/zookeeper/pull/831#issuecomment-466559790
 
 
   Regarding an automated test case:
   
   In the C client the XID counter is stored in a static variable within the scope of the get_xid function in st_adapter.c/mt_adapter.c, which makes writing a test case a little harder than for the Java case, because you can't set the initial value for the XID counter from outside that function.
   
   In order to be able to write a test case similar to what we have for Java would require moving the static XID counter to the library's global scope and making it accessible/settable from outside the library, which we probably don't want for regular use cases of the library.
   
   However, if that's acceptable I can modify the patch and cook up a unit test...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services