You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/08/10 01:55:45 UTC

[GitHub] WillemJiang closed pull request #246: SCB-829 An index on TxEvent (globalTxId) should be added

WillemJiang closed pull request #246: SCB-829 An index on TxEvent (globalTxId) should be added
URL: https://github.com/apache/incubator-servicecomb-saga/pull/246
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/alpha/alpha-server/src/main/resources/schema-mysql.sql b/alpha/alpha-server/src/main/resources/schema-mysql.sql
index b1598573..85522a7a 100644
--- a/alpha/alpha-server/src/main/resources/schema-mysql.sql
+++ b/alpha/alpha-server/src/main/resources/schema-mysql.sql
@@ -30,7 +30,8 @@ CREATE TABLE IF NOT EXISTS TxEvent (
   retries int(11) NOT NULL DEFAULT '0',
   retryMethod varchar(256) DEFAULT NULL,
   PRIMARY KEY (surrogateId),
-  INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime)
+  INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime),
+  INDEX saga_global_tx_index (globalTxId)
 ) DEFAULT CHARSET=utf8;
 
 CREATE TABLE IF NOT EXISTS Command (
diff --git a/alpha/alpha-server/src/main/resources/schema-postgresql.sql b/alpha/alpha-server/src/main/resources/schema-postgresql.sql
index b3f77023..bf8244b4 100644
--- a/alpha/alpha-server/src/main/resources/schema-postgresql.sql
+++ b/alpha/alpha-server/src/main/resources/schema-postgresql.sql
@@ -32,6 +32,7 @@ CREATE TABLE IF NOT EXISTS TxEvent (
 );
 
 CREATE INDEX IF NOT EXISTS saga_events_index ON TxEvent (surrogateId, globalTxId, localTxId, type, expiryTime);
+CREATE INDEX IF NOT EXISTS saga_global_tx_index ON TxEvent (globalTxId);
 
 
 CREATE TABLE IF NOT EXISTS Command (


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services