The function that refreshes the aws-s3 input's state in the registry, (*states).writeStates, is called by (*s3Poller).Purge, which processes acknowledged event pages and finalizes their state. However, depending on the input configuration and the size of the target bucket, Purge can be called many times concurrently, whereas the statestore.Store object used to write to the registry is meant to be owned by a single goroutine. This can lead to several goroutines writing to the same non-synchronized object at the same time, which can cause instability and registry corruption.
This issue is one of the factors causing elastic/integrations#9463.
The function that refreshes the
aws-s3input's state in the registry,(*states).writeStates, is called by(*s3Poller).Purge, which processes acknowledged event pages and finalizes their state. However, depending on the input configuration and the size of the target bucket,Purgecan be called many times concurrently, whereas thestatestore.Storeobject used to write to the registry is meant to be owned by a single goroutine. This can lead to several goroutines writing to the same non-synchronized object at the same time, which can cause instability and registry corruption.This issue is one of the factors causing elastic/integrations#9463.