Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions score/kvs/docs/requirements/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,44 +351,45 @@ Component Requirements

The component shall create a snapshot each time data is stored.

.. comp_req:: Snapshot Maximum Number
:id: comp_req__kvs__snapshot_max_num
.. comp_req:: Snapshot Explicit Creation
:id: comp_req__kvs__snapshot_explicit_creation
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__persistency__cfg[version==1]
:derived_from: feat_req__persistency__snapshot_create[version==1]
:status: valid
:version: 1
:belongs_to: comp__persistency_kvs[version==1]
:tags: inspected

The component shall maintain a configurable maximum number of snapshots.
The component shall create a snapshot in the first available slot when the snapshot_create function is explicitly called.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true, when comp_req__kvs__snapshot_id define ID=1 as latest and ID=2,3,4... as older.
Maybe add clear explanation how creation and removal operations affect snapshot IDs available in the system.

In the C++ implementation, slot 0 always holds the latest current the KVS (written on flush),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requirements should not discuss implementation details for one of the implementations.

while slots 1 through 3 are available for explicitly created snapshots.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true, when number of snapshots is configurable.


.. comp_req:: Snapshot IDs
:id: comp_req__kvs__snapshot_id
.. comp_req:: Snapshot Maximum Number
:id: comp_req__kvs__snapshot_max_num
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__persistency__snapshot_create[version==1]
:derived_from: feat_req__persistency__cfg[version==1]
:status: valid
:version: 1
:belongs_to: comp__persistency_kvs[version==1]
:tags: inspected

The component shall assign the ID 1 to the newest snapshot and shall increment the IDs of older snapshots accordingly.
The component shall maintain a configurable maximum number of snapshots.

.. comp_req:: Snapshot Rotation
:id: comp_req__kvs__snapshot_rotate
.. comp_req:: Snapshot IDs
:id: comp_req__kvs__snapshot_id
:reqtype: Functional
:security: NO
:safety: ASIL_B
:derived_from: feat_req__persistency__snapshot_remove[version==1],feat_req__persistency__snapshot_restore[version==1]
:derived_from: feat_req__persistency__snapshot_create[version==1]
:status: valid
:version: 1
:belongs_to: comp__persistency_kvs[version==1]
:tags: inspected

The component shall rotate and delete the oldest snapshot when the maximum number is reached.
The component shall assign the ID 1 to the newest snapshot and shall increment the IDs of older snapshots accordingly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd help to have a clear range of IDs available.


.. comp_req:: Snapshot Restore
:id: comp_req__kvs__snapshot_restore
Expand Down
Loading
Loading