Skip to content

BTS 2183 - Fix restore with vector index when feature disabled #21885

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

Open
wants to merge 23 commits into
base: devel
Choose a base branch
from

Conversation

jbajic
Copy link
Contributor

@jbajic jbajic commented Jul 24, 2025

Scope & Purpose

Fix restore with vector index when the feature is disabled. This previously crashed; now the vector indexes are ignored, restoration proceeds, and a message is logged.

  • 💩 Bugfix
  • 🍕 New feature
  • 🔥 Performance improvement
  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.12.0: (Please link PR)
    • Backport for 3.11: (Please link PR)
    • Backport for 3.10: (Please link PR)

Related Information

(Please reference tickets / specification / other PRs etc)

@jbajic jbajic self-assigned this Jul 24, 2025
@cla-bot cla-bot bot added the cla-signed label Jul 24, 2025
@jbajic jbajic marked this pull request as ready for review July 25, 2025 09:49
return data;
}

function createDumpJsonFile(path, databaseName, id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an unused function.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of duplicating functions from tests/js/client/shell/shell-restore-integration.js they rather should be moved out of it to js/client/modules/\@arangodb/test-helper.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I assumed eslint would report unused functions. I will move the copied stuff into test-helper.js

const isCluster = require("internal").isCluster();
const { executeExternalAndWaitWithSanitizer } = require('@arangodb/test-helper');
const { versionHas } = require("@arangodb/test-helper");
const dbs = [{"name": "maçã", "id": "9999994", "isUnicode": true}, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dbs, validatorJson are also unused.


const jsunity = require('jsunity');
const {assertTrue, assertFalse, assertEqual, assertNotEqual, assertInstanceOf} = jsunity.jsUnity.assertions;
const internal = require('internal');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal, isCluster, few of the asserts, etc. are also unused and can be removed.

Copy link
Contributor

@dothebart dothebart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • please don't duplicate testfunctions, use the test-helper as utility file to share them
  • use the client-tools to manage sub-processes. (asan, locating binaries ... all done for you)

assertTrue(fs.isFile(arangorestore), "arangorestore not found!");

let addConnectionArgs = function (args) {
let endpoint = arango.getEndpoint().replace(/\+vpp/, '').replace(/^http:/, 'tcp:').replace(/^https:/, 'ssl:').replace(/^h2:/, 'tcp:');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should be able to directly use the GLOBAL.instancemanager.endpoint here.

const cn = 'UnitTestsVectorIndexRestore';
const arangorestore = pu.ARANGORESTORE_BIN;

assertTrue(fs.isFile(arangorestore), "arangorestore not found!");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see runArangoDumpRestore being used in the file you shared

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its named arangoDumpRestoreWithConfig through export logics.

return data;
}

function createDumpJsonFile(path, databaseName, id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of duplicating functions from tests/js/client/shell/shell-restore-integration.js they rather should be moved out of it to js/client/modules/\@arangodb/test-helper.js

Copy link
Contributor

@k0ushal k0ushal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants