- 
                Notifications
    
You must be signed in to change notification settings  - Fork 44
 
Prevent txlog backfill from including ACS imports #2128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: oriol/acs-ingestion-begin
Are you sure you want to change the base?
Prevent txlog backfill from including ACS imports #2128
Conversation
Signed-off-by: Oriol Muñoz <[email protected]>
59fc489    to
    eaca3c8      
    Compare
  
    Signed-off-by: Oriol Muñoz <[email protected]>
| Future.successful( | ||
| DestinationHistory.InsertResult( | ||
| backfilledUpdates = 0L, | ||
| backfilledEvents = 0L, | ||
| lastBackfilledRecordTime = | ||
| items.headOption.map(_.update.recordTime).getOrElse(CantonTimestamp.MinValue), | ||
| ) | ||
| .transactionally, | ||
| "destinationHistory.insert", | ||
| ) | ||
| } yield DestinationHistory.InsertResult( | ||
| backfilledUpdates = trees.size.toLong, | ||
| backfilledEvents = | ||
| trees.foldLeft(0L)((sum, tree) => sum + tree.getEventsById.size().toLong), | ||
| lastBackfilledRecordTime = CantonTimestamp.assertFromInstant(nonEmpty.last.getRecordTime), | ||
| ) | ||
| ) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here be dragons, I don't understand why the previous was throwing an exception
Signed-off-by: Oriol Muñoz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remind me how exactly you got an exception here? The method includes the assertion
assert(
  tree.getRecordTime.isAfter(CantonTimestamp.MinValue.toInstant),
  "insert() must not be called with import updates",
)and looking at the call site (HistoryBackfilling), the method should really not be called with any items that have a record time of CantonTimestamp.MinValue.
| 
           @rautenrieth-da see this PR targeting this one which removes the filter, and these failures  | 
    
Fixes #2041 (comment)