Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CHECK DATABASE idempotency #970

Copy link
Copy link

Description

@gramian
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

questionFurther information is requestedFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.