In the readme file of the cpp client the V4 release notes says: 'When connected to multiple nodes in the cluster, the client library will enable client affinity and can auto-reconnect to restarted nodes.'.
I wanted to try out these features but I kinda stuck. I was using VoltDB v5.6 and cpp client v5.2. My problems are:
- If I use the createConnection() method it is establishing the connections to the nodes. Then if a set the client affinity true, it is working, but I have to set it manually. From the release notes I assumed that it will happen automatically. I was trying to find the actual code in the client's source which do some automatic client affinity settings but I probably was not thorough. Maybe I misunderstood the feature?
- The createConnection() method needs a running/initialized VoltDB server when it is called and based on my observations it does not do any auto-reconnecting. If I use the createPendingConnection() method it will wait until the VoltDB starts up at the given host and can auto-reconnect to it but if I call it e.g. twice for two nodes then my program either aborts or the client throws an OverflowUnderflowException. What am I missing?
Any advice would be greatly appreciated,