GenerateQuery saves QueryMessage in a static variable inside. If multiple threads are generating queries at the same time, parts of those queries get mixed up and eventually fail to execute. I think either message should be wrapped into ThreadLocal, or GenerateQuery should create and return a wrapper object containing the message
GenerateQuery saves QueryMessage in a static variable inside. If multiple threads are generating queries at the same time, parts of those queries get mixed up and eventually fail to execute. I think either message should be wrapped into ThreadLocal, or GenerateQuery should create and return a wrapper object containing the message