Enhancement #7622

Utility for history data stream truncation to given timestamp

Added by Tuukka Lehtonen 5 months ago. Updated 5 months ago.

Status:ClosedStart date:2017-11-15
Priority:4Due date:2017-11-20
Assignee:Tuukka Lehtonen% Done:

100%

Category:-Spent time:-
Target version:2017-27
Release notes:Added @org.simantics.simulation.history.HistoryUtil@ utility method for truncating history data streams to a specified timestamp.
Tags: subscription, history, 1.31.0, truncate
Story points-
Velocity based estimate-
ReleaseSimantics 1.31.0Release relationshipAuto

Description

Some dynamic simulation systems can do backtracking, i.e. returning the simulator to a state that existed earlier in time. If simulation is continued from this earlier time then subscribed history data needs to be truncated so that there are no samples in the history data streams with timestamps greater than the time where simulation was resumed from.

Associated revisions

Revision b93b0859
Added by Tuukka Lehtonen 5 months ago

Added utility for truncating collected history data

The utility also supports an approximate truncation of the dynamic
CollectorState structure related to an active Collector instance.

refs #7622

Change-Id: I0041f26ca53250f3bed22f32de6c789f80a607c5

Revision 908f3683
Added by Tuukka Lehtonen 5 months ago

Tested and fixed utility for truncating history data.

HistoryUtil.truncateHistory now actually works as intended. Care must be
taken not to interfere with the history data while it is being
truncated. This must be ensured externally.

A reference counter (AtomicInteger) was also added to ChartData to be
able to see how many users the ChartData has and to wait until it no
longer has any users. This is required to wait until all chart editors
have detached themselves from the history data.

refs #7622

Change-Id: I35863f5258da2cae193b3086500b5514c4699518

History

#1 Updated by Tuukka Lehtonen 5 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
  • Release notes set to Added @org.simantics.simulation.history.HistoryUtil@ utility method for truncating history data streams to a specified timestamp.

#2 Updated by Tuukka Lehtonen 5 months ago

  • Subject changed from Utilities for history data stream truncation to given timestamp to Utility for history data stream truncation to given timestamp

#3 Updated by Tuukka Lehtonen 5 months ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF