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

disable cache for oracle sequences #446

Merged
merged 8 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- Sortable workflow definitions, workflow instance search result and executors tables
- Persist workflow instance query parameters to URL
- Support wildcard characters when searching workflow instances by business key or external id
- Database scripts
- Fix issues in Oracle scripts

**Details**
- `nflow-jetty`
Expand All @@ -19,6 +21,10 @@
- is-svg 4.3.1
- `nflow-engine`
- Support SQL wildcards in workflow instance queries by business key or external id
- Database scripts
- Disable cache for Oracle sequences
- Fix `nflow_workflow_action_insert` trigger in Oracle database scripts
- Fix syntax error in `create table nflow_workflow` statement in `oracle.create.ddl.sql`

## 7.2.4 (2021-02-25)

Expand Down
10 changes: 5 additions & 5 deletions nflow-engine/src/main/resources/scripts/db/oracle.create.ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ create table nflow_workflow (
id int not null primary key,
status varchar(32) not null,
type varchar(64) not null,
priority smallint not null default 0,
priority smallint default 0 not null,
parent_workflow_id int default null,
parent_action_id int default null,
business_key varchar(64),
Expand All @@ -31,7 +31,7 @@ create index nflow_workflow_polling on nflow_workflow(next_activation, status, e
create index idx_workflow_parent on nflow_workflow(parent_workflow_id)
/

create sequence nflow_workflow_id_seq
create sequence nflow_workflow_id_seq nocache
/

create or replace trigger nflow_workflow_insert
Expand Down Expand Up @@ -70,15 +70,15 @@ create table nflow_workflow_action (
create index nflow_workflow_action_workflow on nflow_workflow_action(workflow_id)
/

create sequence nflow_workflow_action_id_seq
create sequence nflow_workflow_action_id_seq nocache
/

create or replace trigger nflow_workflow_action_insert
before insert on nflow_workflow_action
for each row
declare
begin
:new.id := nflow_workflow_id_seq.nextval;
:new.id := nflow_workflow_action_id_seq.nextval;
end;
/

Expand All @@ -104,7 +104,7 @@ create table nflow_executor (
)
/

create sequence nflow_executor_id_seq
create sequence nflow_executor_id_seq nocache
/

create or replace trigger nflow_executor_insert
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
alter sequence nflow_executor_id_seq nocache
/

alter sequence nflow_workflow_id_seq nocache
/

drop sequence nflow_workflow_action_id_seq
/

declare
id_with_slack number;
begin
select nvl(max(id),0) + 1000 into id_with_slack from nflow_workflow_action;
execute immediate 'create sequence nflow_workflow_action_id_seq start with ' || id_with_slack || ' nocache';
end;
/

create or replace trigger nflow_workflow_action_insert
before insert on nflow_workflow_action
for each row
declare
begin
:new.id := nflow_workflow_action_id_seq.nextval;
end;
/
efonsell marked this conversation as resolved.
Show resolved Hide resolved