diff --git a/CHANGES.md b/CHANGES.md index 26da00772da..777f12a377d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ Apollo 2.3.0 * [sync apollo portal server config to apollo quick start server](https://github.com/apolloconfig/apollo/pull/5134) * [Fix the role permission deletion issue when appid contains '_'](https://github.com/apolloconfig/apollo/pull/5150) * [fix: -XX:HeapDumpPath doesn't ready when meet OOM](https://github.com/apolloconfig/apollo/pull/5157) +* [Fix the error occurred when using configuration retention feature](https://github.com/apolloconfig/apollo/pull/5162) ------------------ All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/14?closed=1) diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AccessKey.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AccessKey.java index dcd78d04228..3e927bbf914 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AccessKey.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AccessKey.java @@ -26,7 +26,7 @@ @Entity @Table(name = "`AccessKey`") -@SQLDelete(sql = "Update AccessKey set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `AccessKey` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class AccessKey extends BaseEntity { diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Audit.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Audit.java index 3f0886de1d3..4f2ac566b41 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Audit.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Audit.java @@ -27,7 +27,7 @@ @Entity @Table(name = "`Audit`") -@SQLDelete(sql = "Update Audit set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Audit` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Audit extends BaseEntity { diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Cluster.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Cluster.java index e69b8019e66..3bcb626b8f8 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Cluster.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Cluster.java @@ -30,7 +30,7 @@ */ @Entity @Table(name = "`Cluster`") -@SQLDelete(sql = "Update Cluster set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Cluster` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Cluster extends BaseEntity implements Comparable { diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java index cc03f375c07..6219115069c 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java @@ -28,7 +28,7 @@ @Entity @Table(name = "`Commit`") -@SQLDelete(sql = "Update Commit set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Commit` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Commit extends BaseEntity { diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/GrayReleaseRule.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/GrayReleaseRule.java index 355adeb19ef..393c72e6df8 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/GrayReleaseRule.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/GrayReleaseRule.java @@ -27,7 +27,7 @@ @Entity @Table(name = "`GrayReleaseRule`") -@SQLDelete(sql = "Update GrayReleaseRule set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `GrayReleaseRule` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class GrayReleaseRule extends BaseEntity{ diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java index 641f8cc8bdd..f18218b1725 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java @@ -28,7 +28,7 @@ @Entity @Table(name = "`Item`") -@SQLDelete(sql = "Update Item set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Item` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Item extends BaseEntity { diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Namespace.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Namespace.java index d03368f72ca..bc966c0d66a 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Namespace.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Namespace.java @@ -27,7 +27,7 @@ @Entity @Table(name = "`Namespace`") -@SQLDelete(sql = "Update Namespace set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Namespace` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Namespace extends BaseEntity { diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Privilege.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Privilege.java index e33be80a8a0..d86095f45e8 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Privilege.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Privilege.java @@ -27,7 +27,7 @@ @Entity @Table(name = "`Privilege`") -@SQLDelete(sql = "Update Privilege set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Privilege` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Privilege extends BaseEntity { diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Release.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Release.java index 950962d57fb..2f33516e3e3 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Release.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Release.java @@ -31,7 +31,7 @@ */ @Entity @Table(name = "`Release`") -@SQLDelete(sql = "Update Release set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Release` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Release extends BaseEntity { @Column(name = "`ReleaseKey`", nullable = false) diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ReleaseHistory.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ReleaseHistory.java index 5d6ebc84706..d387f1cb0ec 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ReleaseHistory.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ReleaseHistory.java @@ -30,7 +30,7 @@ */ @Entity @Table(name = "`ReleaseHistory`") -@SQLDelete(sql = "Update ReleaseHistory set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `ReleaseHistory` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class ReleaseHistory extends BaseEntity { @Column(name = "`AppId`", nullable = false) diff --git a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ServerConfig.java b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ServerConfig.java index bb82f2ea191..8da6913022f 100644 --- a/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ServerConfig.java +++ b/apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ServerConfig.java @@ -30,7 +30,7 @@ */ @Entity @Table(name = "`ServerConfig`") -@SQLDelete(sql = "Update ServerConfig set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `ServerConfig` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class ServerConfig extends BaseEntity { @Column(name = "`Key`", nullable = false) diff --git a/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/App.java b/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/App.java index 6a892517f7b..cef034aac5e 100644 --- a/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/App.java +++ b/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/App.java @@ -30,7 +30,7 @@ @Entity @Table(name = "`App`") -@SQLDelete(sql = "Update App set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `App` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") @ApolloAuditLogDataInfluenceTable(tableName = "App") public class App extends BaseEntity { diff --git a/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/AppNamespace.java b/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/AppNamespace.java index 316f4863bb0..251c3737b90 100644 --- a/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/AppNamespace.java +++ b/apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/AppNamespace.java @@ -33,7 +33,7 @@ @Entity @Table(name = "`AppNamespace`") -@SQLDelete(sql = "Update AppNamespace set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `AppNamespace` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") @ApolloAuditLogDataInfluenceTable(tableName = "AppNamespace") public class AppNamespace extends BaseEntity { diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/Consumer.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/Consumer.java index 4b06b9e1657..9fbf9e68ac5 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/Consumer.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/Consumer.java @@ -27,7 +27,7 @@ @Entity @Table(name = "`Consumer`") -@SQLDelete(sql = "Update Consumer set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Consumer` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Consumer extends BaseEntity { diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerRole.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerRole.java index d9ce70739d2..40a5de69cb4 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerRole.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerRole.java @@ -30,7 +30,7 @@ */ @Entity @Table(name = "`ConsumerRole`") -@SQLDelete(sql = "Update ConsumerRole set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `ConsumerRole` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class ConsumerRole extends BaseEntity { @Column(name = "`ConsumerId`", nullable = false) diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerToken.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerToken.java index 631ffabfedc..baa1c0dc7c7 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerToken.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/entity/ConsumerToken.java @@ -32,7 +32,7 @@ */ @Entity @Table(name = "`ConsumerToken`") -@SQLDelete(sql = "Update ConsumerToken set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `ConsumerToken` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class ConsumerToken extends BaseEntity { @Column(name = "`ConsumerId`", nullable = false) diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Favorite.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Favorite.java index 2b759f741d2..1cf9215d34d 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Favorite.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Favorite.java @@ -27,7 +27,7 @@ @Entity @Table(name = "`Favorite`") -@SQLDelete(sql = "Update Favorite set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Favorite` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Favorite extends BaseEntity { diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Permission.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Permission.java index b78e5025886..10f1e86518b 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Permission.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Permission.java @@ -30,7 +30,7 @@ */ @Entity @Table(name = "`Permission`") -@SQLDelete(sql = "Update Permission set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Permission` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class Permission extends BaseEntity { @Column(name = "`PermissionType`", nullable = false) diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Role.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Role.java index 700372692ae..a265285d2ed 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Role.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/Role.java @@ -32,7 +32,7 @@ */ @Entity @Table(name = "`Role`") -@SQLDelete(sql = "Update Role set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `Role` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") @ApolloAuditLogDataInfluenceTable(tableName = "Role") public class Role extends BaseEntity { diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/RolePermission.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/RolePermission.java index 6291bfad7ee..60db53b82e2 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/RolePermission.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/RolePermission.java @@ -30,7 +30,7 @@ */ @Entity @Table(name = "`RolePermission`") -@SQLDelete(sql = "Update RolePermission set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `RolePermission` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") public class RolePermission extends BaseEntity { @Column(name = "`RoleId`", nullable = false) diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/ServerConfig.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/ServerConfig.java index f3991afd0bc..13bf161105d 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/ServerConfig.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/ServerConfig.java @@ -33,7 +33,7 @@ */ @Entity @Table(name = "`ServerConfig`") -@SQLDelete(sql = "Update ServerConfig set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `ServerConfig` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") @ApolloAuditLogDataInfluenceTable(tableName = "ServerConfig") public class ServerConfig extends BaseEntity { diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/UserRole.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/UserRole.java index 8007ce4a0a2..66c9bd74217 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/UserRole.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/UserRole.java @@ -32,7 +32,7 @@ */ @Entity @Table(name = "`UserRole`") -@SQLDelete(sql = "Update UserRole set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") +@SQLDelete(sql = "Update `UserRole` set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?") @Where(clause = "`IsDeleted` = false") @ApolloAuditLogDataInfluenceTable(tableName = "UserRole") public class UserRole extends BaseEntity {