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

Queries against sys.querylog_catalog, sys.querylog_calls or sys.querylog_history fail after restore of a db created using call sys.hot_snapshot(R'\path\file.tar'); #7182

Closed
mvdvm opened this issue Oct 7, 2021 · 1 comment
Assignees
Labels
bug Something isn't working major Server Tools
Milestone

Comments

@mvdvm
Copy link
Contributor

mvdvm commented Oct 7, 2021

Describe the bug
Queries against sys.querylog_catalog or sys.querylog_calls or sys.querylog_history fail with error:
HY013 Could not allocate space
on a demo db which was restored from a db created with
call sys.hot_snapshot(R'\path\file.tar');

Apparently the sys.hot_snapshot() functionality is not 100% complete, it missed some files which cause server errors when the db is restored.

To Reproduce
start mserver5 (Jul2021-SP1) on windows
start mclient
in mclient do:

call sys.hot_snapshot(R'C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo_bu2021_10_07.tar');
stop mclient
stop mserver5

In explorer go to C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm
rename original demo db folder to demo_orig
open demo_bu2021_10_07.tar file (with 7-Zip utility) and drag the demo folder to the dbfarm directory (to copy the demo dir and files to local HD).

Notice the difference in folder sizes (view properties on the folder) between
demo_orig (9,867,264 bytes 239 Files, 10 Folders)
and the restored db from the demo_bu2021_10_07.tar snapshot backup in the demo folder
demo (4,014,080 bytes 186 Files, 7 Folders).
So many files and folders were not included in the snapshot backup !!

start mserver5 (Jul2021-SP1) on windows using demo db
start mclient
in mclient do:
SELECT COUNT() AS count FROM sys.querylog_catalog;
SELECT COUNT(
) AS count FROM sys.querylog_calls;
SELECT COUNT(*) AS count FROM sys.querylog_history;

It returns for each query error: HY013 Could not allocate space
stop mclient

start JdbcClient
in JdbcClient do:
\vsci

This special command will validate all the system catalog tables integrity.
It will list the same error for some 12 queries against these 3 system tables.

stop Jdbcclient

The mserver5 console shows:
#2021-10-07 17:41:55: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\53\5303.tail: No such file or directory
#2021-10-07 17:41:55: client1: BBPrename: !ERROR: name is in use: 'querylog_cat_id'.
#2021-10-07 17:41:55: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\36\3631.tail: No such file or directory
#2021-10-07 17:41:55: client1: BBPrename: !ERROR: name is in use: 'querylog_cat_defined'.
#2021-10-07 17:41:55: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\23\2325.tail: No such file or directory
#2021-10-07 17:41:55: client1: BBPrename: !ERROR: name is in use: 'querylog_cat_mal'.
#2021-10-07 17:41:55: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\27\2746.tail: No such file or directory
#2021-10-07 17:41:55: client1: BBPrename: !ERROR: name is in use: 'querylog_cat_optimize'.
#2021-10-07 17:41:55: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\60\6062.tail: No such file or directory
#2021-10-07 17:41:55: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_id'.
#2021-10-07 17:41:56: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\05\513.tail: No such file or directory
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_start'.
#2021-10-07 17:41:56: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\34\3405.tail: No such file or directory
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_stop'.
#2021-10-07 17:41:56: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\46\4624.tail: No such file or directory
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_tuples'.
#2021-10-07 17:41:56: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\12\1272.tail: No such file or directory
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_exec'.
#2021-10-07 17:41:56: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\33\3360.tail: No such file or directory
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_result'.
#2021-10-07 17:41:56: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\31\3143.tail: No such file or directory
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_cpuload'.
#2021-10-07 17:41:56: client1: GDKextend: !ERROR: cannot open file C:\Users\myname\AppData\Roaming\MonetDB5\dbfarm\demo\bat\32\3264.tail: No such file or directory
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: 'querylog_calls_iowait'.
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: ''.
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: '
'.
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: ''.
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: '
'.
#2021-10-07 17:41:56: client1: BBPrename: !ERROR: name is in use: '_'.
#2021-10-07 17:41:56: client1: createExceptionInternal: !ERROR: MALException:querylog.init:HY013!Could not allocate space

Expected behavior
The system tables should be queryable without errors
The tar file created using hot_snapshot() should include all necessary files and folders to correctly restore a database.

Software versions

MonetDB 5 server v11.41.9 (Jul2021-SP1)

Serving database 'demo', using 4 threads

Compiled for amd64-pc-windows-msvc/32bit

Found 3.240 GiB available main-memory of which we use 1.500 GiB

Copyright (c) 1993 - July 2008 CWI.

Copyright (c) August 2008 - 2021 MonetDB B.V., all rights reserved

Visit https://www.monetdb.org/ for further information

Listening for connection requests on mapi:monetdb://localhost:50000/

MonetDB/GIS module loaded

MonetDB/SQL module loaded

MonetDB server is started. To stop server press Ctrl-C.

@mvdvm mvdvm added bug Something isn't working Server Tools major labels Oct 7, 2021
@mvdvm mvdvm added this to the NEXTRELEASE milestone Oct 7, 2021
@joerivanruth
Copy link
Member

This has been fixed in Jul2022-SP2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major Server Tools
Projects
None yet
Development

No branches or pull requests

3 participants