Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mensfeld committed Dec 19, 2023
1 parent 8c3a797 commit f6d3c0c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/waterdrop/clients/buffered.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def begin_transaction
def commit_transaction
@transaction_level -= 1

return unless @transaction_level.zero?

# Transfer transactional data on success
@transaction_topics.each do |topic, messages|
@topics[topic] += messages
Expand All @@ -65,17 +63,12 @@ def commit_transaction
# @param _tpl [Rdkafka::Consumer::TopicPartitionList] consumer tpl for offset storage
# @param _timeout [Integer] ms timeout
def send_offsets_to_transaction(_consumer, _tpl, _timeout)
return unless @transaction_level.zero?

raise Errors::TransactionRequiredError
nil
end

# Aborts the transaction
def abort_transaction
@transaction_level -= 1

return unless @transaction_level.zero?

@transaction_topics.clear
@transaction_messages.clear
@transaction_active = false
Expand Down

0 comments on commit f6d3c0c

Please sign in to comment.