Skip to content

Commit

Permalink
fix(bigtable): Avoid a potential protobuf memory leak (#28101)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Dec 12, 2024
1 parent b67b083 commit 9521791
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions google-cloud-bigtable/lib/google/cloud/bigtable/row_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,6 @@ module Bigtable
# Google::Cloud::Bigtable::RowFilter.cells_per_row 10
#
module RowFilter
# @private
PASS = SimpleFilter.new.pass.freeze

# @private
BLOCK = SimpleFilter.new.block.freeze

# @private
SINK = SimpleFilter.new.sink.freeze

# @private
STRIP_VALUE = SimpleFilter.new.strip_value.freeze

private_constant :PASS, :BLOCK, :SINK, :STRIP_VALUE

##
# Creates a chain filter instance.
#
Expand Down Expand Up @@ -294,7 +280,7 @@ def self.condition predicate
# filter = Google::Cloud::Bigtable::RowFilter.pass
#
def self.pass
PASS
SimpleFilter.new.pass
end

##
Expand All @@ -311,7 +297,7 @@ def self.pass
# filter = Google::Cloud::Bigtable::RowFilter.block
#
def self.block
BLOCK
SimpleFilter.new.block
end

##
Expand All @@ -328,7 +314,7 @@ def self.block
# filter = Google::Cloud::Bigtable::RowFilter.sink
#
def self.sink
SINK
SimpleFilter.new.sink
end

##
Expand All @@ -344,7 +330,7 @@ def self.sink
# filter = Google::Cloud::Bigtable::RowFilter.strip_value
#
def self.strip_value
STRIP_VALUE
SimpleFilter.new.strip_value
end

##
Expand Down

0 comments on commit 9521791

Please sign in to comment.