fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Bulk upsert for login aggregator may fail for larger interval counts

Open robotdan opened this issue 3 years ago • 1 comments

Bulk upsert for login aggregator may fail for larger interval counts

Description

Postgresql uses a 2 byte int (short) for parameterized types, and it is possible that there is a large enough spread in login intevals that a bulk upsert in the aggregator will exceed this limit.

The bulk upsert for application counts has for values, so we can really only bulk insert up to ~ 8k records at once before we hit the max value of 32,767.

For global login counts it is ~ 10k since we only have 3 values per record.

We'll need to account for this possibility and chunk it up. This only affects PostgreSQL.

Affects versions

TBD

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

Additional context

Add any other context about the problem here.

robotdan avatar Aug 31 '22 00:08 robotdan