Exception: PartitionGardener::UnmovedRowsRemaining

Inherits:
StandardError
  • Object
show all
Defined in:
lib/partition_gardener/unmoved_rows_remaining.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_partition_name:, batch_size:, last_cursor:) ⇒ UnmovedRowsRemaining

Returns a new instance of UnmovedRowsRemaining.



5
6
7
8
9
10
11
12
13
# File 'lib/partition_gardener/unmoved_rows_remaining.rb', line 5

def initialize(source_partition_name:, batch_size:, last_cursor:)
  @source_partition_name = source_partition_name
  @batch_size = batch_size
  @last_cursor = last_cursor
  super(
    "Stopped moving rows from #{source_partition_name}: " \
    "batch selected #{batch_size} row(s) but none could be removed"
  )
end

Instance Attribute Details

#batch_sizeObject (readonly)

Returns the value of attribute batch_size.



3
4
5
# File 'lib/partition_gardener/unmoved_rows_remaining.rb', line 3

def batch_size
  @batch_size
end

#last_cursorObject (readonly)

Returns the value of attribute last_cursor.



3
4
5
# File 'lib/partition_gardener/unmoved_rows_remaining.rb', line 3

def last_cursor
  @last_cursor
end

#source_partition_nameObject (readonly)

Returns the value of attribute source_partition_name.



3
4
5
# File 'lib/partition_gardener/unmoved_rows_remaining.rb', line 3

def source_partition_name
  @source_partition_name
end