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

fix: generate region path with given prefix #2409

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

waynexia
Copy link
Member

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

#2399 misuses the region storage path prefix. After this fix the server can re-open previous created regions:

MySQL [(none)]> show tables;
+---------+
| Tables  |
+---------+
| numbers |
| scripts |
+---------+
2 rows in set (0.013 sec)

MySQL [(none)]> create table t(ts timestamp time index);
Query OK, 0 rows affected (0.005 sec)

MySQL [(none)]> show tables;
+---------+
| Tables  |
+---------+
| numbers |
| scripts |
| t       |
+---------+
3 rows in set (0.001 sec)

MySQL [(none)]> show tables;
ERROR 2013 (HY000): Lost connection to server during query
MySQL [(none)]> show tables;
ERROR 2006 (HY000): Server has gone away
No connection. Trying to reconnect...
Connection id:    8
Current database: *** NONE ***

+---------+
| Tables  |
+---------+
| numbers |
| scripts |
| t       |
+---------+
3 rows in set (0.015 sec)

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #2409 (b817ee4) into develop (c149c12) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2409      +/-   ##
===========================================
- Coverage    77.57%   77.51%   -0.07%     
===========================================
  Files          718      718              
  Lines       113622   113623       +1     
===========================================
- Hits         88143    88075      -68     
- Misses       25479    25548      +69     

@killme2008
Copy link
Contributor

The key point is that we should create a test to cover this scenario, it's very important.

@killme2008
Copy link
Contributor

Let's merge this PR first, please add a test to cover this issue #2407

@v0y4g3r v0y4g3r self-requested a review September 16, 2023 03:23
Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

@v0y4g3r v0y4g3r added this pull request to the merge queue Sep 16, 2023
Merged via the queue into GreptimeTeam:develop with commit 5e35087 Sep 16, 2023
@fengjiachun fengjiachun mentioned this pull request Sep 16, 2023
2 tasks
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants