Hi, It looks like you need to use https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/CacheWriteSynchronizationMode.html, just set it to FULL_SYNC for the cache using CacheConfiguration. setWriteSynchronizationMode.
Evgenii вт, 25 авг. 2020 г. в 02:27, ssansoy <s.san...@cmcmarkets.com>: > Hi, I am performing the following operation on node 1 of my 3 node cluster > > (All caches use CacheRebalanceMode.SYNC, > CacheWriteSynchronizationMode.FULL_SYNC, CacheAtomicityMode.TRANSACTIONAL): > > > try (Transaction tx = ignite.transactions().txStart( > TransactionConcurrency.PESSIMISTIC, > TransactionIsolation.READ_COMMITTED, > transactionTimeout, igniteTransactionBatchSize)) { > > // write 1 record to cache A > // write 11 records to cache B > > tx.commit() > > } > > > How should I expect the updated A and B records to appear on some other > node, e.g. node 2. > I was expecting them to both become visible together at exactly the same > time. I am using CacheMode.REPLICATED. I am not seeing this however - there > seems to be a delay in between both these A and B records being made > available. > > On node 2, I am performing a continuous query on A, and in the local listen > for A, > I am fetching those 11 B records related to A (using an SQLFieldsQuery) > that > were updated > in the same transaction. > After the tx commit on node 1, my local listen for A is called, and I try > and fetch the Bs. > However, there seems to be a delay in seeing these B records - they are not > always returned by my query. > If I put a sleep in there and try the SQLFieldsQuery again, I do get all > the > B's. > > 2020-08-21 16:25:05,484 [callback-#192] DEBUG x.TableDataSelector [] - > Executing SQL query SqlFieldsQuery [sql=SELECT * FROM B WHERE A_FK = > 'TEST4', args=null, collocated=false, timeout=-1, enforceJoinOrder=false, > distributedJoins=false, replicatedOnly=false, lazy=false, schema=null, > updateBatchSize=1] > 2020-08-21 16:25:05,486 [callback-#192] DEBUG x.TableDataSelector [] - > Received 3 results > 2020-08-21 16:25:05,486 [callback-#192] DEBUG x.TableDataSelector [] - > Trying again in 5 seconds > 2020-08-21 16:25:10,486 [callback-#192] DEBUG x.TableDataSelector [] - > Received 11 results > > My local listen for A is annotated with @IgniteAsyncCallback incase that > matters. Anything obviously wrong here? > My requirement is that node 2 has access to A and all the associated > updated > B's that > were committed in the same transaction. > > Thanks! > Sham > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >