Skip to content

Values read back with less detail than written after indexing; a re-upsert can then remove them #2057

Closed as duplicate

Description

@bplatz

Some values read back from the index with less detail than they were written with:

  • a dateTime or time with digits past the microsecond is stored to the microsecond;
  • -0.0 loses its sign;
  • a decimal's scale is dropped ("1.50" reads back as 1.5).

(An integer beyond 64 bits losing its XSD subtype is #2027.)

Once such a value is indexed (for temporals, once it is reloaded from its commit), an identical re-upsert or re-sync of the document that wrote it is not a no-op: the stored decode and the written term are two terms with one index key, so the write retracts the decode and asserts the term under that key, and can remove the value. main behaves the same way; #2008's upgrade notes and upsert.md describe the exception, and #2008 adds two ignored tests for it (big-integer subtype, sub-microsecond dateTime).

Fix direction: normalize values to storage precision where they are written, or keep the lost detail in the index, so a written term and its stored decode are one term.

Found while reviewing #2008. Related: #2027.

Activity

  1. added
    bug
    P2
    area:storage
    on Oct 11, 2026
  2. bplatz commented on Oct 12, 2026

    @bplatz
    ContributorAuthor

    #2090 covers this item for item: the re-upsert that can remove a value, sub-microsecond dateTime / time, and -0.0 and decimal scale after indexing. It also carries the decision this needs (normalize where written, or keep the detail in the index). A PR that fixes those items in #2090 should close this one too.

  3. bplatz commented on Nov 20, 2026

    @bplatz
    ContributorAuthor

    Duplicate of #2090, which lists every case here (sub-microsecond dateTime/time, -0.0's sign, a decimal's scale) and the re-upsert that can remove such a value. #2090 now carries this issue's P2.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:storagebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions