Skip to content
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

db: improve logging observability into WAL failover #4162

Open
jbowens opened this issue Nov 13, 2024 · 0 comments
Open

db: improve logging observability into WAL failover #4162

jbowens opened this issue Nov 13, 2024 · 0 comments

Comments

@jbowens
Copy link
Collaborator

jbowens commented Nov 13, 2024

We should improve the observability into WAL failover via diagnostic logs.

We could at least log when we switch between primary and secondary.

We should also look at improving the WAL replay logic to ensure we log sufficient information about which physical WALs were read during recovery.

Jira issue: PEBBLE-302

jbowens added a commit to jbowens/pebble that referenced this issue Nov 13, 2024
When we finish replaying a WAL, log the logical log which will encode all the
replayed segment files (if WAL failover resulted in multiple physical files).

```
[JOB 1] WAL 000002: {(data,000)} stopped reading at offset: (data/000002.log: 0); replayed 0 keys in 0 batches
```

Additionally, implement the SafeFormatter interface to ensure that relevant
details are not redacted.

Informs cockroachdb#4162.
jbowens added a commit to jbowens/pebble that referenced this issue Nov 13, 2024
When we finish replaying a WAL, log the logical log which will encode all the
replayed segment files (if WAL failover resulted in multiple physical files).

```
[JOB 1] WAL 000002: {(data,000)} stopped reading at offset: (data/000002.log: 0); replayed 0 keys in 0 batches
```

Additionally, implement the SafeFormatter interface to ensure that relevant
details are not redacted.

Informs cockroachdb#4162.
jbowens added a commit that referenced this issue Nov 14, 2024
When we finish replaying a WAL, log the logical log which will encode all the
replayed segment files (if WAL failover resulted in multiple physical files).

```
[JOB 1] WAL 000002: {(data,000)} stopped reading at offset: (data/000002.log: 0); replayed 0 keys in 0 batches
```

Additionally, implement the SafeFormatter interface to ensure that relevant
details are not redacted.

Informs #4162.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Incoming
Development

No branches or pull requests

1 participant