Spring boot application with following redis template
RedisTemplate<String, String> template = new RedisTemplate<>();
template.setConnectionFactory(redisConnectionFactory);
template.setKeySerializer(new StringRedisSerializer());
template.setValueSerializer(new JdkSerializationRedisSerializer());
template.setHashValueSerializer(new JdkSerializationRedisSerializer());
as per title, what happens if the app crashed while writing objects to redis ? for example a json payload thanks
Comment From: madolson
A redis command is either execute or it's not, so either Redis will receive the full command and execute it, or the connection will be closed and Redis will drop the partial command.
Comment From: gzp-gnr
Thanks for replying, isn't the serialiser writing in blocks of 1024 by default ? What if the object is big and the stream is closed I the middle while writing to redis store?
Comment From: zuiderkwast
No matter how the client library serializes and sends the data, the command will be received by Redis and processed atomically. If you have questions for a particular client (Java?) better ask in that forum. This issue tracker is for the Redis database itself.
Comment From: gzp-gnr
Thanks for the answers !