I am using the Jedis pipeline to add multiple records in Redis at once. But when I am debugging the code I can see the records appear in Redis even before calling jedis.sync()
method. Aren't all commands in the pipeline expected to be executed only after that? Or maybe it's just batching them on some chunks with a fixed size?
var pipeline = jedis.pipelined();all.forEach(value -> pipeline.sadd(allPrefix, value));grouped.forEach((key, value) -> pipeline.hset(groupedPrefix, String.valueOf(key), value));pipeline.sync();
Am I doing it the right way and what is the reason for this behavior?