Skip to content

Conversation

@kevinAlbs
Copy link
Contributor

@kevinAlbs kevinAlbs commented Jan 12, 2023

Summary

  • Add specification tests for Decimal128 Range Index.
  • Add prose tests for Decimal128 with Range Index.

Background & Motivation

Tests will require the libmongocrypt 1.7.0-alpha2 release. Binaries for 1.7.0-alpha2 are available on the upload-all task in Evergreen.

Decimal tests without precision have long runtimes. A single query can take a few seconds for a server response against a replica set. Here are sample runtimes from running the Go tests on my development machine:

--- PASS: TestClientSideEncryptionSpec (29.00s)
    --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json (29.00s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_$gt (2.31s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_$gte (1.87s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_$gt_with_no_results (1.84s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_$lt (1.84s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_$lte (2.02s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_$gt_and_$lt (2.37s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_equality (1.33s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Find_with_$in (1.34s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Aggregate_with_$gte (1.62s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Aggregate_with_$gt_with_no_results (2.01s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Aggregate_with_$lt (1.97s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Aggregate_with_$lte (2.10s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Aggregate_with_$gt_and_$lt (2.30s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Aggregate_with_equality (1.37s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Aggregate_with_$in (1.29s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Wrong_type:_Insert_Int (0.71s)
        --- PASS: TestClientSideEncryptionSpec/fle2-Range-Decimal-Correctness.json/Wrong_type:_Find_Int (0.69s)
PASS

Queries against a sharded cluster takes even longer and may exceed the default timeout with this server error: operation was interrupted because the transaction exceeded the configured 'transactionLifetimeLimitSeconds'. Decimal tests without precision are only run against a replica set, as is currently done in the server.

Tested were run with the Go driver here.

Please complete the following before merging:

- [ ] Update changelog. N/A. Test changes only

  • Make sure there are generated JSON files from the YAML test files.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded clusters, and serverless).

@kevinAlbs kevinAlbs marked this pull request as ready for review January 19, 2023 01:10
@kevinAlbs kevinAlbs requested a review from a team as a code owner January 19, 2023 01:10
@kevinAlbs kevinAlbs requested review from a team, DmitryLukyanov and comandeo and removed request for a team and comandeo January 19, 2023 01:10
Copy link

@DmitryLukyanov DmitryLukyanov left a comment

Choose a reason for hiding this comment

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

LGTM

@kevinAlbs kevinAlbs merged commit c94fefe into mongodb:master Jan 19, 2023
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