Skip to content

Fix vector index missing in telemetrics #21788

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

Merged
merged 7 commits into from
Jun 4, 2025

Conversation

jbajic
Copy link
Contributor

@jbajic jbajic commented May 27, 2025

Scope & Purpose

Vector index n_vector was missing in telemetrics is now added.

  • 💩 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)

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

@jbajic jbajic self-assigned this May 27, 2025
@cla-bot cla-bot bot added the cla-signed label May 27, 2025
"edge", "geo", "hash", "fulltext", "inverted",
"persistent", "skiplist", "ttl", "mdi", "mdi-prefixed",
"iresearch", "primary", "unknown"};
"iresearch", "primary", "vector", "unknown"};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For telemetry schema consistency, we need to always report the vector index here, regardless of whether it is used or not.

Copy link
Contributor

@jvolmer jvolmer left a comment

Choose a reason for hiding this comment

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

LGTM, just some small comments.

return {
setUpAll: function () {
db._create(cn);
let coll = db._createEdgeCollection(cn3, {numberOfShards: 2});
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why the edge collection has 2 shards and the document collection has one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope I forgot about it. I will remove the uneeded stuff from the setup


function validateObjectAgainstSchema(obj, fieldDefinitions, currentPath) {
let allErrors = [];
const dataKeys = new Set(Object.keys(obj));
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why we need this variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

allErrors reports all found violations agains schema and dataKeys severs to check if some fields are duplicates

Copy link
Contributor

Choose a reason for hiding this comment

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

But you are just creating this set and delete stuff in it, you never read from it, therefore I am confused.

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 you are right. I missed that. Will fix it

if (mode !== "NULLABLE" && mode !== "REPEATED") {
// This case is for fields that are implicitly "REQUIRED".
// Given the schema's explicit modes, this path usually means the field is optional.
// errors.push(`Error at "${path}": Field is required but missing.`);
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this commented out? if it stays like this, we don't need this case.

@neunhoef neunhoef merged commit 0fb760a into devel Jun 4, 2025
7 checks passed
@neunhoef neunhoef deleted the bug-fix/vector-index-prometheus-schema branch June 4, 2025 08:50
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