Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DA5-15 Recurring merge from main #5005

Merged
merged 102 commits into from
Nov 7, 2023

Conversation

ac101m
Copy link
Contributor

@ac101m ac101m commented Oct 27, 2023

Changes

  • Merge release/os/5.1
  • Bump API version to 25

Notes

vlajos and others added 30 commits October 12, 2023 14:57
Move the Token Selection Processor in the stand-alone worker.
…Event Mediator in FlowWorker (#4832)"

This reverts commit 1e949e7.
Fix update and delete SQL statements within the State Manager
implementation so only the states with the specified key and
version are updated. This prevents race conditions while executing
the optimistic locking and also reduces by half the amount of SQL
statements that needs be executed for every update and delete.
This commit provides the ability to override topic configuration, including replica and partition counts, on the topic create CLI commands and via the Helm chart.

The YAML file output by the topic create preview now includes partitions and replicas fields per topic. These default to the global parameters. These are then consumed by the topic create connect command so can be manually modified between preview and use.

The topic create preview and topic create connect commands also both take an --overides/-o option, which is the optional path to a file of the same format as the preview file. This file's contents are merged to override those generated/passed in.

The contents of this file can be provided as YAML under bootstrap.kafka.overrides.
#4827)

Fixes exception handling for minimum platform version submitted using the MGM API to improve the returned error message.
CORE-17431 Store metadata in utxo_transaction_metadata since it is relatively large but only changes occasionally.
From logs locally and in our resiliency tests it's clear sandbox closing and therefore bundle uninstallation can be performed in multiple threads depending on whether purgeExpiryQueue is called from the cache's executor thread via the removal listener, or as part of some other synchronous cache operation which happens in the thread of the client calling it.

The parallelism in SecManagerForkJoinPool is configured to the number of processors. This means we wont just see the members of SandboxGroupContextCacheImpl manipulated across 2 threads, we will see it across many and it could happen concurrently in periods of significant flow activity.

This change makes the sandbox cache single threaded, meaning we only ever see manipulation of SandboxGroupContextCacheImpl on the same thread - confirmed by examining the logs.

The author of Caffeine states here that using the same thread for the executor is quite acceptable, the Cache itself does little work there: https://stackoverflow.com/questions/68101454/caffeine-combining-both-scheduler-and-executor-service
…' in ExpirationProcessor (#4839)

We added a new config value to define the polling frequency for the ExpirationProcessor. Previously, the processor failed to reach a healthy lifecycle state when we did a platform upgrade, because there was no mechanism to push the newly introduced config values to Kafka.
We added a temporary fix which would set the value of the frequencyOfExpirationPoll to a default in case of a missing config exception happens on upgrade.

We now have in place a fix to force initial config reconciliation on platform upgrade scenarios, so this temporary fix should be safe to remove.
Update sandbox level cache to receive virtualNodeContext to fix CPI upgrade failure
…sting endpoint (#4774)

For the RPC Epic the Persistence api will require two endpoints. One endpoint is already merged which relates to ledger-related persistence. This PR will be making a suggested change to the naming of that endpoint for clarity, and will also add the second endpoint required.

When this work is merged we will have the endpoints:
/ledger - for ledger persistence
/persistence - for entity persistence
…le and align with column changes (#4849)

The utxo_transaction_sources table has been modified. See CORE-17430 Modify the utxo_transaction_sources table by removing unused columns and renaming corda-api#1288. This PR contains the changes to align with those DB changes.
Reference states were not persisted in utxo_transaction_sources until now. Added that persisting logic.
This moves the RPC worker endpoint paths (E.g. `/ledger`) to a common consts file so they can be used to define both client and server config.
1. Do not rely on order of the requests returned.
2. Add more logging when re-registration is actually happening.
…ated state manager db (#4763)

These changes enable an isolated state-manager database to be automatically deployed via the Corda helm chart when db bootstrapping is enabled. 

A state-manager database can be bootstrapped by providing the `bootstrap.db.stateManager` postgres credentials overrides, and a `stateManager.db.host` override, along with credentials in `stateManager.db`. 

If no overrides are provided, the state-manager will be bootstrapped in a schema in the cluster database with cluster credentials. Template functions in _helpers.tpl will fall back to cluster JDBC URL and credentials.
CORE-16203, CORE-17429: Flow changes revert
Remove the attachment API from UTXO ledger transactions.
#4863)

Original scope was: The below conversation shows that if certificate validation fails, it’s unclear which certificate the error refers to. In this case it must refer to the TLS certificate because the session certificate is not used, but the error message should be clearer regardless.

However, we lately merged in a fix where we specify which type of certificate was wrong, so the message should be okay. This change resulted in Internal Server Error 500, which is wrong so modified it to 400.
This PR adds a `RPCClient` which will, in the future, be used by the Multi-source Event Mediator to make calls to Corda workers via RPC. Also included is a simple `HTTPRetryExecutor` which will retry HTTP calls a configurable number of times with incremental backoff and allows for a user-specified set of retryable exceptions.
Add `findUnconsumedStatesByExactType` to `UtxoLedgerService`, allowing developers to retrieve states by type from the vault in pages. This dissuades developers from retrieving every state from the vault in one go and returning them to a flow.

Reuse the vault-named query logic to create a `findUnconsumedStatesByExactType` API that supports paging without too much extra work.

Remove the non-paged version of `findUnconsumedStatesByExactType` as well.
)

Disallow duplicate key entries in the group policy. Before this change, providing duplicate keys in a static network group policy resulted in the last instance of that key being used (ignoring other instances).
Adds support for state metadata to the state and event processor.

Components using the event mediator to process events and states may wish to set metadata alongside the state that is written back to the underlying state storage. This change adds to the StateAndEventProcessor API to facilitate this, as well as migrating existing state and event processors to use this.

---------

Co-authored-by: James Higgs <[email protected]>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR title failed to match regex -> ^((CORDA|EG|ENT|INFRA|CORE|DOC|ES)-\d+)(.*)

@ac101m ac101m marked this pull request as ready for review October 27, 2023 16:46
@ac101m ac101m requested review from a team as code owners October 27, 2023 16:46
@ac101m ac101m requested a review from a team October 27, 2023 16:46
@ac101m ac101m requested review from a team as code owners October 27, 2023 16:46
@corda-jenkins-ci02
Copy link
Contributor

corda-jenkins-ci02 bot commented Oct 27, 2023

Jenkins build for PR 5005 build 7

Build Successful:
Jar artifact version produced by this PR: 5.1.0-INTEROP.0-alpha-1699378025188
Helm chart version produced by this PR: 5.1.0-Interop-alpha.1699378025188
Helm chart pushed to: oci://corda-os-docker-dev.software.r3.com/helm-charts/pr-5005/corda

Copy link
Contributor

@wzur-r3 wzur-r3 left a comment

Choose a reason for hiding this comment

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

LGTM for Jenkinsfiles and Gradle configuration files

Copy link

sonarcloud bot commented Nov 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.9% 0.9% Duplication

@ac101m ac101m merged commit 47e942b into release/interop/syntax Nov 7, 2023
6 checks passed
@ac101m ac101m deleted the alex/DA5-15-recurring-merge-2 branch November 7, 2023 21:04
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.