You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by maxi628 <ma...@gmail.com> on 2021/01/26 14:55:30 UTC
[2.7.6] Question about BinaryObject/SQL schema
Hello everyone.
I'm creating a partitioned cache with persistence enabled.
I use java's thin client to connect my app to ignite.
I have a pool of reusable connections, as suggested in the documentation
since IgniteClient isn't thread safe.
After the cache is created, I'm using SQL "ALTER TABLE" to change its schema
to drop/create columns and I also create some indexes if needed.
I use cache API to populate the cache.
Now, If I had any opened connections in my pool after doing the alter table,
those binary types maintain the old schema, which is leading to problems.
Sometimes I get:
An example would be:
- create connection A
- create cache1<Long, BinaryObject> (let's call it cache1-A)
- create connection B
- get cache1 from connection B (let's call it cache1-B)
- And here I can either
- run alter table on cache1-B and add/drop a column
- make a cache.put(1, binaryObjectBuilder with new field)
Now if I get the binary().types() from each connection, they are different,
in the sense that one of those two is missing the new field.
Is there any way to refresh/update the binary types of an existing thin
client connection?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/