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

[BUG]yashandb table lost after restart db #307

Closed
ahjing99 opened this issue Feb 18, 2024 · 0 comments · Fixed by #313
Closed

[BUG]yashandb table lost after restart db #307

ahjing99 opened this issue Feb 18, 2024 · 0 comments · Fixed by #313
Assignees

Comments

@ahjing99
Copy link
Contributor

ahjing99 commented Feb 18, 2024

install db:

➜  ~ kbcli version
Kubernetes: v1.27.9-gke.1092000
KubeBlocks: 0.8.1
kbcli: 0.8.1

curl -fsSL https://kubeblocks.io/installer/install_cli.sh |bash -s 0.8.1
kbcli kubeblocks install
helm repo add kubeblocks https://jihulab.com/api/v4/projects/150246/packages/helm/stable
helm repo update kubeblocks
helm upgrade -i yashandb kubeblocks/yashandb --version v0.0.1
kbcli cluster create yashantest --cluster-definition=yashandb
kubectl exec -it yashantest-yashandb-compdef-0 sh
  1. Create table
sh-4.4$  /home/yashan/bin/yasboot sql -d sys/yasdb_123@10.108.8.69:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64

Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux

SQL> create table test5(c1 int, c2 int, c3 int);
begin
    for i in 1..10000 loop
        insert into test5 values (i,i,i);
        end loop;
            commit ;
end;
/create table test5(c1 int, c2 int, c3 int);
begin
    for i in 1..10000 loop
        insert into test5 values (i,i,i);
        end loop;
            commit ;
end;

Succeed.

SQL>    2    3    4    5    6    7
/

PL/SQL Succeed.

SQL> select count(*) from test5;
select count(*) from test5;

             COUNT(*)
---------------------
                10000

1 row fetched.

SQL>
  1. Restart cluster with kbcli
 ➜  ~ kbcli cluster restart yashantest
Please type the name again(separate with white space when more than one): yashantest
OpsRequest yashantest-restart-lbp24 created successfully, you can view the progress:
	kbcli cluster describe-ops yashantest-restart-lbp24 -n default

  1. the table lost
➜  ~ kubectl exec -it yashantest-yashandb-compdef-0 sh
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
sh-4.4$ /home/yashan/bin/yasboot sql -d sys/yasdb_123@10.108.8.69:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64

Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux

SQL> select count(*) from test5;
select count(*) from test5;

[1:22]YAS-02012 table or view does not exist

I also tried with shutdown, encountered following problem

SQL> create table test5(c1 int, c2 int, c3 int);
begin
    for i in 1..10000 loop
        insert into test5 values (i,i,i);
        end loop;
            commit ;
end;
/create table test5(c1 int, c2 int, c3 int);
begin
    for i in 1..10000 loop
        insert into test5 values (i,i,i);
        end loop;
            commit ;
end;

Succeed.

SQL>    2    3    4    5    6    7
/

PL/SQL Succeed.

SQL> select count(*) from test5;
select count(*) from test5;

             COUNT(*)
---------------------
                10000

1 row fetched.

SQL> shutdown immediate;
shutdown immediate;

Succeed.

SQL> command terminated with exit code 137

➜  ~ kubectl exec -it yashantest-yashandb-compdef-0 sh
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
sh-4.4$ /home/yashan/bin/yasdb  open &
[1] 247
sh-4.4$ /home/yashan/bin/yasdb: error while loading shared libraries: libyas_server.so.0: cannot open shared object file: No such file or directory

[1]+  Done(127)               /home/yashan/bin/yasdb open
sh-4.4$
sh-4.4$  /home/yashan/bin/yasboot sql -d sys/yasdb_123@10.108.8.69:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64

Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux

SQL> select count(*) from test5;
select count(*) from test5;

[1:22]YAS-02012 table or view does not exist

SQL>

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 a pull request may close this issue.

2 participants