Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-8624

Improve INCRBYFLOAT accuracy for very large values

    XMLWordPrintableJSON

Details

    Description

      Currently native redis appears to be able to apply INCRBYFLOAT on values that are below the max of unsigned long long (18446744073709551615). However, since we're treating numbers as {{double}}s we can lose precision for very large values. For example:

      set val 18446744073709551614
      incrbyfloat val 1

      incorrectly returns 18446744073709552000

      Native redis produces a correct result.

      We should consider switching to using BigInteger for all commands which perform calculations: INCR, INCR, INCRBYFLOAT, HINCRBY, HINCRBYFLOAT.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jens.deppe Jens Deppe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: