I playing around with watches functionality and struggling to get it work. The problem is that watch never fires, it simply not react to changes that I make for key in other transactions.
val key = new Tuple().add("watch-test").pack()
val watchExecuted = db.runAsync(tr => {
tr.set(key, new Tuple().add(1).pack())
tr.watch(key)
})
Thread.sleep(5000) // ensure that watch applied
db.run(tr => {
tr.set(key, new Tuple().add(2).pack())
})
watchExecuted.get() // never finish
Is anybody have any idea why watches do not react on changes as it supposed to do?