Hi Folks,

I am hitting an error in my C client code and below are the set of
operations I perform:

  1.  Zookeeper Client connected to Zookeeper server S1 and a new
server S2 gets added.
  2.  monitor zookeeper server config at the client and on change of
server config, call zoo_set_server
from the client
  3.  client can issue operations like zoo_get just after the call to
zoo_set_servers
  4.  I can see that the zookeeper thread logs connect to the new
server just after the zoo_get
call

2016-04-11 03:46:50,655:1207(0xf26ffb40):ZOO_INFO@check_events@2345:
initiated connection
to server [128.0.0.5:61728]

2016-04-11 03:46:50,658:1207(0xf26ffb40):ZOO_INFO@check_events@2397:
session establishment
complete on server [128.0.0.5:61728], sessionId=0x4000001852c000c,
negotiated timeout=20000

  5.  Some times I find errors like below:

2016-04-11 03:46:50,662:1207(0xf26ffb40):ZOO_ERROR@handle_socket_error_msg@2923:
Socket [128.0.0.5:61728]
zk retcode=-2, errno=115(Operation now in progress): unexpected server
response: expected
0x570b82fa, but received 0x570b82f9

  1.
zoo_get returns (-2) indicating that
ZRUNTIMEINCONSISTENCY<http://zookeeper.sourcearchive.com/documentation/3.2.2plus-pdfsg3/zookeeper_8h_bb1a0a179f313b2e44ee92369c438a4c.html#bb1a0a179f313b2e44ee92369c438a4c9eabb281ab14c74db3aff9ab456fa7fe>


What is the issue here? should I be retry the operation zoo_get
operation? Or should I wait
for the zoo_set_server to complete (like wait for the connection
establishment notification)

Thanks,

Reply via email to