-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(readOnly): support read only datahub deployments #15301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(readOnly): support read only datahub deployments #15301
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (26.82%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. 📢 Thoughts on this report? Let us know! |
|
@RyanHolstien is there a follow up on on this to include some flag on the UI and the logs (probably at warn level) that read only mode is enabled? Since in this case write operations will be ignored completely it might be a bit risky to turn this on without some failure to clients in case an operator forgets to re-enable writes or uses the wrong endpoint (read-only) for writes. |
| import com.linkedin.mxe.PlatformEvent; | ||
| import com.linkedin.mxe.TopicConvention; | ||
| import com.linkedin.mxe.TopicConventionImpl; | ||
| import io.datahubproject.metadata.context.OperationContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there was another producer besides this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's the one for usage and platform events which should still be relevant even in read mode to capture when someone is making read calls. Unless we think read-only should not produce any analytics about its usage.
Not at the moment, this should basically never be turned on except in very particular deployment scenarios. Not sure how it would work either since it's intentionally built around not throwing errors. You would get indications at the client layer though since it would be responding with an empty list of rows modified. |
|
Can we just add a very obvious log line at least that will make obvious this is on? perhaps log at WARN level for every mutation? IIUC we are expecting on this mode not to see any write when this is enabled, right? so performance shouldn't be a concern when read only is enabled. Thanks! |
Bundle ReportBundle size has no change ✅ |
Support read only deployment mode through configuration. Will drop writes to ES/OS, SQL, and Kafka.