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

cannot DROP table due to dirty dependency status #19266

Open
xxchan opened this issue Nov 5, 2024 · 2 comments
Open

cannot DROP table due to dirty dependency status #19266

xxchan opened this issue Nov 5, 2024 · 2 comments
Assignees
Labels
no-issue-activity type/bug Something isn't working
Milestone

Comments

@xxchan
Copy link
Member

xxchan commented Nov 5, 2024

Describe the bug

https://risingwave-labs.slack.com/archives/C06K0R9UTQR/p1730782295995279?thread_ts=1730737567.989079&cid=C06K0R9UTQR

SELECT id, name, schema_id FROM rw_catalog.rw_tables WHERE name = 'macros';
  id  |  name  | schema_id
------+--------+-----------
 4815 | macros |      4028


select * from rw_depend where refobjid = 4815;
 objid | refobjid
-------+----------
(0 rows)

drop table macros;
ERROR:  Failed to run the query

Caused by:
  Permission denied: PermissionDenied: Fail to delete table `macros` because 2356 other relation(s) depend on it

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

Cloud

The version of RisingWave

v1.10.2-patch-us-east-2-672-agg-state-cache-metric

Additional context

No response

@xxchan xxchan added the type/bug Something isn't working label Nov 5, 2024
@github-actions github-actions bot added this to the release-2.2 milestone Nov 5, 2024
@yezizp2012 yezizp2012 self-assigned this Nov 5, 2024
@yezizp2012
Copy link
Member

Some updates:

id name fragment_ids actor_ids downstream_fragment_ids
4815 macros [4517, 4518] [6033, 6034, ...] [4523 .. 5618, 6005]

image
image

  1. rw_depend only contains records for relations that have already been successfully created, and the data comes from dependent_relations in the proto.
  2. The dependency check uses the in-memory relation_ref_count, but the error log shows that the reference count of macros is at 2356, which is clearly dirty. But why is it so large? 🤔 There are indeed many downstream fragments.

This indicates that table macros indeed has some creating downstream streaming jobs, after the user executes drop cascade, both the macros and the downstream relations' catalog are deleted. The table fragments of macros have also been deleted, but the actors of the downstream jobs were not clear during recovery, resulting in a constant recovery loop error reporting "actor xxxx not found in info table". This is likely related to the cache of in_progress_creation_streaming_job not being updated. The successful recovery after restarting meta can corroborate this, as actors downstream should have been cleaned after the restart.

Copy link
Contributor

github-actions bot commented Jan 5, 2025

This issue has been open for 60 days with no activity.

If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity label.

You can also confidently close this issue as not planned to keep our backlog clean.
Don't worry if you think the issue is still valuable to continue in the future.
It's searchable and can be reopened when it's time. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants