-
Notifications
You must be signed in to change notification settings - Fork 472
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: TestSharedObjectDeletePacing is flaky #2630
Comments
cc: @RaduBerinde |
@jbowens In this test I call Line 3955 in 1e8aa51
|
The test looks reasonable to me. The comparison of the number of objects broadly has the potential to be brittle, because the number of sstables and where they're split is very timing dependent. Range tombstones can be fragmented into several sstables and may linger in the LSM if they're move-compacted. But no particular scenario comes to mind that would actually preserve An alternative structure could add a
|
Yes, I can make it less brittle by comparing the before and after filenums. Unfortunately, every now and then the compaction doesn't delete any tables (so it's not a matter of having a brittle check); I'll try to figure out why. |
It looks like the compaction does delete the files from the new version but the files themselves don't end up being deleted. Something must be holding on to the previous version perhaps.. |
It looks like It seems that we have a bug here.. Any suggestions on how to fix? In |
My mind melts every time I try to wrap my head around Not that we need to do it now, but maybe we should consider a dedicated cleaning goroutine. |
I agree - I'll give it a shot. |
The code around obsolete file deletion is very convoluted and there is one known race (described in cockroachdb#2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - callers can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes cockroachdb#2630.
The code around obsolete file deletion is very convoluted and there is one known race (described in cockroachdb#2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - callers can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes cockroachdb#2630.
The code around obsolete file deletion is very convoluted and there is one known race (described in cockroachdb#2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - callers can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes cockroachdb#2630.
The code around obsolete file deletion is very convoluted and there is one known race (described in cockroachdb#2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - callers can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes cockroachdb#2630.
The code around obsolete file deletion is very convoluted and there is one known race (described in cockroachdb#2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - callers can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes cockroachdb#2630.
The code around obsolete file deletion is very convoluted and there is one known race (described in cockroachdb#2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - tests can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes cockroachdb#2630.
The code around obsolete file deletion is very convoluted and there is one known race (described in #2630). This change reworks the deletion code as follows: - we add a cleanup manager which has a background goroutine. - all file and object deletions happen in the manager's background goroutine. - callers can enqueue cleanup jobs with the manager - tests can wait for outstanding cleanup jobs to finish We also add a missing call to `deleteObsoleteObjects` from the ingest path (which now can cause files to be removed through excising). Finally, we fix an incorrect `Remove` call in the error path of `Checkpoint()` (which was missing a `PathJoin`). Fixes #2630.
Seen here: https://github.com/cockroachdb/pebble/actions/runs/5247409884/jobs/9477540951
Reproduces on Linux, locally:
The text was updated successfully, but these errors were encountered: