-
Notifications
You must be signed in to change notification settings - Fork 571
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
Use Foreign Keys in Db*State
#8930
Comments
8932: refactor: use foreign keys for incidents r=oleschoenburg a=oleschoenburg ## Description First `DbForeignKey` usage in `DbIncidentState` for referring to element instance and jobs. I had to adjust the tests to create necessary jobs and element instances. part of #8930 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
8933: refactor: use foreign keys for jobs r=oleschoenburg a=oleschoenburg ## Description Since `DbJobState` contains multiple column families which re-use the `jobKey`, I've added a new `fkJob` which wraps the `jobKey`. relates to #8930 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
Changing |
There's not much to do for I've opened an issue to support this in the future: #8944 |
For In
|
8919: Support decision table inputs and outputs without names/labels r=korthout a=korthout ## Description <!-- Please explain the changes you made here. --> A decision tables' inputs and outputs must have an id and can have a name. The name (or label) is not mandatory. Even though the internal decision engine was already able to deal with this, the workflow engine wasn't. It would try to write the EvaluationEvent record with an EvaluatedInputRecord (or EvaluatedOutputRecord) and then fail writing it because of a NullPointerException. This makes sure these records can be written when the name of the input or output is undefined. ## Related issues <!-- Which issues are closed by this PR or are related --> closes #8909 8939: refactor: use foreign keys for decisions r=oleschoenburg a=oleschoenburg ## Description Uses `DbForeignKey` internally to maintain referential integrity within `DbDecisionState` relates to #8930 Co-authored-by: Nico Korthout <nico.korthout@camunda.com> Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
8950: refactor: use foreign key for messages r=oleschoenburg a=oleschoenburg ## Description Uses `DbForeignKey` for referring to existing messages by key. There are more opportunities to use foreign keys in `DbMessageState`, for example `nameAndCorrelationKey` is reused, but that would depend on #8944 relates to #8930 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
I think for |
Can you verify that these failing tests are based on a multi partition setup? If that is the case, it does make sense, because then the element instance of that key lives in another partition. If the tests are single partition, we should look deeper what is going on. |
That seems to be the case 👍 So my reasoning was wrong, but the result is the same: we can't use foreign keys for |
8969: refactor: use foreign keys for element instance parent/child relations r=oleschoenburg a=oleschoenburg ## Description Uses `DbForeignKey` in `DbElementInstanceState` for the parent and child keys that should point to a valid element instance. relates to #8930 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@pihme Almost done! I'm lacking a bit of context to assess whether we could or should foreign keys in |
Let's discuss this together. I had a look. I don't think we need to do anything. I am also reluctant to make any changes here, because this happens before normal stream processing. So exceptions here, and their escalation would be fatal. At the same time, we need to make sure not to add inconsistencies during the migration. In any case, I want to discuss it with, state my reasoning and then you can play devil's advocate. |
8971: refactor: use foreign keys for timers r=oleschoenburg a=oleschoenburg ## Description Timer instances refer to element instances. An exception is made in case the element instance key is `-1` because timers sometimes created before the element. relates to #8930 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
|
Let's go over each
Db*State
and see where we can use foreign keys.DbDeploymentState
#8957DbEventScopeInstanceState
, nothing to do.DbMessageStartEventSubscriptionState
, nothing to do., see Use Foreign Keys inDbMessageSubscriptionState
Db*State
#8930 (comment)DbMigrationState
, nothing to do.DbBlackListState
, nothing to do.DbLastProcessedPositionState
, nothing to do.DbVariableState
, nothing to do.relates to #8884
The text was updated successfully, but these errors were encountered: