Skip to content

feat: make KVS max snapshot count configurable - #383

Open
atarekra wants to merge 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:kvs-configurable-max-snapshots
Open

feat: make KVS max snapshot count configurable#383
atarekra wants to merge 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:kvs-configurable-max-snapshots

Conversation

@atarekra

Copy link
Copy Markdown
Contributor

The C++ KVS fixed the number of snapshots at three via the KVS_MAX_SNAPSHOTS macro, so comp_req__kvs__snapshot_max_num ("configurable maximum number of snapshots") was not met and the component integration tests xfailed all C++ boundary cases.

Replace the macro with a namespaced KVS_DEFAULT_MAX_SNAPSHOTS constant and add KvsBuilder::snapshot_max_count(), forwarded through Kvs::open() into a per-instance member used by snapshot counting, rotation and the reported maximum. The value is bound at init-time and immutable afterwards, since lowering it on a live store would orphan snapshot files that rotation would never reclaim.

A configured maximum of zero keeps no previous generation but still persists the current KVS data, matching the Rust backend, which rotates (a no-op at zero) and then always saves snapshot 0.

Also fix SnapshotMaxCount::run reading a "count" field its scenario config never supplies, which the blanket xfail had been hiding.

Resolves #108

The C++ KVS fixed the number of snapshots at three via the
KVS_MAX_SNAPSHOTS macro, so comp_req__kvs__snapshot_max_num
("configurable maximum number of snapshots") was not met and the
component integration tests xfailed all C++ boundary cases.

Replace the macro with a namespaced KVS_DEFAULT_MAX_SNAPSHOTS
constant and add KvsBuilder::snapshot_max_count(), forwarded through
Kvs::open() into a per-instance member used by snapshot counting,
rotation and the reported maximum. The value is bound at init-time
and immutable afterwards, since lowering it on a live store would
orphan snapshot files that rotation would never reclaim.

A configured maximum of zero keeps no previous generation but still
persists the current KVS data, matching the Rust backend, which
rotates (a no-op at zero) and then always saves snapshot 0.

Also fix SnapshotMaxCount::run reading a "count" field its scenario
config never supplies, which the blanket xfail had been hiding.
@github-actions

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 337fd0ee-03e8-4249-8af2-2d4516cca357
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 3 packages loaded
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)

Analyzing: target //:license-check (32 packages loaded, 10 targets configured)

Analyzing: target //:license-check (90 packages loaded, 10 targets configured)

Analyzing: target //:license-check (145 packages loaded, 1805 targets configured)

Analyzing: target //:license-check (149 packages loaded, 3125 targets configured)

Analyzing: target //:license-check (149 packages loaded, 3125 targets configured)

Analyzing: target //:license-check (149 packages loaded, 3125 targets configured)

Analyzing: target //:license-check (160 packages loaded, 7420 targets configured)

Analyzing: target //:license-check (162 packages loaded, 9315 targets configured)

Analyzing: target //:license-check (172 packages loaded, 9372 targets configured)

Analyzing: target //:license-check (173 packages loaded, 9496 targets configured)

INFO: Analyzed target //:license-check (177 packages loaded, 11510 targets configured).
[13 / 17] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions, 1 running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 66 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[16 / 17] [Prepa] Building license.check.license_check.jar ()
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 30.741s, Critical Path: 2.43s
INFO: 17 processes: 12 internal, 4 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 17 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvement: set KVS_MAX_SNAPSHOTS as configuration parameter

1 participant