Skip to content
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

Feature/vpack sorting test #41

Merged
merged 3 commits into from
Sep 18, 2024
Merged

Feature/vpack sorting test #41

merged 3 commits into from
Sep 18, 2024

Conversation

MDAlFattah
Copy link
Contributor

@MDAlFattah MDAlFattah commented Sep 17, 2024

Scope & Purpose

This PR adds a test for validating VPack numerical sorting in ArangoDB, specifically addressing sorting behavior for large numeric values across different versions.

Problem

Large numeric values were previously cast to doubles for comparison, leading to incorrect sorting and potential data corruption in RocksDB. The issue is fixed in versions 3.12.2 and 3.11.11, introducing a new comparator that requires migration for proper sorting.

Test Script

Insert Test Data: Add documents with large numeric values to test collections.
Initial Sorting Check:
Versions < 3.11.11 and < 3.12.2: Verify incorrect sorting (z, x, y).
Versions >= 3.11.11 and >= 3.12.2: Verify correct sorting (y, z, x).
Upgrade & Migration: Upgrade ArangoDB, run the migration, and verify sorting changes.
Final Check: Ensure correct sorting and data integrity after migration.

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

Checklist

// Insert test data:
progress('802: inserting test data');
db._query(aql`
INSERT { _key: "1", value: [1152921504606846976, "z"] } INTO ${c}
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add loopcount in another attribute

Copy link
Collaborator

@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 add the loop count to the documents so they're non-unique - maybe as key.

@dothebart dothebart merged commit 1942855 into main Sep 18, 2024
@MDAlFattah MDAlFattah mentioned this pull request Sep 19, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants