Skip to content

Commit

Permalink
[type:feature] ShenYu Admin Cluster (apache#5544)
Browse files Browse the repository at this point in the history
* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster, update h2 schema.sql apache#5448

* ShenYu Admin Cluster, add contextPath apache#5448

* ShenYu Admin Cluster, update schema.sql apache#5448

* ShenYu Admin Cluster, add contextPath apache#5448

* ShenYu Admin Cluster, refactor select master task apache#5448

* ShenYu Admin Cluster, add unit test apache#5448

* ShenYu Admin Cluster, add cluster sync data apache#5448

* ShenYu Admin Cluster, check style apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* Upgrade apache dubbo version support, forward request apache#5523

* Upgrade apache dubbo version support, forward request apache#5523

* Upgrade apache dubbo version support: when renew fail, remove master apache#5523

* ShenYu Admin Cluster, forward request apache#5448

* Shenyu Admin Cluster, forward request apache#5448

* Shenyu Admin Cluster: when renew fail, remove master apache#5448

* Shenyu Admin Cluster, refactor code apache#5448

* ShenYu Admin Cluster, websocket dispatcher apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster, add nonnull check apache#5448

* ShenYu Admin Cluster, fix register fail apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster, forward filter apache#5448

* ShenYu Admin Cluster, forward filter apache#5448

* ShenYu Admin Cluster, modify upstream check service apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster, ci debug apache#5448

* ShenYu Admin Cluster, sql apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster, h2 admin debug apache#5448

* ShenYu Admin Cluster, websocket debug apache#5448

* ShenYu Admin Cluster, websocket debug apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster: url component builder apache#5448

* ShenYu Admin Cluster:HTTP response splitting  apache#5448

* ShenYu Admin Cluster: Cross-site scripting apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster: code clean up apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster: ci debug apache#5448

* ShenYu Admin Cluster:Server-side request forgery apache#5448

* ShenYu Admin Cluster: ci debug apache#5448

* ShenYu Admin Cluster: ci debug apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster, websocket cluster check apache#5448

* ShenYu Admin Cluster, websocket remaster time period apache#5448

* ShenYu Admin Cluster, refactor apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster, refactor apache#5448

* ShenYu Admin Cluster apache#5448

* ShenYu Admin Cluster,websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, modify sql apache#5448

* ShenYu Admin Cluster, add zk support apache#5448

* ShenYu Admin Cluster, add zk support apache#5448

* ShenYu Admin Cluster, add zk support apache#5448

* ShenYu Admin Cluster, add zk support apache#5448

* ShenYu Admin Cluster, add zk support apache#5448

* ShenYu Admin Cluster, default disabled apache#5448

* ShenYu Admin Cluster, default disabled apache#5448

* ShenYu Admin Cluster, forwarding apache#5448

* ShenYu Admin Cluster, check sql  apache#5448

* ShenYu Admin Cluster, forwarding apache#5448

* ShenYu Admin Cluster, check sql  apache#5448

* ShenYu Admin Cluster, add cluster e2e  apache#5448

* ShenYu Admin Cluster, add cluster e2e  apache#5448

* ShenYu Admin Cluster, add cluster e2e  apache#5448

* ShenYu Admin Cluster, add cluster e2e  apache#5448

* ShenYu Admin Cluster, add cluster e2e  apache#5448

* ShenYu Admin Cluster, add cluster e2e  apache#5448

* ShenYu Admin Cluster, add constants apache#5448

* ShenYu Admin Cluster, remove magic number apache#5448

* ShenYu Admin Cluster, http schema config apache#5448

* ShenYu Admin Cluster, cluster config apache#5448

* ShenYu Admin Cluster, cluster config apache#5448

* ShenYu Admin Cluster, cluster websocket apache#5448

* ShenYu Admin Cluster, dispatch apache#5448

* ShenYu Admin Cluster, websocket version apache#5448

* ShenYu Admin Cluster, add comment apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, websocket apache#5448

* ShenYu Admin Cluster, e2e apache#5448

* ShenYu Admin Cluster, e2e apache#5448

* ShenYu Admin Cluster, e2e zookeeper apache#5448

* ShenYu Admin Cluster, e2e zookeeper apache#5448

* ShenYu Admin Cluster, cluster e2e apache#5448

* ShenYu Admin Cluster, cluster e2e apache#5448

* ShenYu Admin Cluster, cluster e2e zookeeper apache#5448

* ShenYu Admin Cluster, cluster e2e zookeeper apache#5448

* ShenYu Admin Cluster, cluster e2e zookeeper apache#5448

* ShenYu Admin Cluster, cluster e2e zookeeper apache#5448

* ShenYu Admin Cluster, cluster e2e zookeeper apache#5448

* ShenYu Admin Cluster, e2e apache#5448

---------

Co-authored-by: loongs-zhang <[email protected]>
  • Loading branch information
Aias00 and loongs-zhang authored Jul 5, 2024
1 parent fc35d90 commit 51cc917
Show file tree
Hide file tree
Showing 77 changed files with 4,732 additions and 213 deletions.
96 changes: 89 additions & 7 deletions .github/workflows/e2e-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,92 @@ jobs:
name: shenyu-images
path: /tmp/apache-shenyu-*.tar
retention-days: 1

e2e-cluster:
runs-on: ubuntu-latest
needs:
- changes
- build-docker-images
if: (github.repository == 'apache/shenyu' && ${{ needs.changes.outputs.e2e == 'true' }})
strategy:
matrix:
include:
- case: shenyu-e2e-case-cluster
script: e2e-cluster-jdbc
- case: shenyu-e2e-case-cluster
script: e2e-cluster-zookeeper
steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Free disk space
run: |
df --human-readable
sudo apt clean
docker rmi $(docker image ls --all --quiet)
rm --recursive --force "$AGENT_TOOLSDIRECTORY"
df --human-readable
rm -rf /tmp/shenyu
mkdir -p /tmp/shenyu
- uses: dorny/paths-filter@v2
id: filter
with:
filters: '.github/filters.yml'
list-files: json

- name: Install k8s
if: steps.filter.outputs.changed == 'true'
run: |
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE=777 sh -
cat /etc/rancher/k3s/k3s.yaml
mkdir -p ~/.kube
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
- name: Set up JDK 17 for Building ShenYu
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Restore ShenYu Maven Repos
if: steps.filter.outputs.changed == 'true'
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/download-artifact@v3
with:
name: shenyu-images
path: /tmp/shenyu/

- name: Build k8s Cluster
if: steps.filter.outputs.changed == 'true'
run: |
sudo k3s ctr images import /tmp/shenyu/apache-shenyu-admin.tar
sudo k3s ctr images import /tmp/shenyu/apache-shenyu-bootstrap.tar
# - name: Setup Debug Session
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 15
# with:
# detached: true

- name: Run E2E Tests
if: steps.filter.outputs.changed == 'true'
run: |
bash ./shenyu-e2e/shenyu-e2e-case/${{ matrix.case }}/k8s/script/${{ matrix.script }}.sh
- name: Cluster Test after Healthcheck
if: steps.filter.outputs.changed == 'true'
run: |
kubectl get all
kubectl get events --all-namespaces
kubectl logs -l app=shenyu-admin-mysql
e2e-storage:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -176,12 +262,6 @@ jobs:
sudo k3s ctr images import /tmp/shenyu/apache-shenyu-admin.tar
sudo k3s ctr images import /tmp/shenyu/apache-shenyu-bootstrap.tar
# - name: Setup Debug Session
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 15
# with:
# detached: true

- name: Run E2E Tests
if: steps.filter.outputs.changed == 'true'
run: |
Expand All @@ -192,7 +272,6 @@ jobs:
run: |
kubectl get all
kubectl get events --all-namespaces
kubectl logs -l app=shenyu-admin-mysql
e2e-case:
runs-on: ubuntu-latest
Expand All @@ -215,6 +294,7 @@ jobs:
script: e2e-grpc-sync
- case: shenyu-e2e-case-websocket
script: e2e-websocket-sync

steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -303,11 +383,13 @@ jobs:
if: ${{ needs.changes.outputs.e2e == 'true' }}
needs:
- changes
- e2e-cluster
- e2e-storage
- e2e-case
runs-on: ubuntu-latest
steps:
- name: checking job status
run: |
[[ "${{ needs.e2e-cluster.result }}" == "success" ]] || exit -1
[[ "${{ needs.e2e-storage.result }}" == "success" ]] || exit -1
[[ "${{ needs.e2e-case.result }}" == "success" ]] || exit -1
22 changes: 18 additions & 4 deletions db/init/mysql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2234,13 +2234,27 @@ CREATE TABLE IF NOT EXISTS `alert_receiver`
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for INT_LOCK
-- Table structure for sheny_lock
-- ----------------------------
DROP TABLE IF EXISTS `INT_LOCK`;
CREATE TABLE IF NOT EXISTS INT_LOCK (
DROP TABLE IF EXISTS `SHENYU_LOCK`;
CREATE TABLE IF NOT EXISTS SHENYU_LOCK (
`LOCK_KEY` CHAR(36) NOT NULL,
`REGION` VARCHAR(100) NOT NULL,
`CLIENT_ID` CHAR(36),
`CREATED_DATE` TIMESTAMP NOT NULL,
constraint INT_LOCK_PK primary key (LOCK_KEY, REGION)
constraint SHENYU_LOCK_PK primary key (LOCK_KEY, REGION)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for cluster_master
-- ----------------------------
DROP TABLE IF EXISTS `cluster_master`;
CREATE TABLE IF NOT EXISTS cluster_master (
`id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'primary key id',
`master_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'master host',
`master_port` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'master port',
`context_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'master context_path',
`date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'create time',
`date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT 'update time',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
40 changes: 33 additions & 7 deletions db/init/og/create-table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2512,15 +2512,41 @@ COMMENT ON COLUMN "public"."alert_receiver"."type" IS 'notice type 0-SMS 1-Email
COMMENT ON COLUMN "public"."alert_receiver"."match_all" IS 'match all or not';
COMMENT ON COLUMN "public"."alert_receiver"."date_created" IS 'create time';
COMMENT ON COLUMN "public"."alert_receiver"."date_updated" IS 'update time';
DROP TABLE IF EXISTS "public"."int_lock";
CREATE TABLE "public"."int_lock" (

-- ----------------------------
-- Table structure for shenyu_lock
-- ----------------------------
DROP TABLE IF EXISTS "public"."shenyu_lock";
CREATE TABLE "public"."shenyu_lock" (
"lock_key" CHAR(36) NOT NULL,
"region" VARCHAR(100) NOT NULL,
"client_id" CHAR(36),
"created_date" TIMESTAMP WITH TIME ZONE NOT NULL,
CONSTRAINT INT_LOCK_PK PRIMARY KEY ("lock_key", "region")
CONSTRAINT shenyu_lock_pk PRIMARY KEY ("lock_key", "region")
);
COMMENT ON COLUMN "public"."int_lock"."lock_key" IS 'lock_key';
COMMENT ON COLUMN "public"."int_lock"."region" IS 'region';
COMMENT ON COLUMN "public"."int_lock"."client_id" IS 'client_id';
COMMENT ON COLUMN "public"."int_lock"."created_date" IS 'created_date';
COMMENT ON COLUMN "public"."shenyu_lock"."lock_key" IS 'lock_key';
COMMENT ON COLUMN "public"."shenyu_lock"."region" IS 'region';
COMMENT ON COLUMN "public"."shenyu_lock"."client_id" IS 'client_id';
COMMENT ON COLUMN "public"."shenyu_lock"."created_date" IS 'created_date';


-- ----------------------------
-- Table structure for cluster_master
-- ----------------------------
DROP TABLE IF EXISTS "public"."cluster_master";
CREATE TABLE "public"."cluster_master"
(
"id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL PRIMARY KEY,
"master_host" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"master_port" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"context_path" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
"date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone)
)
;
COMMENT ON COLUMN "public"."cluster_master"."id" IS 'primary key id';
COMMENT ON COLUMN "public"."cluster_master"."master_host" IS 'master host';
COMMENT ON COLUMN "public"."cluster_master"."master_port" IS 'master port';
COMMENT ON COLUMN "public"."cluster_master"."context_path" IS 'master context_path';
COMMENT ON COLUMN "public"."cluster_master"."date_created" IS 'create time';
COMMENT ON COLUMN "public"."cluster_master"."date_updated" IS 'update time';
51 changes: 45 additions & 6 deletions db/init/oracle/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2680,19 +2680,58 @@ comment
on column alert_receiver.date_updated
is 'update time';

CREATE TABLE INT_LOCK (

-- ----------------------------
-- Table structure for SHENYU_LOCK
-- ----------------------------
CREATE TABLE SHENYU_LOCK (
LOCK_KEY CHAR(36),
REGION VARCHAR(100),
CLIENT_ID CHAR(36),
CREATED_DATE TIMESTAMP NOT NULL,
constraint INT_LOCK_PK primary key (LOCK_KEY, REGION)
constraint SHENYU_LOCK_PK primary key (LOCK_KEY, REGION)
);
-- Add comments to the columns
comment on column INT_LOCK.LOCK_KEY
comment on column SHENYU_LOCK.LOCK_KEY
is 'LOCK_KEY';
comment on column INT_LOCK.REGION
comment on column SHENYU_LOCK.REGION
is 'REGION';
comment on column INT_LOCK.CLIENT_ID
comment on column SHENYU_LOCK.CLIENT_ID
is 'CLIENT_ID';
comment on column INT_LOCK.CREATED_DATE
comment on column SHENYU_LOCK.CREATED_DATE
is 'CREATED_DATE';

-- ----------------------------
-- Table structure for cluster_master
-- ----------------------------
create table cluster_master
(
id varchar(128) not null,
master_host varchar(255) not null,
master_port varchar(255) not null,
context_path varchar(255) not null,
date_created timestamp(3) default SYSDATE not null,
date_updated timestamp(3) default SYSDATE not null,
PRIMARY KEY (id)
)
;
-- Add comments to the columns
comment
on column alert_receiver.id
is 'primary key id';
comment
on column alert_receiver.master_host
is 'master host';
comment
on column alert_receiver.master_port
is 'master port';
comment
on column alert_receiver.context_path
is 'master context_path';
comment
on column alert_receiver.date_created
is 'create time';
comment
on column alert_receiver.date_updated
is 'update time';

38 changes: 31 additions & 7 deletions db/init/pg/create-table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2635,15 +2635,39 @@ COMMENT ON COLUMN "public"."alert_receiver"."match_all" IS 'match all or not';
COMMENT ON COLUMN "public"."alert_receiver"."date_created" IS 'create time';
COMMENT ON COLUMN "public"."alert_receiver"."date_updated" IS 'update time';

DROP TABLE IF EXISTS "public"."int_lock";
CREATE TABLE "public"."int_lock" (
-- ----------------------------
-- Table structure for shenyu_lock
-- ----------------------------
DROP TABLE IF EXISTS "public"."shenyu_lock";
CREATE TABLE "public"."shenyu_lock" (
"lock_key" CHAR(36) NOT NULL,
"region" VARCHAR(100) NOT NULL,
"client_id" CHAR(36),
"created_date" TIMESTAMP WITH TIME ZONE NOT NULL,
CONSTRAINT INT_LOCK_PK PRIMARY KEY ("lock_key", "region")
CONSTRAINT shenyu_lock_pk PRIMARY KEY ("lock_key", "region")
);
COMMENT ON COLUMN "public"."int_lock"."lock_key" IS 'lock_key';
COMMENT ON COLUMN "public"."int_lock"."region" IS 'region';
COMMENT ON COLUMN "public"."int_lock"."client_id" IS 'client_id';
COMMENT ON COLUMN "public"."int_lock"."created_date" IS 'created_date';
COMMENT ON COLUMN "public"."shenyu_lock"."lock_key" IS 'lock_key';
COMMENT ON COLUMN "public"."shenyu_lock"."region" IS 'region';
COMMENT ON COLUMN "public"."shenyu_lock"."client_id" IS 'client_id';
COMMENT ON COLUMN "public"."shenyu_lock"."created_date" IS 'created_date';

-- ----------------------------
-- Table structure for cluster_master
-- ----------------------------
DROP TABLE IF EXISTS "public"."cluster_master";
CREATE TABLE "public"."cluster_master"
(
"id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL PRIMARY KEY,
"master_host" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"master_port" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"context_path" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone),
"date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text, (now())::timestamp(0) without time zone)
)
;
COMMENT ON COLUMN "public"."cluster_master"."id" IS 'primary key id';
COMMENT ON COLUMN "public"."cluster_master"."master_host" IS 'master host';
COMMENT ON COLUMN "public"."cluster_master"."master_port" IS 'master port';
COMMENT ON COLUMN "public"."cluster_master"."context_path" IS 'master context_path';
COMMENT ON COLUMN "public"."cluster_master"."date_created" IS 'create time';
COMMENT ON COLUMN "public"."cluster_master"."date_updated" IS 'update time';
24 changes: 20 additions & 4 deletions db/upgrade/2.6.1-upgrade-2.7.0-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ INSERT INTO `plugin_handle` VALUES ('1722804548510507023', '3', 'rewriteMetaData

INSERT INTO `shenyu_dict` VALUES ('1679002911061737478', 'rewriteMetaData', 'REWRITE_META_DATA', 'true', 'true', '', 4, 1, '2024-02-07 14:31:49', '2024-02-07 14:31:49');
INSERT INTO `shenyu_dict` VALUES ('1679002911061737479', 'rewriteMetaData', 'REWRITE_META_DATA', 'false', 'false', '', 4, 1, '2024-02-07 14:31:49', '2024-02-07 14:31:49');

-- ----------------------------
-- Table structure for INT_LOCK
-- Table structure for sheny_lock
-- ----------------------------
DROP TABLE IF EXISTS `INT_LOCK`;
CREATE TABLE IF NOT EXISTS INT_LOCK (
DROP TABLE IF EXISTS `SHENYU_LOCK`;
CREATE TABLE IF NOT EXISTS SHENYU_LOCK (
`LOCK_KEY` CHAR(36) NOT NULL,
`REGION` VARCHAR(100) NOT NULL,
`CLIENT_ID` CHAR(36),
`CREATED_DATE` TIMESTAMP NOT NULL,
constraint INT_LOCK_PK primary key (LOCK_KEY, REGION)
constraint SHENYU_LOCK_PK primary key (LOCK_KEY, REGION)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

INSERT INTO `resource` VALUES ('1347048240677269503', '1346777766301888512', 'SHENYU.PLUGIN.BATCH.OPENED', '', '', '', 2, 3, '', 1, 0, 'system:authen:open', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
Expand All @@ -40,3 +41,18 @@ INSERT INTO `resource` VALUES ('1386680049203195915', '1346777157943259136', 'SH
INSERT INTO `resource` VALUES ('1386680049203195916', '1346777157943259136', 'SHENYU.COMMON.IMPORT', '', '', '', 2, 0, '', 1, 0, 'system:manager:importConfig', 1, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1386680049203195906', '1346358560427216896', '1386680049203195915', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
INSERT INTO `permission` VALUES ('1386680049203195907', '1346358560427216896', '1386680049203195916', '2022-05-25 18:02:53', '2022-05-25 18:02:53');


-- ----------------------------
-- Table structure for cluster_master
-- ----------------------------
DROP TABLE IF EXISTS `cluster_master`;
CREATE TABLE IF NOT EXISTS cluster_master (
`id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'primary key id',
`master_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'master host',
`master_port` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'master port',
`context_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'master context_path',
`date_created` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'create time',
`date_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT 'update time',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
Loading

0 comments on commit 51cc917

Please sign in to comment.