opencti
opencti copied to clipboard
[backend] Fix connectors work cleanup perf (#6031)
Proposed changes
- Retrieve only needed fields
- TODO : need to test
Related issues
- #6031
Checklist
- [ ] I consider the submitted work as finished
- [ ] I tested the code for its functionality
- [ ] I wrote test cases for the relevant uses case
- [ ] I added/update the relevant documentation (either on github or on notion)
- [ ] Where necessary I refactored code to improve the overall quality
Further comments
We could have used deleteByQuery to delete database elements in ES, but we need to retrieve them anyway to delete them from Redis. So the only way to avoid size limit issues is to retrieve only the source fields we need.