Skip to content

server,sql,ui: disable system.eventlog by default, remove event box#84983

Closed
knz wants to merge 2 commits intocockroachdb:masterfrom
knz:20220725-eventlog
Closed

server,sql,ui: disable system.eventlog by default, remove event box#84983
knz wants to merge 2 commits intocockroachdb:masterfrom
knz:20220725-eventlog

Conversation

@knz
Copy link
Copy Markdown
Contributor

@knz knz commented Jul 25, 2022

Fixes #69772.
Fixes #72325.
Informs #73308.

We're going to remove the population of system.eventlog for structured
events:

  • it adds a 5-way write to many small "maintainance" transactions.
  • it forces a global roundtrip in multi-region schema changes.
  • it does not significantly help when something goes wrong, as when
    something goes wrong there may not be a way to access the system
    table any more.
  • it is not sufficiently tamper-proof, and thus unsuitable for
    audit logging.

The deprecation had been announced as of 21.1. It's time to move
forward with the removal: we're making the feature opt-in instead of
opt-out for one release cycle, then remove it in the next cycle.

Release justification: stop released code from relying on deprecated features

Release note (backward-incompatible change): The storage of
operational events in system.eventlog had been deprecated since
v21.1. It is now disabled by default. Deployments should now
transition to structured logging events, stored outside of
CockroachDB. It is still possible to manually re-enable the feature
via the cluster setting server.eventlog.enabled, but the feature
will be removed altogether in an upcoming version of CockroachDB.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we do something to the events box in the right pane of the Metrics pane?
Screen Shot 2022-07-27 at 4.29.18 PM.png

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Aug 3, 2022

should we do something to the events box in the right pane of the Metrics pane?

Do we like it still?

@andreimatei
Copy link
Copy Markdown
Contributor

I kinda like it because it's one of the few things in the console that gives a user the impression that the console has any clue about stuff that's happening to a cluster. It doesn't seem very important to me, but between having it and not having it I'd vote for having it. Not at the cost of inter-region writes for schema changes, though. So if that motivation is burning, I'm not against getting rid of it (but then I think it's up to this PR to do something to the UI). If it's not burning, I would leave it alone until 23.1, when hopefully the Obs Service should be deployed and ready to serve it.

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Aug 3, 2022

how do you feel about using gossip entries (with a ~week TTL) for this?

@andreimatei
Copy link
Copy Markdown
Contributor

andreimatei commented Aug 3, 2022

I think I'd rather remove the functionality than add gossip on top of structured logging + optional event log table + the obs service export that I'm adding.

@knz knz force-pushed the 20220725-eventlog branch from 466ac13 to 1f1f7ed Compare August 15, 2022 10:22
@knz
Copy link
Copy Markdown
Contributor Author

knz commented Aug 15, 2022

Done. RFAL

(I'd like this to merge for 22.2)

@knz knz force-pushed the 20220725-eventlog branch from 1f1f7ed to 383dcd8 Compare August 15, 2022 10:24
@knz knz changed the title server,sql: disable system.eventlog by default server,sql,ui: disable system.eventlog by default, remove event box Aug 15, 2022
knz added 2 commits August 15, 2022 14:54
We're going to remove the population of system.eventlog for structured
events:

- it adds a 5-way write to many small "maintainance" transactions.
- it forces a global roundtrip in multi-region schema changes.
- it does not significantly help when something goes wrong, as when
  something goes wrong there may not be a way to access the system
  table any more.
- it is not sufficiently tamper-proof, and thus unsuitable for
  audit logging.

The deprecation had been announced as of 21.1. It's time to move
forward with the removal: we're making the feature opt-in instead of
opt-out for one release cycle, then remove it in the next cycle.

Release justification: stop released code from relying on deprecated features

Release note (backward-incompatible change): The storage of
operational events in `system.eventlog` had been deprecated since
v21.1. It is now disabled by default. Deployments should now
transition to structured logging events, stored outside of
CockroachDB. It is still possible to manually re-enable the feature
via the cluster setting `server.eventlog.enabled`, but the feature
will be removed altogether in an upcoming version of CockroachDB.

Release note (ui change): The cluster event box has been removed
from the DB Console metrics page. Administrators are invited
to refer to their OPS logs instead.
Release justification: test-only changes

Release note: None
@knz knz force-pushed the 20220725-eventlog branch from 383dcd8 to 0267c95 Compare August 15, 2022 12:58
@dhartunian
Copy link
Copy Markdown
Collaborator

@knz can we stop writing schema change events to the table as a compromise for this release? Then we can point people to information about where they can find that info if they're looking for it. I think people rely on that box for the node events. It provides helpful reassurance in a running cluster.

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Aug 15, 2022

Yes we can do what you suggest as a compromise.

However:

I think people rely on that box for the node events. It provides helpful reassurance in a running cluster.

Are you sure of this? Do we have proof?

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Aug 15, 2022

Okay it looks like we've collected proof through discussion.
https://cockroachlabs.slack.com/archives/C01CNRP6TSN/p1660559141523049

I'll make the recommended change.

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Aug 15, 2022

Let's go for the following PR instead: #86174

If folk like it, I'll close this one and also the other issues i've created around it.

@knz knz marked this pull request as draft August 15, 2022 22:00
craig bot pushed a commit that referenced this pull request Aug 21, 2022
86174: sql: async writes to system eventlog r=andreimatei a=knz

Informs #73308.
Epic: CRDB-18596

This PR aims to remove the synchronous write to system.eventlog for structured events, which is undesirable:

-   it adds a 5-way write to many small "maintainance" transactions.
-   it forces a global roundtrip in multi-region schema changes.

Instead it makes the writes asynchronous.

This PR subsumes #84983.

See individual commits for details.

Release justification: bug fixes

Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
@knz
Copy link
Copy Markdown
Contributor Author

knz commented Aug 21, 2022

Subsumed by #86174.

@knz knz closed this Aug 21, 2022
@knz knz deleted the 20220725-eventlog branch August 21, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants