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

Incorrect GC directory path #2457

Closed
WenyXu opened this issue Sep 21, 2023 · 2 comments · Fixed by #2463
Closed

Incorrect GC directory path #2457

WenyXu opened this issue Sep 21, 2023 · 2 comments · Fixed by #2463
Assignees
Labels
C-bug Category Bugs

Comments

@WenyXu
Copy link
Member

WenyXu commented Sep 21, 2023

What type of bug is this?

Unexpected error

What subsystems are affected?

Datanode

What happened?

2023-09-19T11:26:16.846653773Z stdout F [2m2023-09-19T11:26:16.846491Z[0m [33m WARN[0m [2mmito2::worker::handle_drop[0m[2m:[0m Error occurs during trying to GC region dir data/greptime/s668c78b5_3e16_4c00_a97d_c2d452bd2789/1268/1268_0000000000: OpenDAL operator failed. Location: /home/weny/Projects/greptimedb-chaos/greptimedb/src/mito2/src/worker/handle_drop.rs:121:10, source: NotADirectory (permanent) at Operator::list, context: { service: s3, path: data/greptime/s668c78b5_3e16_4c00_a97d_c2d452bd2789/1268/1268_0000000000 } => the path trying to list should end with `/`

What operating system did you use?

Ubuntu 23.04

Relevant log output and stack trace

No response

How can we reproduce the bug?

Starts database
Creates a table
Inserts data
Drops the table

@WenyXu WenyXu added the C-bug Category Bugs label Sep 21, 2023
@killme2008
Copy link
Contributor

The region dir must call normalize_dir when generating it:

pub fn normalize_dir(dir: &str) -> String {

@evenyag evenyag added this to mito2 Sep 21, 2023
@evenyag
Copy link
Contributor

evenyag commented Sep 21, 2023

We can normalize the dir in the opener

pub(crate) async fn create_or_open<S: LogStore>(
self,
config: &MitoConfig,
wal: &Wal<S>,
) -> Result<MitoRegion> {
let region_id = self.region_id;

pub(crate) async fn open<S: LogStore>(
self,
config: &MitoConfig,
wal: &Wal<S>,
) -> Result<MitoRegion> {
let region_id = self.region_id;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants