module Google::Protobuf::DescriptorPool
Monkey-patch the `Google::Protobuf::DescriptorPool` with a mutex for exclusive access.
The DescriptorPool instance is not thread-safe when loading protobuf definitions. This can cause unrecoverable errors when registering multiple concurrent pipelines that try to register the same dependency. The DescriptorPool instance is global to the JVM and shared among all pipelines.
Public Class Methods
with_lock()
click to toggle source
# File lib/logstash/codecs/protobuf.rb, line 15 def with_lock if !@mutex @mutex = Mutex.new end return @mutex end