-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scheduled and stuck tasks are now resumed concurrently. (#140)
* Scheduled and stuck tasks are now resumed concurrently.
- Loading branch information
Showing
15 changed files
with
258 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '3.7' | ||
version: '3.3' | ||
|
||
# Make sure you disable userland networking, for proper perf tests. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
demoapp/src/main/resources/db/changelog/mysql/V1.0__initialize.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
CREATE TABLE tw_task | ||
( | ||
id BINARY(16) PRIMARY KEY NOT NULL, | ||
status ENUM('NEW', 'WAITING', 'SUBMITTED', 'PROCESSING', 'DONE', 'ERROR', 'FAILED'), | ||
-- Microsecond precision (6) is strongly recommended here to reduce the chance of gap locks deadlocking on tw_task_idx1 | ||
next_event_time DATETIME(6) NOT NULL, | ||
state_time DATETIME(3) NOT NULL, | ||
version BIGINT NOT NULL, | ||
priority INT NOT NULL DEFAULT 5, | ||
processing_start_time DATETIME(3) NULL, | ||
processing_tries_count BIGINT NOT NULL, | ||
time_created DATETIME(3) NOT NULL, | ||
time_updated DATETIME(3) NOT NULL, | ||
type VARCHAR(250) CHARACTER SET latin1 NOT NULL, | ||
sub_type VARCHAR(250) CHARACTER SET latin1 NULL, | ||
processing_client_id VARCHAR(250) CHARACTER SET latin1 NULL, | ||
data LONGTEXT NOT NULL | ||
); | ||
|
||
CREATE INDEX tw_task_idx1 ON tw_task (status, next_event_time); | ||
|
||
CREATE TABLE tw_task_data | ||
( | ||
task_id BINARY(16) PRIMARY KEY NOT NULL, | ||
data_format INT NOT NULL, | ||
data LONGBLOB NOT NULL | ||
); | ||
|
||
CREATE TABLE unique_tw_task_key | ||
( | ||
task_id BINARY(16) PRIMARY KEY, | ||
key_hash INT NOT NULL, | ||
`key` VARCHAR(150) CHARACTER SET latin1 NOT NULL, | ||
UNIQUE KEY uidx1 (key_hash, `key`) | ||
); |
36 changes: 36 additions & 0 deletions
36
demoapp/src/main/resources/db/changelog/postgres/V1.0__initialize.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
CREATE TABLE tw_task | ||
( | ||
id UUID PRIMARY KEY, | ||
type TEXT NOT NULL, | ||
sub_type TEXT NULL, | ||
status TEXT NOT NULL, | ||
data TEXT NOT NULL, | ||
next_event_time TIMESTAMPTZ(6) NOT NULL, | ||
state_time TIMESTAMPTZ(3) NOT NULL, | ||
processing_client_id TEXT NULL, | ||
processing_start_time TIMESTAMPTZ(3) NULL, | ||
time_created TIMESTAMPTZ(3) NOT NULL, | ||
time_updated TIMESTAMPTZ(3) NOT NULL, | ||
processing_tries_count BIGINT NOT NULL, | ||
version BIGINT NOT NULL, | ||
priority INT NOT NULL DEFAULT 5 | ||
); | ||
|
||
CREATE INDEX tw_task_idx1 ON tw_task (status, next_event_time); | ||
|
||
CREATE TABLE tw_task_data | ||
( | ||
task_id UUID PRIMARY KEY NOT NULL, | ||
data_format INT NOT NULL, | ||
data BYTEA NOT NULL | ||
); | ||
|
||
ALTER TABLE tw_task_data ALTER COLUMN data SET STORAGE EXTERNAL; | ||
|
||
CREATE TABLE unique_tw_task_key | ||
( | ||
task_id UUID PRIMARY KEY NOT NULL, | ||
key_hash INT NOT NULL, | ||
key TEXT NOT NULL, | ||
unique (key_hash, key) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version=1.29.1 | ||
version=1.30.0 | ||
org.gradle.internal.http.socketTimeout=120000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.