You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stale race: use atomic methods for deletions, mark deleted nodes
Refactor of `S3::FileRepository` to avoid several closely-related race
conditions:
- prevent `get_factory()` from yielding a factory that was
mid-deletion by the stale watcher, which could cause the plugin
crash due to the file no longer existing on disk. This is solved
by marking a factory's prefix wrapper as deleted while the stale
watcher has exclusive access to it, and checking for deletion
status before yielding exclusive access to a prefix wrapper's factory.
- eliminates `get_factory()`'s non-atomic `Concurrent::Map#fetch_or_store`,
which could cause multiple factories to be created for a single
prefix, only one of which would be retained and bytes written to
the other(s) would be lost.
- introduce `each_factory`, which _avoids_ creating new factories
or yielding deleted ones.
- refactor `each_files` to use new `each_factory` to avoid yielding
files whose factories have been deleted.
Additionally, `S3#rotate_if_needed` was migrated to use the now-safer
`S3::FileRepository#each_factory` that _avoids_ initializing new
factories (and therefore avoids creating empty files on disk after
the existing ones had been stale-reaped).
Copy file name to clipboardExpand all lines: logstash-output-s3.gemspec
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Gem::Specification.newdo |s|
2
2
s.name='logstash-output-s3'
3
-
s.version='4.4.0'
3
+
s.version='4.4.1'
4
4
s.licenses=['Apache-2.0']
5
5
s.summary="Sends Logstash events to the Amazon Simple Storage Service"
6
6
s.description="This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
0 commit comments