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

[DISCUSS]Whether the creation of cluster_schema database is allowed in the new tenant #1567

Closed
Benxiaohai001 opened this issue Oct 9, 2023 · 3 comments
Assignees

Comments

@Benxiaohai001
Copy link
Member

Describe the bug

Whether the creation of cluster_schema database is allowed in the new tenant.The current situation is that when creating a cluster_schema database in a new tenant, an error is reported: cluster_schema already exists.In fact, we only created the cluster_schema database under the cnosdb database. It does not exist under the new tenant.When we switch to the cluster_schema database and create a table, another error will be reported: cluster_schema not found.This situation is inconsistent, and I hope there can be a better way to handle it.
image

To Reproduce

No response

Expected behavior

No response

Additional context

No response

@Benxiaohai001
Copy link
Member Author

public ❯ create database cluster_schema;
Query took 0.010 seconds.
public ❯ \c cluster_schema
cluster_schema ❯ \d
Query took 0.004 seconds.
cluster_schema ❯ CREATE TABLE air (visibility DOUBLE,temperature DOUBLE,pressure DOUBLE,TAGS(station));
INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES (now(), 'XiaoMaiDao1', 56, 69, 411);
Query took 0.008 seconds.
+------+
| rows |
+------+
| 1    |
+------+
Query took 0.093 seconds.
cluster_schema ❯ \d
+------------+
| table_name |
+------------+
| air        |
+------------+
Query took 0.005 seconds.

version: cnosdb 2.4.0, revision db434d4

@Benxiaohai001
Copy link
Member Author

@roseboy-liu The PR fix this issue need sync LTS/2.3.

@lutengda lutengda assigned lutengda and unassigned roseboy-liu Jan 23, 2024
lutengda added a commit to lutengda/cnosdb that referenced this issue Jan 23, 2024
fix: 'cnosdb' and other tenant check system db(cnosdb#1567)
roseboy-liu pushed a commit that referenced this issue Jan 23, 2024
fix: 'cnosdb' and other tenant check system db(#1567)
@lutengda lutengda assigned Benxiaohai001 and unassigned lutengda Jan 23, 2024
@Benxiaohai001
Copy link
Member Author

public ❯ create database cluster_schema;
Query took 0.005 seconds.
public ❯ \c cluster_schema
cluster_schema ❯ \d
Query took 0.009 seconds.
cluster_schema ❯ CREATE TABLE air (visibility DOUBLE,temperature DOUBLE,pressure DOUBLE,TAGS(station));
INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES (now(), 'XiaoMaiDao1', 56, 69, 411);

Query took 0.002 seconds.
+------+
| rows |
+------+
| 1    |
+------+
Query took 0.016 seconds.
cluster_schema ❯ 

version: cnosdb 2.3.4, revision 07e229d

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

No branches or pull requests

3 participants