GeezerVison is showing github.com — `CHECK DATABASE` idempotency · Issue #970 · ArcadeData/arcadedb
CHECK DATABASE idempotency #970
Labels questionFurther information is requested DescriptionArcadeDB Version: 23.2.1 (build e8f512f/1677638572021/main)
JDK Version: openjdk 11.0.18 2023-01-17
OS: MacOS 12.6
Using CHECK DATABASE via a query results in an error, even though this command (without FIX) should just report and not change the database, right? Or not? Obviously, CHECK DATABASE FIX is not idempotent.
Expected behavior
{"user":"root","version":"23.2.1 (build e8f512fa466c4a32ef9d14d89af20e7ac2859c7e/1677638572021/main)","serverName":"ArcadeDB_0","result":[{"operation":"check database","avgPageUsed":0.15671158,"warnings":[],"totalErrors":0,"totalSurrogateRecords":0,"pageSize":5242880,"totalAllocatedDocuments":9,"totalDeletedRecords":0,"totalAllocatedRecords":10,"totalActiveDocuments":9,"deletedRecordsAfterFix":[],"totalActiveRecords":10,"totalActiveEdges":0,"totalMaxOffset":82162,"totalAllocatedVertices":1,"corruptedRecords":[],"totalPages":10,"totalPlaceholderRecords":0,"rebuiltIndexes":[],"totalAllocatedEdges":0,"invalidLinks":0,"autoFix":0,"totalActiveVertices":1}]}
Actual behavior
{"error":"Cannot execute command","detail":"Query \u0027CHECK DATABASE\u0027 is not idempotent","exception":"java.lang.IllegalArgumentException"}
Steps to reproduce
curl -X GET http://localhost:2480/api/v1/query/test/sql/CHECK%20DATABASE --user root:mypassword
Furthermore
CHECK DATABASE seems not be useable in a sub-query or inline LET; neither:
SELECT $a.warnings LET a = CHECK DATABASE;
SELECT coalesce((CHECK DATABASE)).warnings;
SELECT warnings FROM (CHECK DATABASE);
work. Activitylvca commented on Mar 23, 2023 The check database could have the -fix clause, so it has been excluded from the query command. gramian commented on Mar 23, 2023 CollaboratorAuthor More actions @lvca Got it, I thought CHECK DATABASE and CHECK DATABASE FIX were different commands. Thanks for clarifying.
Just to make sure though, practically CHECK DATABASE (without FIX) is idempotent, right? lvca commented on Mar 23, 2023
MetadataMetadataquestionFurther information is requested DevelopmentNo branches or pull requestsIssue actions
|