graylog2-server
graylog2-server copied to clipboard
Use MongoCollections in StreamServiceImpl
Description
- Removes usage of
PersistedandPersistedServiceinterfaces fromStreamandStreamServiceimplementations - Switches to using
StreamDTOobject as the DB class instead ofStreamImpl - Removes all usages of
StreamImplin favor ofStreamDTO - Adds methods to
StreamServicethat only return streams ofStreamDTOobjects to skip overhead of populatingOutputsandStreamRuleswhen they are not needed in calling context
/nocl this should effectively be a refactoring that doesn't change user facing functionality. Will add a CL or UPGRADING.md entry if need be
/prd Graylog2/graylog-plugin-enterprise#10392
Motivation and Context
- Move away from using deprecated
PersistedServicetoMongoCollections - Add ability to scope Streams and move away from hard-coded system stream IDs
- partially addresses Graylog2/graylog-plugin-enterprise#10284
- will add
ScopedEntitysupport in a separate PR
- will add
How Has This Been Tested?
Dev environment ensuring existing Stream functionality behaves the same, existing unit tests, and ITs.
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Refactoring (non-breaking change)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
@bernd first round of feedback has been addressed. StreamImpl is gone along with setters and the dangerous raw map functions. May be some test cases that still need cleaning up, but from a quick test through the UI seems like Stream functionality is mostly in tact.
Thank you for all of the feedback along the way, @bernd! 🎉