Skip to content

Commit

Permalink
Merge 60c8018 into a7f6380
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvard Fonsell committed May 22, 2019
2 parents a7f6380 + 60c8018 commit 2accba5
Show file tree
Hide file tree
Showing 41 changed files with 268 additions and 156 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## 5.6.1-SNAPSHOT (future release)
## 5.7.0-SNAPSHOT (future release)

**Highlights**
- Added `started` timestamp to workflow instance table (requires database update)

**Details**
- `nflow-engine`
- Add started timestamp to workflow instance table. This makes the instance queries much faster when instances have lots of actions, as there is no need to join the nflow_workflow_action table to the query anymore.
- Deprecated WorkflowInstanceInclude.STARTED enum value. This is not needed anymore, since the started timestamp is always read from the database when the instance is loaded.

## 5.6.0 (2019-05-21)

Expand All @@ -16,10 +20,10 @@
- jetty 9.4.17.v20190418
- `nflow-engine`
- Retry workflow state processing until all steps in nFlow-side are executed successfully. This will prevent workflow instances from being locked in `executing` status, if e.g. database connection fails after locking the instance and before querying the full workflow instance information (`WorkflowStateProcessor`).
- Fix #306: create empty ArrayList with default initial size
- Log more executor details on startup
- Fix #306: create empty ArrayList with default initial size.
- Log more executor details on startup.
- Fix #311: Replace references to WorkflowDefinition with AbstractWorkflowDefinition to support non-enum WorkflowStates
- Use name() instead of toString() when getting workflow instance initial state name
- Use name() instead of toString() when getting workflow instance initial state name.

## 5.5.0 (2019-04-04)

Expand Down
26 changes: 16 additions & 10 deletions DECISION_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,34 @@

(newest first)

2015-04-19 efonsell
---------------------------
6: 2019-05-22 efonsell
----------------------
Add WorkflowInstance.started value (time when processing of the first state of the workflow was started) to the database as nflow_workflow.started. Reading the value from nflow_workflow_action table was causing performance issues when the amount of actions in the database was growing.

This decision overrides the decision number 2.

5: 2015-04-19 efonsell
----------------------
Define default property-values in properties-files only and make them required when there is a static default value. Do not define default values in properties-files for properties that have a dynamic default value. For example, nflow.dispatcher.sleep.ms default value 1000 is defined in nflow-engine.properties, but nflow.executor.thread.count default value which is based on number of processors is defined in the Java code.


2015-01-10 gmokki, efonsell
---------------------------
4: 2015-01-10 gmokki, efonsell
------------------------------
When polling for next workflow instances in WorkflowInstanceDao, the modified field in OptimisticLockKey is handled as String instead of Timestamp to avoid problems caused by losing millisecond precision from timestamps in some cases (for example with some older versions of MySQL).


2014-12-10 eputtone
-------------------
3: 2014-12-10 eputtone
----------------------
Internal nFlow functionalities can access DAO layer (package com.nitorcreations.nflow.engine.internal.dao) directly instead of going through service layer (package com.nitorcreations.nflow.engine.service). Rationale: service layer is currently part of public API that we wish to keep as simple as possible. Example: WorkflowDefinitionResource in nflow-rest-api uses WorkflowDefinitionDao directly for retrieving StoredWorkflowDefinitions, because we don't want to confuse public API users with multiple workflow definition representations.


2014-11-26 jsyrjala
-------------------
2: 2014-11-26 jsyrjala
----------------------
WorkflowInstance.started value (time when processing of the workflow is first started) is fetched from the earliest nflow_workflow_action.start_execution value. This way no changes to database is needed. If needed because of performance, the value may be later added as nflow_workflow.started.

Started value is fetched with a subselect. This requires that nflow_workflow_action.workflow_id is indexed. Postgres has explicit index, h2 and mysql have implicit index via foreign key.


2014-11-26 efonsell
-------------------
1: 2014-11-26 efonsell
----------------------
Swagger-UI static resources are downloaded from GitHub based on version defined in pom.xml and extracted to nflow-jetty target directory, except index.html which is customized and thus updated manually in nFlow repository.
2 changes: 1 addition & 1 deletion nflow-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<artifactId>nflow-root</artifactId>
<groupId>io.nflow</groupId>
<version>5.6.1-SNAPSHOT</version>
<version>5.7.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ public PreparedStatement createPreparedStatement(Connection con) throws SQLExcep
return p;
}
}, keyHolder);
int executorId = keyHolder.getKey().intValue();
int allocatedExecutorId = keyHolder.getKey().intValue();
logger.info("Joined executor group {} as executor {} running on host {} with process id {}.",
executorGroup, executorId, host, pid);
return executorId;
executorGroup, allocatedExecutorId, host, pid);
return allocatedExecutorId;
}

public void updateActiveTimestamp() {
Expand Down
Loading

0 comments on commit 2accba5

Please sign in to comment.