Fix race condition of out_secondary_file - #4081
Conversation
|
I have confirmed this solves #4080. |
|
I have one point of concern. When confirming this solves #4080, I noticed that a large number of lock files remain during Fluentd running because the files are not deleted after exiting the block. fluentd/lib/fluent/plugin/base.rb Lines 79 to 90 in e58fd66 Is this OK? |
fe65b4f to
c95b52a
Compare
|
Test for c95b52a. Use the same way ( Result:
|
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
c95b52a to
6acf958
Compare
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com> Co-authored-by: Takuro Ashie <ashie@clear-code.com>
so that other plugins can use this feature. Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
|
Test for ce32ac5. Use the same way ( Result:
I plan to do more tests at the end of this PR. |
|
I will add some unit tests for the lock feature, although it is hard to test race condition strictly. |
|
@ashie Could you please check if the direction of this fix is OK? |
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com> Co-authored-by: Takuro Ashie <ashie@clear-code.com>
to unify the existing method: `acquire_worker_lock`. Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com> Co-authored-by: Takuro Ashie <ashie@clear-code.com>
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
488896b to
edcbd4b
Compare
|
I will test this issue again, and add some tests for this new lock feature. |
|
Test for edcbd4b. Use the same way ( Result:
|
f55838a to
f23e7e6
Compare
Done. |
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
|
By the way, might |
|
Thanks! |
Which issue(s) this PR fixes:
Fixes #4080
What this PR does / why we need it:
For solving race condition issues of
out_secondary_file.out_file: Add support for concurrent append in out_file #3808.Docs Changes:
Not needed.
Release Note:
Same as the title.