Exception: Familia::IndexedFieldFastWriteError
- Inherits:
-
PersistenceError
- Object
- RuntimeError
- Problem
- PersistenceError
- Familia::IndexedFieldFastWriteError
- Defined in:
- lib/familia/errors.rb
Overview
Raised when a fast-write method is asked to write a field that backs a class-level index. Fast writers issue a single HMSET with no surrounding claim, so they cannot maintain index consistency without violating the fail-closed ordering in ADR-0002. Use multi_field_update, save_fields, or save for indexed fields.
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#index_name ⇒ Object
readonly
Returns the value of attribute index_name.
-
#offenders ⇒ Object
readonly
Returns the value of attribute offenders.
Instance Method Summary collapse
-
#initialize(field, index_name, offenders: nil) ⇒ IndexedFieldFastWriteError
constructor
A new instance of IndexedFieldFastWriteError.
Constructor Details
#initialize(field, index_name, offenders: nil) ⇒ IndexedFieldFastWriteError
Returns a new instance of IndexedFieldFastWriteError.
140 141 142 143 144 145 |
# File 'lib/familia/errors.rb', line 140 def initialize(field, index_name, offenders: nil) @field = field @index_name = index_name @offenders = offenders || [[field, index_name]] super() end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
131 132 133 |
# File 'lib/familia/errors.rb', line 131 def field @field end |
#index_name ⇒ Object (readonly)
Returns the value of attribute index_name.
131 132 133 |
# File 'lib/familia/errors.rb', line 131 def index_name @index_name end |
#offenders ⇒ Object (readonly)
Returns the value of attribute offenders.
131 132 133 |
# File 'lib/familia/errors.rb', line 131 def offenders @offenders end |