Skip to content

[Fix #1691] MVStore additional objects persistence - #1715

Open
fjtirado wants to merge 4 commits into
open-workflow-specification:mainfrom
fjtirado:Fix_#1691
Open

fjtirado wants to merge 4 commits into
open-workflow-specification:mainfrom
fjtirado:Fix_#1691

Conversation

@fjtirado

Copy link
Copy Markdown
Collaborator

Fix #1691

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Metadata persistence loss, stale blob accumulation, thread-safety regression, and the misspelled public API constant must be addressed.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds MVStore metadata persistence with versioned serialization, blob storage, and optional hashing.

Changes:

  • Persists and restores workflow metadata.
  • Adds configurable integer/MD5 hashing and blob storage.
  • Expands persistence and marshalling tests.
File Summary
impl/​persistence/​tests/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​test/​AbstractHandlerPersistenceTest.java Adds metadata persistence assertions.
impl/​persistence/​mvstore/​src/​test/​java/​io/​serverlessworkflow/​impl/​persistence/​mvstore/​MVStorePersistenceStoreTest.java Configures hash factories.
impl/​persistence/​mvstore/​src/​test/​java/​io/​serverlessworkflow/​impl/​persistence/​mvstore/​MD5MVStorePersistenceTest.java Adds MD5 persistence coverage.
impl/​persistence/​mvstore/​src/​test/​java/​io/​serverlessworkflow/​impl/​persistence/​mvstore/​HashingMVStorePersistenceTest.java Adds integer-hash persistence coverage.
impl/​persistence/​mvstore/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​mvstore/​MVStoreTransaction.java Adds blob-map handling.
impl/​persistence/​mvstore/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​mvstore/​MVStorePersistenceStore.java Wires hashing and locking.
impl/​persistence/​bigmap/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​bigmap/​BytesMapInstanceTransaction.java Serializes metadata and hashed objects; metadata can be lost before completion or on retries, and stale blobs can accumulate.
impl/​persistence/​bigmap/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​bigmap/​BigMapInstanceTransaction.java Passes instance IDs during task decoding.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​WorkflowPersistenceInstance.java Restores metadata.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​hashing/​MD5HashItem.java Adds MD5 hash representation; the public threshold constant is misspelled.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​hashing/​IntegerHashItem.java Adds integer hash representation.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​hashing/​HashItem.java Defines the hash-item contract.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​hashing/​HashFactory.java Defines hash creation and decoding.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​hashing/​DisabledHashFactory.java Provides disabled hashing.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​hashing/​AbstractHashFactory.java Decodes supported hash types.
impl/​persistence/​api/​src/​main/​java/​io/​serverlessworkflow/​impl/​persistence/​CompletedTaskInfo.java Carries restored metadata.
impl/​core/​src/​main/​java/​io/​serverlessworkflow/​impl/​WorkflowMutableInstance.java Supports metadata restoration; restored values can replace the concurrent map with a non-thread-safe map.
impl/​core/​src/​main/​java/​io/​serverlessworkflow/​impl/​marshaller/​WorkflowOutputBuffer.java Adds raw-byte writing.
impl/​core/​src/​main/​java/​io/​serverlessworkflow/​impl/​marshaller/​MarshallingUtils.java Adds generic object decoding.
impl/​core/​src/​main/​java/​io/​serverlessworkflow/​impl/​marshaller/​DefaultOutputBuffer.java Implements raw-byte writing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread impl/core/src/main/java/io/serverlessworkflow/impl/WorkflowMutableInstance.java Outdated
Copilot AI review requested due to automatic review settings September 23, 2026 15:54

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Unresolved concurrency, persistence, and public API compatibility issues remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 4 High severity · 1 Medium severity

Open (5)
Resolved since last review (1)

Copilot AI review requested due to automatic review settings September 23, 2026 16:25

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Four moderate issues affecting metadata restoration and MVStore transaction handling remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Medium severity

Open (3)
Resolved since last review (5)

Copilot AI review requested due to automatic review settings September 23, 2026 16:33

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Unresolved critical issues affect hash decoding, metadata serialization consistency, and blob transaction atomicity.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 High severity · 1 Medium severity

Open (4)
Resolved since last review (2)

Copilot AI review requested due to automatic review settings September 23, 2026 16:49

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Four moderate review issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 2 Medium severity

Open (4)
Resolved since last review (2)

Copilot AI review requested due to automatic review settings September 23, 2026 17:05

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings September 23, 2026 17:15

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

One or more issues must be addressed before approval.

Review effort: Lite
Findings: None

Resolved since last review (1)

Copilot AI review requested due to automatic review settings September 23, 2026 17:32
@fjtirado
fjtirado force-pushed the Fix_#1691 branch 2 times, most recently from 6705207 to 7b1b817 Compare September 25, 2026 12:28
@fjtirado
fjtirado marked this pull request as draft September 25, 2026 12:30

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

One or more issues must be addressed before approval.

Review effort: Lite
Findings: 1 Low severity

Open (1)
Resolved since last review (1)

…g generated index

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@ibm.com>
@fjtirado
fjtirado marked this pull request as ready for review September 25, 2026 14:04
Copilot AI review requested due to automatic review settings September 25, 2026 14:05

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

The blob-map key format is unsafe for keys containing colons, and retry metadata coverage should be strengthened.

Review effort: Lite
Findings: 1 Low severity

Open (1)

Copilot AI review requested due to automatic review settings September 25, 2026 14:11

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

Unresolved persistence issues affect hashed-key handling and metadata recovery during status updates.

Review effort: Lite
Findings: None

Resolved since last review (1)

@fjtirado

fjtirado commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

One of the open issues between the AI and myself is to bound memory usage, Ill do that in a different PR where the static ConcurrentMap cache is replaced by an LRUCache.java (based on ConcurrentMap)

But I prefer a different PR because if the AI is really suffocating with this one, If I add the LRUCAche now, its going to allucinate.

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Composite blob-map keys can become unreadable when custom hash keys contain :.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)

@fjtirado fjtirado changed the title [Fix #1691] Add metadata to mvstore [Fix #1691] MV stora additional object persistence Sep 25, 2026
…lity

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@ibm.com>
Copilot AI review requested due to automatic review settings September 25, 2026 15:40

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Two moderate lifecycle and key-encoding issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

@fjtirado fjtirado changed the title [Fix #1691] MV stora additional object persistence [Fix #1691] MVStore additional objects persistence Sep 25, 2026
@fjtirado
fjtirado requested a lite review from Copilot September 25, 2026 15:55

Copilot AI 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.

Copilot review overview

🔵 Needs a closer look

The broad persistence, hashing, serialization, and compatibility changes require final human review.

Review effort: Lite
Findings: None

Resolved since last review (1)

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.

Implement metadata persistence in MVStore

2 participants