Skip to content

Digest::Base cannot be directly inherited in Ruby #45

@werleo

Description

@werleo

We call aerospike in sidekiq workers which requires to have all classes thread safe.

Calling Aerospike::Key.new(arguments)

raises Digest::Base cannot be directly inherited in Ruby

1 gems/aerospike-2.3.0/lib/aerospike/key.rb" line 31 in new
2 gems/aerospike-2.3.0/lib/aerospike/key.rb" line 31 in block in <class:Key>
3 gems/aerospike-2.3.0/lib/aerospike/utils/pool.rb" line 46 in rescue in poll
4 gems/aerospike-2.3.0/lib/aerospike/utils/pool.rb" line 43 in poll
5 gems/aerospike-2.3.0/lib/aerospike/key.rb" line 117 in compute_digest
6 gems/aerospike-2.3.0/lib/aerospike/key.rb" line 61 in initialize

From ruby docs we can call Digest classes in thread safe manner:
https://docs.ruby-lang.org/en/2.2.0/Object.html#method-i-Digest

I think it should be done here:
https://github.com/aerospike/aerospike-client-ruby/blob/master/lib/aerospike/key.rb#L31

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions