Import API can cause the elastic index refresh_interval
to be set to -1s
unintentionally
#2679
Closed
1 task done
Concurrent Import API can cause the elastic index refresh_interval to be set to -1s unintentionally
Description
If two imports are completed at the roughly same time, a race condition exists where the
refresh_internal
might be set to-1
after the import is complete. Once an import completes, the refresh interval should be1s
and our default setting for the refresh interval is1s
. When therefresh_interval
is-1
, indexed data (well since the last time that ES has updated its cache) is not available in searches.Observed versions
1.48.3
Affects versions
Steps to reproduce
Steps to reproduce the behavior:
1s
after the import process completes.Expected behavior
For performance reasons, we increase/turn off the
refresh_interval
during an import. However, we should always return this interval to a default like1s
.Screenshots
If applicable, add screenshots to help explain your problem. Delete this section if it is not applicable.
Platform
FA Dev setup
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
Additional context
The refresh interval can be checked using the following command
The refresh interval can be updated with the following command (must have access to ES service)
Documentation
fusionauth-app.search.default-refresh-interval
config valueRelease Notes
Fixes a race condition in the bulk user import API
/api/user/import
that could set the Elasticsearchrefresh_interval
to-1
and prevent newly created users from being searchable. This condition was triggered by concurrent bulk requests with specific timing.The text was updated successfully, but these errors were encountered: