79615274

Date: 2025-05-10 07:51:54
Score: 1
Natty:
Report link

Try replacing the call with an explicit find + deleteAll:

List<Embedding> embeddings = repository.findAllByFileName(fileName);
log.info("Deleting {} Embedding objects with fileName={}", embeddings.size(), fileName);
repository.deleteAll(embeddings);

Why?

Spring Data Redis retrieves IDs via the @Indexed field and then deletes by those IDs — if the index is broken, outdated, or Redis fails to deserialize the objects, the deletion may silently do nothing. An explicit finddeleteAll is easier to debug and log.

Reasons:
  • Blacklisted phrase (0.5): Why?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: tsusahi