提问人:Mikha 提问时间:10/31/2023 更新时间:11/6/2023 访问量:31
putAsync 和客户端上的更新顺序
putAsync and the order of updates on the client
问:
我没有在doco中找到它,所以希望有人能回答。
Say 从同一线程被多次调用:putAsync
cache.putAsync(keyA, valA1);
cache.putAsync(keyA, valA2); // Notice it's the same key, different value
cache.putAsync(keyB, valB); // Different key now
// ...more calls with either same or different keys, still from the same thread
是否可以保证这些值将以相同的顺序到达客户端上设置的连续查询侦听器?
如果没有,在更受限制的情况下是否有这样的保证 - 当上述那些是从 Ignite 服务中调用的,对于分区缓存,在分区存储数据(或将要存储)的节点上?putAsync
谢谢!
答:
1赞
Pavel Tupitsyn
11/6/2023
#1
同一分区中的键的顺序是有保证的(请参阅数据分区)。
当密钥属于不同的分区时,无法保证。
评论
0赞
Mikha
11/12/2023
谢谢@pavel-tupitsyn,这就是我需要的!
评论