Skip to content

Enhance volume list label filter operation - #857

Open
balpert89 wants to merge 8 commits into
ironcore-dev:mainfrom
opensovereigncloud:osc/enh/volume-list
Open

balpert89 wants to merge 8 commits into
ironcore-dev:mainfrom
opensovereigncloud:osc/enh/volume-list

Conversation

@balpert89

@balpert89 balpert89 commented Apr 14, 2026 •

Copy link
Copy Markdown

Proposed Changes

  • Add IRIVolume labels to Image during volume creation
  • Add ListByLabels function to list omap store images using label selector
  • Remove filterVolumes function to enhance volume list processing

Fixes #851

Summary by CodeRabbit

  • New Features

    • Faster label-based volume queries via an in-memory label index; selector-based listings are accelerated.
    • Image creation now preserves source volume labels on new images.
  • Bug Fixes

    • More robust handling of missing storage entries to yield consistent “not found” responses.
    • More reliable handling of deletions when finalizers/tombstones are involved, improving event consistency.

@balpert89
balpert89 requested a review from a team April 14, 2026 11:51
@github-actions github-actions Bot added size/L enhancement New feature or request labels Apr 14, 2026
@balpert89
balpert89 marked this pull request as draft April 14, 2026 11:52
@coderabbitai

coderabbitai Bot commented Apr 14, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a21aafaa-ccf8-4a54-bff3-f028b717a8a9

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds an in-memory label index to the OMAP store and a new ListByLabels method, refactors volume listing to use store-side label filtering (when available) so filtering occurs before processing, and makes small metadata-label propagation and error-handling adjustments.

Changes

Cohort / File(s) Summary
Label index & OMAP store
internal/omap/omap.go
Adds an in-memory label index keyed by key=value, protected by an RW mutex. Index updated on Create, pruned on Delete (tombstone path) and adjusted on Update by label diffing. Introduces ListByLabels using set intersection and maps rados.ErrNotFound to store.ErrNotFound.
Volume creation metadata
internal/volumeserver/volume_create.go
Initialize newly created api.Image.Metadata.Labels from volume.Metadata.Labels when creating an image.
Volume listing & filtering
internal/volumeserver/volume_list.go
Refactors listing into listVolumes and listAndConvert. Adds a label-index fast path via runtime assertion to call ListByLabels; removes in-memory post-filtering and applies label filtering at source when supported. Simplifies control flow and adjusts getIriVolume error handling.

Sequence Diagram

sequenceDiagram
    actor Client
    participant VolumeManager
    participant Store
    participant Index

    Note over Client,Index: Filter-before-processing flow (when label index available)

    Client->>VolumeManager: ListVolumes(labelSelector)
    VolumeManager->>Store: ListByLabels(labelSelector)
    Store->>Index: Lookup IDs per label (set intersections)
    Index-->>Store: Matching ID set
    Store->>Store: Materialize objects for IDs (Get)
    Store-->>VolumeManager: Filtered objects
    VolumeManager-->>Client: Converted API volumes
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Enhance volume list label filter operation' is directly related to the main change: implementing label-based filtering in the volume list operation to improve performance.
Description check ✅ Passed The description follows the repository template with three proposed changes and correctly references the linked issue #851, providing clear summary of the implementation.
Linked Issues check ✅ Passed The PR successfully addresses issue #851 by implementing label-based filtering before volume processing, adding ListByLabels to the OMAP store and applying it in volume listing to avoid unnecessary processing of filtered-out volumes.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #851 objectives: label propagation, ListByLabels implementation, and filter removal all support the goal of filtering before processing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
internal/omap/omap.go (1)

510-518: Consider continuing past NotFound errors for individual objects.

When iterating through the intersection, if an object was deleted between index lookup and Get, the entire ListByLabels call fails. Since this is a list operation, it may be more appropriate to log the error and continue, similar to how listAndConvert in volume_list.go handles conversion errors.

♻️ Proposed change to handle stale index entries gracefully
 	for id := range intersection {
 		obj, err := s.Get(ctx, id)
 		if err != nil {
-			s.log.Error(err, "Failed to get object from store during ListByLabels", "id", id)
-			return nil, err
+			if errors.Is(err, store.ErrNotFound) {
+				// Object was deleted after index lookup; skip stale entry
+				s.log.V(1).Info("Object removed between index lookup and Get, skipping", "id", id)
+				continue
+			}
+			s.log.Error(err, "Failed to get object from store during ListByLabels", "id", id)
+			return nil, err
 		}
 		objs = append(objs, obj)
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/omap/omap.go` around lines 510 - 518, The loop in ListByLabels using
intersection currently returns on any s.Get error causing the whole list to
fail; instead replicate the resilient behavior used in listAndConvert
(volume_list.go): call s.Get(ctx, id) for each id, if it returns a
NotFound-style error (e.g., apierrors.IsNotFound/Is(err, fs.ErrNotExist)
depending on your project error type) then log a warning via s.log (including
the id) and continue to the next id, only append obj to objs when Get succeeds;
for any non-NotFound error still return the error. This keeps stale index
entries from failing ListByLabels while preserving real error handling.
internal/volumeserver/volume_list.go (2)

108-111: Consider refactoring to avoid goto.

While functional, goto is generally non-idiomatic in Go. This could be restructured using a helper function or by inverting the condition.

♻️ Alternative approach without goto
 	// Fast path for LabelSelector filter (using the new index)
 	if filter != nil && len(filter.LabelSelector) > 0 {
 		log.V(1).Info("Filtering by Label Selector using index", "Selector", filter.LabelSelector)
-		listerWithLabels, ok := s.imageStore.(imageListerWithLabels[*api.Image])
-		if !ok {
-			log.Error(fmt.Errorf("imageStore does not support ListByLabels"), "Cannot use label index optimization")
-			goto SlowPath
-		}
-
-		cephImages, err := listerWithLabels.ListByLabels(ctx, filter.LabelSelector)
-		...
-		return &iri.ListVolumesResponse{Volumes: volumes}, nil
+		if listerWithLabels, ok := s.imageStore.(imageListerWithLabels[*api.Image]); ok {
+			cephImages, err := listerWithLabels.ListByLabels(ctx, filter.LabelSelector)
+			...
+			return &iri.ListVolumesResponse{Volumes: volumes}, nil
+		}
+		log.V(1).Info("imageStore does not support ListByLabels, falling back to slow path")
 	}
-
-	// Slow path: No specific filter or fallback
-SlowPath:
+	// Slow path: No specific filter or fallback
 	log.V(1).Info("Listing all volumes (no specific filter or fallback)")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/volumeserver/volume_list.go` around lines 108 - 111, The use of goto
to jump to SlowPath should be removed by restructuring the flow: either invert
the condition so when imageStore supports ListByLabels you run the fast path and
otherwise call a clearly named helper (e.g., handleSlowPath or listImagesSlowly)
that contains the SlowPath logic, or extract the entire slow-path block into a
helper and call it instead of using goto; update references to imageStore and
its ListByLabels check (the current if !ok { ... goto SlowPath }) to call the
helper or return/continue appropriately so no goto/label is needed.

28-33: Dead code: capability check result is unused.

The type assertion result at line 29 is stored in ok but never used to alter behavior. The function proceeds identically regardless of whether imageStore implements ListByLabels. This warning log provides no value since it doesn't affect the Get operation that follows.

Consider removing this check from getIriVolume since it's only relevant for ListVolumes.

♻️ Proposed removal of unused check
 func (s *Server) getIriVolume(ctx context.Context, log logr.Logger, imageId string) (*iri.Volume, error) {
-	_, ok := s.imageStore.(imageListerWithLabels[*api.Image])
-	if !ok {
-		log.V(0).Info("Warning: imageStore does not implement ListByLabels, falling back to Get")
-		// If ListByLabels is crucial, you might return an error here instead.
-	}
-
 	cephImage, err := s.imageStore.Get(ctx, imageId)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/volumeserver/volume_list.go` around lines 28 - 33, The
type-assertion check in getIriVolume that does "_, ok :=
s.imageStore.(imageListerWithLabels[*api.Image])" is dead — its bool is never
used and the function behavior doesn't change — so remove that assertion and the
surrounding log; ensure getIriVolume no longer references imageListerWithLabels
or logs the fallback, leaving the subsequent Get logic intact; if ListByLabels
capability must be checked elsewhere, keep or move the check to ListVolumes
where it's actually used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@go.mod`:
- Around line 126-131: Update the indirect dependency
go.opentelemetry.io/otel/sdk to v1.43.0 or newer to address GHSA-hfvc-g4fc-pqhx;
locate the go.mod entry for go.opentelemetry.io/otel/sdk and change its version
to v1.43.0+ (and run go get or tidy to update sums), and ensure any related otel
modules (e.g., go.opentelemetry.io/otel, go.opentelemetry.io/otel/trace,
otlptrace) remain compatible after the upgrade.

In `@internal/omap/omap.go`:
- Around line 80-84: Add a dedicated mutex (e.g., labelIndexMu sync.RWMutex) to
protect the shared labelIndex map and use it in the functions that access it:
acquire labelIndexMu.Lock()/Unlock() around mutations in updateLabelIndex and
removeFromLabelIndex, and use labelIndexMu.RLock()/RUnlock() in ListByLabels
when reading; keep existing idMu for per-ID locking but ensure all reads/writes
to labelIndex go through the new labelIndexMu to prevent concurrent map access.

In `@internal/volumeserver/volume_list.go`:
- Around line 104-138: The fast path uses imageListerWithLabels.ListByLabels to
apply filter.LabelSelector, but when the store lacks that interface the SlowPath
falls back to s.listVolumes and returns all volumes without applying the
selector; update the SlowPath to either return an error or (recommended) perform
in-memory label filtering after s.listVolumes by using the existing
s.listAndConvert or inspecting volume.Metadata.Labels — iterate the returned
volumes and keep only those where every key/value in filter.LabelSelector
matches (implement a small helper like matchesLabelSelector(labels, selector)
used by the SlowPath) before returning iri.ListVolumesResponse, or alternatively
return a clear unsupported feature error if you prefer not to filter in-memory.
- Around line 36-47: The error branch after imageStore.Get() is checking the
wrong sentinel (errors.Is(err, utils.ErrVolumeNotFound)) so the nested
rados.ErrNotFound check is unreachable; change the check to errors.Is(err,
store.ErrNotFound) (the store package's ErrNotFound from
github.com/ironcore-dev/provider-utils/storeutils/store) so the volume-not-found
path is detected correctly, preserve the inner errors.Is(err, rados.ErrNotFound)
logic and update imports to include the store package if needed.

---

Nitpick comments:
In `@internal/omap/omap.go`:
- Around line 510-518: The loop in ListByLabels using intersection currently
returns on any s.Get error causing the whole list to fail; instead replicate the
resilient behavior used in listAndConvert (volume_list.go): call s.Get(ctx, id)
for each id, if it returns a NotFound-style error (e.g.,
apierrors.IsNotFound/Is(err, fs.ErrNotExist) depending on your project error
type) then log a warning via s.log (including the id) and continue to the next
id, only append obj to objs when Get succeeds; for any non-NotFound error still
return the error. This keeps stale index entries from failing ListByLabels while
preserving real error handling.

In `@internal/volumeserver/volume_list.go`:
- Around line 108-111: The use of goto to jump to SlowPath should be removed by
restructuring the flow: either invert the condition so when imageStore supports
ListByLabels you run the fast path and otherwise call a clearly named helper
(e.g., handleSlowPath or listImagesSlowly) that contains the SlowPath logic, or
extract the entire slow-path block into a helper and call it instead of using
goto; update references to imageStore and its ListByLabels check (the current if
!ok { ... goto SlowPath }) to call the helper or return/continue appropriately
so no goto/label is needed.
- Around line 28-33: The type-assertion check in getIriVolume that does "_, ok
:= s.imageStore.(imageListerWithLabels[*api.Image])" is dead — its bool is never
used and the function behavior doesn't change — so remove that assertion and the
surrounding log; ensure getIriVolume no longer references imageListerWithLabels
or logs the fallback, leaving the subsequent Get logic intact; if ListByLabels
capability must be checked elsewhere, keep or move the check to ListVolumes
where it's actually used.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3baea669-daa8-482b-91a1-ca766029836f

📥 Commits

Reviewing files that changed from the base of the PR and between d1467c1 and 9328d67.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • Makefile
  • cmd/volumeprovider/app/app.go
  • go.mod
  • internal/omap/omap.go
  • internal/volumeserver/volume_create.go
  • internal/volumeserver/volume_list.go

Comment thread go.mod Resolved
Comment thread internal/omap/omap.go Resolved
Comment thread internal/volumeserver/volume_list.go Resolved
Comment thread internal/volumeserver/volume_list.go Resolved
@hardikdr hardikdr added the area/storage Storage solutions and related concerns. label Apr 15, 2026
@hardikdr hardikdr added this to Roadmap Apr 15, 2026
@kasabe28

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 16, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kasabe28
kasabe28 marked this pull request as ready for review April 16, 2026 06:30
@kasabe28
kasabe28 requested a review from gonzolino April 16, 2026 06:31
@kasabe28 kasabe28 self-assigned this Apr 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/volumeserver/volume_create.go`:
- Around line 127-131: The Image metadata construction currently dereferences
volume.Metadata.Labels and can panic if volume.Metadata is nil; modify the code
that builds api.Image (the api.Image and apiutils.Metadata creation) to safely
read labels—check if volume.Metadata != nil before accessing Labels and assign
either volume.Metadata.Labels or nil/empty map accordingly (similar to the guard
used in getArchitectureFromVolume) so the image creation no longer risks a nil
pointer dereference.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 892b8c6b-06ff-429d-b77a-9f9fa5494517

📥 Commits

Reviewing files that changed from the base of the PR and between 9328d67 and 7579e1f.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • Makefile
  • cmd/volumeprovider/app/app.go
  • go.mod
  • internal/omap/omap.go
  • internal/volumeserver/volume_create.go
  • internal/volumeserver/volume_list.go
✅ Files skipped from review due to trivial changes (2)
  • go.mod
  • internal/omap/omap.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • cmd/volumeprovider/app/app.go
  • Makefile

Comment thread internal/volumeserver/volume_create.go Resolved

@gonzolino gonzolino left a comment

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.

There are some changes in this PR which I believe are not directly related to the label filtering.

Let's discuss if we can separate those changes from this PR.

Comment thread internal/omap/omap.go Resolved
Comment thread internal/volumeserver/volume_list.go Resolved
Comment thread internal/volumeserver/volume_list.go Resolved
Comment thread Makefile Resolved
Comment thread internal/omap/omap.go Resolved
Comment thread internal/omap/omap.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
internal/volumeserver/volume_list.go (2)

89-119: ⚠️ Potential issue | 🟠 Major

Do not return unfiltered volumes when ListByLabels is unavailable.

The fallback path still lists all managed volumes for a request with filter.LabelSelector, which silently returns more volumes than requested.

🐛 Proposed fix: filter in memory on fallback
-		log.Error(fmt.Errorf("imageStore does not support ListByLabels"), "Cannot use label index optimization")
+		log.V(1).Info("Image store does not support ListByLabels; falling back to in-memory label filtering")
 	}
 
 	// Slow path: No specific filter or fallback
 	log.V(1).Info("Listing all volumes (no specific filter or fallback)")
 	volumes, err := s.listVolumes(ctx, log) // Lists *all* managed volumes
 	if err != nil {
 		// listVolumes already logs the store error
 		return nil, utils.ConvertInternalErrorToGRPC(err)
 	}
 
+	if filter != nil && len(filter.LabelSelector) > 0 {
+		filtered := make([]*iri.Volume, 0, len(volumes))
+		for _, volume := range volumes {
+			if volumeMatchesLabelSelector(volume, filter.LabelSelector) {
+				filtered = append(filtered, volume)
+			}
+		}
+		volumes = filtered
+	}
+
 	return &iri.ListVolumesResponse{Volumes: volumes}, nil
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/volumeserver/volume_list.go` around lines 89 - 119, The code
currently falls back to s.listVolumes and returns all volumes when
filter.LabelSelector is set but s.imageStore doesn't implement
imageListerWithLabels; instead, when ListByLabels is unavailable you must still
honor filter.LabelSelector by fetching the full set via s.listVolumes and then
apply an in-memory label filter before returning. Change the fallback in
volume_list.go (references: s.imageStore, imageListerWithLabels[*api.Image],
ListByLabels, s.listAndConvert, s.listVolumes, iri.ListVolumesResponse,
filter.LabelSelector) so that after calling s.listVolumes you filter each
volume's labels against filter.LabelSelector, convert only matching images via
s.listAndConvert (or convert then filter consistently), and return the filtered
slice; preserve existing logging and error handling and do not return the
unfiltered full list.

28-33: ⚠️ Potential issue | 🔴 Critical

Return on every imageStore.Get error and check store.ErrNotFound.

imageStore.Get() wraps missing OMAP entries with store.ErrNotFound, not utils.ErrVolumeNotFound; non-matching errors currently fall through and may pass a nil cephImage into api.IsObjectManagedBy.

🐛 Proposed fix
 	cephImage, err := s.imageStore.Get(ctx, imageId)
 	if err != nil {
-		if errors.Is(err, utils.ErrVolumeNotFound) {
-			return nil, fmt.Errorf("failed to get image %s: %w", imageId, utils.ErrVolumeNotFound)
-		}
+		if errors.Is(err, store.ErrNotFound) {
+			log.V(1).Info("Volume not found in store", "volumeID", imageId)
+			return nil, status.Errorf(codes.NotFound, "volume %s not found", imageId)
+		}
+		return nil, fmt.Errorf("failed to get image %s: %w", imageId, err)
 	}

Verify the store sentinel with:

#!/bin/bash
# Description: Confirm which not-found sentinel the image store returns.
rg -n 'store\.ErrNotFound|ErrVolumeNotFound' internal --type=go -B 4 -A 4
rg -n 'func \(s \*Server\) getIriVolume' internal/volumeserver/volume_list.go -A 20
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/volumeserver/volume_list.go` around lines 28 - 33, The code calling
s.imageStore.Get currently only handles utils.ErrVolumeNotFound and lets other
errors fall through; change it to immediately return on any err from
s.imageStore.Get and specifically detect the store sentinel (store.ErrNotFound)
instead of utils.ErrVolumeNotFound: when err != nil, if errors.Is(err,
store.ErrNotFound) return a wrapped not-found error, otherwise return the error
as-is. Update the branch around s.imageStore.Get/cephImage and ensure subsequent
calls (e.g., api.IsObjectManagedBy) never receive a nil cephImage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/volumeserver/volume_list.go`:
- Around line 73-86: When using the fast path in ListVolumes (when filter.Id !=
""), ensure the filter.LabelSelector is applied: after calling
s.getIriVolume(ctx, log, filter.Id) and before returning the single volume, call
a helper like volumeMatchesLabelSelector(volume, filter.LabelSelector) and if it
returns false, return an empty iri.ListVolumesResponse instead of the volume;
add the suggested volumeMatchesLabelSelector helper (near listAndConvert) which
returns true when selector is empty, guards against nil metadata/labels, and
checks each selector key/value match.

---

Duplicate comments:
In `@internal/volumeserver/volume_list.go`:
- Around line 89-119: The code currently falls back to s.listVolumes and returns
all volumes when filter.LabelSelector is set but s.imageStore doesn't implement
imageListerWithLabels; instead, when ListByLabels is unavailable you must still
honor filter.LabelSelector by fetching the full set via s.listVolumes and then
apply an in-memory label filter before returning. Change the fallback in
volume_list.go (references: s.imageStore, imageListerWithLabels[*api.Image],
ListByLabels, s.listAndConvert, s.listVolumes, iri.ListVolumesResponse,
filter.LabelSelector) so that after calling s.listVolumes you filter each
volume's labels against filter.LabelSelector, convert only matching images via
s.listAndConvert (or convert then filter consistently), and return the filtered
slice; preserve existing logging and error handling and do not return the
unfiltered full list.
- Around line 28-33: The code calling s.imageStore.Get currently only handles
utils.ErrVolumeNotFound and lets other errors fall through; change it to
immediately return on any err from s.imageStore.Get and specifically detect the
store sentinel (store.ErrNotFound) instead of utils.ErrVolumeNotFound: when err
!= nil, if errors.Is(err, store.ErrNotFound) return a wrapped not-found error,
otherwise return the error as-is. Update the branch around
s.imageStore.Get/cephImage and ensure subsequent calls (e.g.,
api.IsObjectManagedBy) never receive a nil cephImage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 364db425-7a71-4f8b-8ff1-ca662a5c86ac

📥 Commits

Reviewing files that changed from the base of the PR and between 7579e1f and 2eb6ca8.

📒 Files selected for processing (2)
  • internal/omap/omap.go
  • internal/volumeserver/volume_list.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/omap/omap.go

Comment thread internal/volumeserver/volume_list.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/omap/omap.go (1)

240-242: ⚠️ Potential issue | 🟠 Major

Label index leaks when an object without finalizers is deleted.

On this fast path (no finalizers), s.delete removes the object from OMAP but removeFromLabelIndex is never called, so the object's labels remain in labelIndex pointing at a now-deleted ID.

Consequences:

  • labelIndex grows unbounded over the lifetime of the process for every finalizer-less delete.
  • ListByLabels will then Get these stale IDs and rely on store.ErrNotFound skipping (line 494) to hide them, which is wasted work on every query and masks the underlying leak.

The finalizer path at line 256 already calls removeFromLabelIndex; the same needs to happen here.

🛠️ Proposed fix
 	if len(obj.GetFinalizers()) == 0 {
-		return s.delete(ioCtx, id)
+		if err := s.delete(ioCtx, id); err != nil {
+			return err
+		}
+		s.removeFromLabelIndex(id, obj.GetLabels())
+		return nil
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/omap/omap.go` around lines 240 - 242, The fast-path deleting branch
skips cleaning up labelIndex and leaks entries; update the branch that checks
obj.GetFinalizers() == 0 to call removeFromLabelIndex with the same context/ID
used elsewhere (matching the call in the finalizer path) and handle any error
before returning from s.delete(ioCtx, id); in short, invoke
removeFromLabelIndex(ioCtx, id) (propagate or wrap errors consistently) in that
no-finalizers branch so labels are removed from labelIndex just like in the
finalizer flow (references: s.delete, removeFromLabelIndex, obj.GetFinalizers,
labelIndex, ListByLabels).
🧹 Nitpick comments (3)
internal/omap/omap.go (2)

490-501: Per-ID s.Get opens a fresh IOContext for every match — consider batching.

Each iteration calls s.Get(ctx, id), which opens a new rados.IOContext (line 276) just to read one key. For selectors that match many objects this becomes O(N) IOContext open/close plus O(N) GetAllOmapValues round-trips.

Consider opening a single IOContext once in ListByLabels and either calling the lower-level s.get(ioCtx, id) in the loop, or fetching all needed keys with a bounded GetAllOmapValues scan and filtering by intersection. This is a pure performance refactor; correctness-wise the current code is fine.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/omap/omap.go` around lines 490 - 501, ListByLabels currently calls
s.Get(ctx, id) inside a loop which opens a new rados.IOContext per call
(expensive); refactor to open a single IOContext once and use the internal
lower-level accessor to avoid repeated open/close: obtain ioCtx once at the
start of ListByLabels, then inside the loop call s.get(ioCtx, id) (or perform a
bounded GetAllOmapValues scan and filter by the existing intersection) so that
IOContext creation and GetAllOmapValues round-trips are batched rather than
executed per id.

464-483: Minor: simplify first-iteration detection.

The isFirstLabel flag can be replaced with the loop index, which keeps the intent obvious and removes the mutable state outside the loop.

♻️ Proposed cleanup
-	var isFirstLabel = true
-
-	// 3. Iterate over the sorted slice (labelsForSort) to compute the intersection.
-	for _, info := range labelSelect {
-		ids := info.ids
-		if isFirstLabel {
-			// Use the smallest set to initialize the intersection (copy to avoid modifying the index set).
-			intersection = ids.Clone()
-			isFirstLabel = false
-		} else {
-			// Intersect the current result with the next smallest set.
-			intersection = intersection.Intersection(ids)
-		}
-
-		if intersection.Len() == 0 {
-			return []E{}, nil
-		}
-	}
+	// 3. Iterate over the sorted slice to compute the intersection.
+	for i, info := range labelSelect {
+		if i == 0 {
+			intersection = info.ids.Clone()
+		} else {
+			intersection = intersection.Intersection(info.ids)
+		}
+		if intersection.Len() == 0 {
+			return []E{}, nil
+		}
+	}

Note: if the "clone inside lock" fix above is adopted, info.ids is already a clone and the .Clone() on line 1 of the loop can be dropped.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/omap/omap.go` around lines 464 - 483, Replace the mutable
isFirstLabel flag with an index-based check in the loop over labelSelect: change
the loop to use for i, info := range labelSelect and treat i == 0 as the first
iteration to initialize intersection (intersection = info.ids.Clone()) and
otherwise call intersection = intersection.Intersection(info.ids); remove the
isFirstLabel variable declaration and its assignments; if you have already
ensured info.ids is a clone elsewhere, you can additionally drop the .Clone()
call on the initialization.
internal/volumeserver/volume_list.go (1)

67-71: Redundant shadowing of filter.

Line 67 binds filter := req.Filter, and line 71 immediately re-binds the same expression in the if init statement (if filter := req.Filter; ...). Either drop the outer declaration and keep the if-scoped binding, or reuse the outer filter so readers don't have to track two variables with identical values.

♻️ Proposed cleanup
-	filter := req.Filter
-	log.V(2).Info("Listing volumes")
-
-	// Fast path for ID filter
-	if filter := req.Filter; filter != nil && filter.Id != "" {
+	filter := req.Filter
+	log.V(2).Info("Listing volumes")
+
+	// Fast path for ID filter
+	if filter != nil && filter.Id != "" {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/volumeserver/volume_list.go` around lines 67 - 71, The code
redundantly shadows the variable filter (outer "filter := req.Filter" and inner
"if filter := req.Filter; ..."); remove the outer declaration and use the
if-scoped binding, or keep the outer and change the if to "if filter != nil &&
filter.Id != \"\" {", so only one filter variable is used consistently—update
the occurrences in the function that reference filter (the outer binding or the
if-check) accordingly (look for the variable named "filter" and the "if filter
:= req.Filter" init in this function).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/omap/omap.go`:
- Around line 440-488: In ListByLabels, you must avoid leaking the read lock and
prevent races on labelIndex entries: after s.labelIndexMu.RLock() acquire the
lock use defer s.labelIndexMu.RUnlock() (or ensure every early return unlocks)
and while still holding the lock clone each referenced set (the ids stored into
sizedLabel) instead of storing direct references to s.labelIndex[label]; then
release the lock and perform ids.Clone()/intersection.Intersection(ids) on those
cloned sets so updateLabelIndex/removeFromLabelIndex cannot mutate the
underlying maps concurrently.

---

Outside diff comments:
In `@internal/omap/omap.go`:
- Around line 240-242: The fast-path deleting branch skips cleaning up
labelIndex and leaks entries; update the branch that checks obj.GetFinalizers()
== 0 to call removeFromLabelIndex with the same context/ID used elsewhere
(matching the call in the finalizer path) and handle any error before returning
from s.delete(ioCtx, id); in short, invoke removeFromLabelIndex(ioCtx, id)
(propagate or wrap errors consistently) in that no-finalizers branch so labels
are removed from labelIndex just like in the finalizer flow (references:
s.delete, removeFromLabelIndex, obj.GetFinalizers, labelIndex, ListByLabels).

---

Nitpick comments:
In `@internal/omap/omap.go`:
- Around line 490-501: ListByLabels currently calls s.Get(ctx, id) inside a loop
which opens a new rados.IOContext per call (expensive); refactor to open a
single IOContext once and use the internal lower-level accessor to avoid
repeated open/close: obtain ioCtx once at the start of ListByLabels, then inside
the loop call s.get(ioCtx, id) (or perform a bounded GetAllOmapValues scan and
filter by the existing intersection) so that IOContext creation and
GetAllOmapValues round-trips are batched rather than executed per id.
- Around line 464-483: Replace the mutable isFirstLabel flag with an index-based
check in the loop over labelSelect: change the loop to use for i, info := range
labelSelect and treat i == 0 as the first iteration to initialize intersection
(intersection = info.ids.Clone()) and otherwise call intersection =
intersection.Intersection(info.ids); remove the isFirstLabel variable
declaration and its assignments; if you have already ensured info.ids is a clone
elsewhere, you can additionally drop the .Clone() call on the initialization.

In `@internal/volumeserver/volume_list.go`:
- Around line 67-71: The code redundantly shadows the variable filter (outer
"filter := req.Filter" and inner "if filter := req.Filter; ..."); remove the
outer declaration and use the if-scoped binding, or keep the outer and change
the if to "if filter != nil && filter.Id != \"\" {", so only one filter variable
is used consistently—update the occurrences in the function that reference
filter (the outer binding or the if-check) accordingly (look for the variable
named "filter" and the "if filter := req.Filter" init in this function).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 81ae43dd-4fee-4ccc-b244-22a05a3717b6

📥 Commits

Reviewing files that changed from the base of the PR and between 2eb6ca8 and e8bb8f7.

📒 Files selected for processing (3)
  • internal/omap/omap.go
  • internal/volumeserver/volume_create.go
  • internal/volumeserver/volume_list.go
✅ Files skipped from review due to trivial changes (1)
  • internal/volumeserver/volume_create.go

Comment thread internal/omap/omap.go Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/omap/omap.go (1)

240-242: ⚠️ Potential issue | 🔴 Critical

Label index leak on the hard-delete path in Delete.

When obj has no finalizers, s.delete(ioCtx, id) removes the OMAP entry but the object's labels are never removed from labelIndex. The soft-delete branch below (line 256) correctly calls removeFromLabelIndex; this path does not. Consequences:

  • labelIndex grows unboundedly, retaining objID references for deleted objects.
  • Subsequent ListByLabels calls perform wasted Get lookups for stale IDs (currently tolerated via the store.ErrNotFound skip at line 495, but still a CPU/IOContext cost).
  • If any object is later created with a reused ID that happens to match a stale label, it could briefly match before the index is rewritten.
🛠 Proposed fix
 	if len(obj.GetFinalizers()) == 0 {
-		return s.delete(ioCtx, id)
+		if err := s.delete(ioCtx, id); err != nil {
+			return err
+		}
+		s.removeFromLabelIndex(id, obj.GetLabels())
+		return nil
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/omap/omap.go` around lines 240 - 242, The hard-delete path in Delete
is leaking label index entries because when len(obj.GetFinalizers()) == 0 the
code calls s.delete(ioCtx, id) but never removes the object's labels from
labelIndex; update the Delete implementation so that before (or immediately
after) calling s.delete(ioCtx, id) you call s.removeFromLabelIndex(ioCtx, id,
obj) (or the appropriate overload) to remove all labelIndex entries for this
objID; ensure you reference the existing functions/fields: Delete, s.delete,
removeFromLabelIndex, labelIndex and use the same ioCtx and id variables passed
into Delete to avoid duplicating lookups.
♻️ Duplicate comments (1)
internal/omap/omap.go (1)

449-484: ⚠️ Potential issue | 🔴 Critical

Data race on indexed sets after RUnlock is still present.

The earlier lock-leak (early return with RLock held) has been fixed, but the companion issue flagged previously is not: labelSelect[i].ids stores a direct reference to s.labelIndex[label]. After s.labelIndexMu.RUnlock() on line 464, those referenced sets are still accessed at line 479 (ids.Clone()) and line 483 (intersection.Intersection(ids)). Concurrent updateLabelIndex / removeFromLabelIndex writers may mutate those maps at the same time — since sets.Set[string] is a map under the hood, this is an unsynchronized concurrent map read/write that -race will flag and that can panic or corrupt results under real workloads.

Clone each referenced set while the read lock is still held, so nothing outside the critical section touches the shared index.

🔒 Proposed fix
 	s.labelIndexMu.RLock()
 	// 1 .Gather label set sizes and check for immediate non-matches.
 	for key, value := range labelSelector {
 		label := formatLabel(key, value)
 		ids, found := s.labelIndex[label]
 		if !found {
 			s.labelIndexMu.RUnlock()
 			return []E{}, nil
 		}
 
 		labelSelect = append(labelSelect, sizedLabel{
-			ids:  ids,
+			ids:  ids.Clone(),
 			size: ids.Len(),
 		})
 	}
 	s.labelIndexMu.RUnlock()

With cloned sets, the later ids.Clone() on line 479 can also be dropped (assign intersection = ids directly).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/omap/omap.go` around lines 449 - 484, The code currently stores
direct references to s.labelIndex[label] into labelSelect while only holding
labelIndexMu.RLock(), then unlocks and later reads those sets
(ids.Clone()/intersection.Intersection(ids)) which is a data race; fix by
cloning each referenced set while still under the read lock (replace storing ids
with ids.Clone() when building sizedLabel inside the RLock block) so the sets in
labelSelect are independent copies, and then after RUnlock use those clones
directly (you can drop the redundant ids.Clone() at the first-intersection step
and assign intersection = ids) ; keep references to formatLabel, labelIndexMu,
labelIndex, sizedLabel, labelSelect, ids, and
updateLabelIndex/removeFromLabelIndex in mind to ensure writers mutate only the
original index.
🧹 Nitpick comments (1)
internal/omap/omap.go (1)

491-502: Opening a new IOContext per matched ID is wasteful.

Each s.Get(ctx, id) call opens and destroys its own rados.IOContext. For a selector matching many objects this results in N context open/close cycles on the hot listing path — exactly the path this PR is meant to make cheaper. Consider opening one IOContext up front and using an internal helper (analogous to the existing s.get(ioCtx, id)) for each lookup. If the underlying Ceph API supports multi-key OMAP reads (omap_get_vals_by_keys or similar), a single batched fetch would be even better.

♻️ Sketch
-	objs := make([]E, 0, intersection.Len())
-	for id := range intersection {
-		obj, err := s.Get(ctx, id)
-		if err != nil {
-			if errors.Is(err, store.ErrNotFound) {
-				// Object was deleted after index lookup; skip stale entry
-				continue
-			}
-			return nil, err
-		}
-		objs = append(objs, obj)
-	}
+	ioCtx, err := s.conn.OpenIOContext(s.pool)
+	if err != nil {
+		return nil, fmt.Errorf("unable to get io context: %w", err)
+	}
+	defer ioCtx.Destroy()
+
+	objs := make([]E, 0, intersection.Len())
+	for id := range intersection {
+		obj, err := s.get(ioCtx, id)
+		if err != nil {
+			if errors.Is(err, store.ErrNotFound) {
+				// Object was deleted after index lookup; skip stale entry
+				continue
+			}
+			return nil, err
+		}
+		objs = append(objs, obj)
+	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/omap/omap.go` around lines 491 - 502, The loop currently calls
s.Get(ctx, id) for each id which opens/closes an rados.IOContext per call;
refactor to acquire a single IOContext once before the loop and call the
internal helper that accepts an IOContext (e.g., use the existing s.get(ioCtx,
id) pattern) to fetch each object, releasing the IOContext after the loop;
additionally, if the Ceph API supports multi-key OMAP reads, replace the per-id
fetches with a batched omap_get_vals_by_keys call to retrieve all matched ids in
one request.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/omap/omap.go`:
- Around line 85-87: formatLabel currently concatenates key and value with "="
which is ambiguous if either contains "="; update formatLabel to use a separator
that cannot appear in arbitrary label strings (e.g., use the NUL character
"\x00") or apply a tuple-safe encoding (e.g., base64 or URL-encoding) to key and
value before joining so serialized labels are unambiguous; change the
implementation of formatLabel to use the chosen safe separator/encoding and
update any lookups or consumers that expect the current "="-joined form
accordingly.

---

Outside diff comments:
In `@internal/omap/omap.go`:
- Around line 240-242: The hard-delete path in Delete is leaking label index
entries because when len(obj.GetFinalizers()) == 0 the code calls
s.delete(ioCtx, id) but never removes the object's labels from labelIndex;
update the Delete implementation so that before (or immediately after) calling
s.delete(ioCtx, id) you call s.removeFromLabelIndex(ioCtx, id, obj) (or the
appropriate overload) to remove all labelIndex entries for this objID; ensure
you reference the existing functions/fields: Delete, s.delete,
removeFromLabelIndex, labelIndex and use the same ioCtx and id variables passed
into Delete to avoid duplicating lookups.

---

Duplicate comments:
In `@internal/omap/omap.go`:
- Around line 449-484: The code currently stores direct references to
s.labelIndex[label] into labelSelect while only holding labelIndexMu.RLock(),
then unlocks and later reads those sets
(ids.Clone()/intersection.Intersection(ids)) which is a data race; fix by
cloning each referenced set while still under the read lock (replace storing ids
with ids.Clone() when building sizedLabel inside the RLock block) so the sets in
labelSelect are independent copies, and then after RUnlock use those clones
directly (you can drop the redundant ids.Clone() at the first-intersection step
and assign intersection = ids) ; keep references to formatLabel, labelIndexMu,
labelIndex, sizedLabel, labelSelect, ids, and
updateLabelIndex/removeFromLabelIndex in mind to ensure writers mutate only the
original index.

---

Nitpick comments:
In `@internal/omap/omap.go`:
- Around line 491-502: The loop currently calls s.Get(ctx, id) for each id which
opens/closes an rados.IOContext per call; refactor to acquire a single IOContext
once before the loop and call the internal helper that accepts an IOContext
(e.g., use the existing s.get(ioCtx, id) pattern) to fetch each object,
releasing the IOContext after the loop; additionally, if the Ceph API supports
multi-key OMAP reads, replace the per-id fetches with a batched
omap_get_vals_by_keys call to retrieve all matched ids in one request.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 24f679f9-af76-4367-ac40-c87565098806

📥 Commits

Reviewing files that changed from the base of the PR and between e8bb8f7 and 43f34ac.

📒 Files selected for processing (1)
  • internal/omap/omap.go

Comment thread internal/omap/omap.go Resolved
@opensovereigncloud-user
opensovereigncloud-user force-pushed the osc/enh/volume-list branch 3 times, most recently from cf88820 to c0dad2e Compare May 27, 2026 09:47
Comment thread internal/volumeserver/volume_list.go Outdated
)

// imageListerWithLabels type parameter E is constrained to be a providerapi.Object.
type imageListerWithLabels[E providerapi.Object] interface {

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.

I wonder if it would be better to extend the List(ctx) function in the store.Store interface at https://github.com/ironcore-dev/provider-utils/blob/main/storeutils/store/store.go#L50 to support some kind of filter parameter.

I think this would significantly reduce the amount of code needed for this change, and it might be useful to other store implementations / use-cases.

Let's discuss this on the next Community Call.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I agree, it makes sense to extend the List functionality in the provider-utils package.

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.

I have a PR ready to extend List in provider-utils: ironcore-dev/provider-utils#56

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.

Updated PR to support List with labels and field indexes using modified provider-utils List()

Comment thread internal/omap/omap.go Resolved
@friegger friegger added this to IaaS Jun 22, 2026

@gonzolino gonzolino left a comment

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.

Still reviewing, but here are some comments already.

Comment thread internal/omap/omap.go Outdated
return formatIndexKey(key, value)
}

// updateLabelIndex updates the index for a single object based on its labels.

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.

Comment does not match the function name

Comment thread internal/omap/omap.go Outdated
return fmt.Errorf("failed to get all omap values for %s index initialization: %w", indexName, err)
}

for key := range index {

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.

During initialization, shouldn't the index always be empty? I don't think we need to "clean it up" here.

Comment thread internal/omap/omap.go Outdated
}

// --- Internal Index Helpers ---
func formatIndexKey(key, value string) string {

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.

How will index keys in this format work with HasLabel queries? Such queries use an Exists operator on the key, without caring for the value. This index key format expects all index keys to consist of a key + value combination.

Comment thread internal/omap/omap.go Outdated
defer ioCtx.Destroy()

omapValues, err := ioCtx.GetAllOmapValues(s.omapName, "", "", s.iteratorSize)
if err != nil && !errors.Is(err, rados.ErrNotFound) {

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.

Suggested change
if err != nil && !errors.Is(err, rados.ErrNotFound) {
if err != nil {

Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>
Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>
Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>
Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>
Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>
Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>
Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>
Signed-off-by: kajol.asabe@t-systems.com <kajol.asabe@t-systems.com>

This branch has not been deployed

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

Labels

area/storage Storage solutions and related concerns. enhancement New feature or request integration-tests size/L

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Listing volumes should apply filtering first before processing

4 participants