Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix thread-safety issue with sequel iteration #185

Merged
merged 2 commits into from May 16, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
Avoid using sequel's iteration over dataset
The dataset.each is not thread-safe, as described in documentation for
the method

   https://github.com/jeremyevans/sequel/blob/4.20.0/lib/sequel/dataset/actions.rb#L126-L142

I suspect this to cause intermittent segmentation faults when under
heaver load.
  • Loading branch information
iNecas committed May 11, 2016
commit 1510982b3d2b641ee4248cf6aa0ad9bd5392f828
2 changes: 1 addition & 1 deletion lib/dynflow/persistence_adapters/sequel.rb
Expand Up @@ -183,7 +183,7 @@ def find_coordinator_records(options)
if exclude_owner_id
data_set = data_set.exclude(:owner_id => exclude_owner_id)
end
data_set.map { |record| load_data(record) }
data_set.all.map { |record| load_data(record) }
end

def to_hash
Expand Down