Segments

Figure 1. Runtime Engineering - Segments

The list view on the left shows all existing archive groups. By clicking on an archive group, all currently known segments are shown on the right of the panel with start and end time as well as status. The colored status indicator (red / green) shows the accessibility of the archive group (green = connected to backend, connected to DB and group is set to active). Use the buttons on the right side to backup, restore, delete or switch between segments.

The following states are defined (see also state model)

  • Current: The segment exists and is currently being used to store data. There is always exactly one segment with state Current. In some special cases this rule is not applied - see the NOTE at the end of this list.
  • Online: The segment is locally present and available for read and write operations for data belonging to this time range in the past.
  • Online and Backed up: The segment exists locally and is available for read operations. It is automatically deleted if the parameters for deletion ("age") apply. If an additional value or an alert (correction values, alert update, etc.) is written to a segment that has already been backed up but is still online (status = online and backed up), the status of the segment changes to "online" and the old backup is replaced the next time a backup is triggered.
  • Offline and Backed up: The segment is available at backup location but cannot be read or written. Can be restored.
  • Restored: The segment is present and available for read operations but will not be deleted automatically.
  • Deleted: The segment does not exist (not locally or at a backup location) and cannot be restored, written to or read.
Note:

InfluxDB® opens one file for each segment.

Therefore, the number of allowed file handles for one process must be at least the maximum number of segments possible according to the archive group's configuration.

If there are not enough file handles available, an error message like the following is written to the log file.

WCCOAnextgenarch(118), 2023.01.23 11:24:04.716, IMPL, SEVERE,69, Database error, 
Error while writing values, database response: [shard <shard number>] 
open <influx database path>/<archive group>/<shard number>/index/2/MANIFEST: 
too many open files (from <backend data point name>) 

If data is not written for a longer time, the InfluxDB® does not create any new segments. If a backup should be made, the newest existing segment will be changed from "Current" to "Online". Otherwise, the backup would not work

The transition between the different states can be done manually and / or automatically. Note that a Restore always has to be done manually and Switch cannot be done manually with specific databases / backends (e.g. with InfluxDB®).

Figure 2. NGA segment status model including transitions

Every segment also carries a unique ID which is used internally to address a specific segment.

Depending on the segments which have been selected in the segment list, some of the operations may not be available (button is greyed out).

  • Use a single click to select one segment,
  • Use "Shift + click" to select all segments between the segment clicked before and the current one,
  • Use "Ctrl + click" to independently select this segment in addition to segments which were already selected before. This means ,e.g., only segments with status “Offline and backed up” can be restored or the “Current” segment cannot be deleted.

When segments are backed up, note the following:

EXAMPLE: "Backup Segments older than" is set to 3. When segments are backed up, the "Current" segment and the two youngest "Online" segments are not backed up. Older "Online" segments are backed up.

For segment backup configuration, see the chapter Configuration - Archive Group.