I was wondering how prepared statement were managed by the Java SDK and Server.
We managed to be in a funny state where some of our clients were returning the right answer to a prepared query and some others were not returning anything. We ended up in this situation in the following manner:
- We had some indexes created and prepared statement using them
- I deleted the indexes and recreated them with the same name but with the order of fields changed as I realised our queries will be quicker this way - all of this was done using the cbq tool with the client still running
- After this change, we were in the situation described
- We restarted all of our clients and all of them behave correctly now
So, is this normal behaviour or it should not have happen and somehow the clients detected the index change and recreated the prepared statement?
What should be the best way to manage this kind of modification in the indexes with a running application relying on them for some queries?