close
Skip to content

CHECK DATABASE idempotency #970

@gramian

Description

@gramian

ArcadeDB 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.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions