[Enhancement] Add detail msg to show the reason of publish failure. (#3647)

Add 2 new columns `PublishTime` and `ErrMsg` to show publish version time and  errors happen during the transaction process. Can be seen by executing: 

`SHOW PROC "/transactions/dbId/";`
or
`SHOW TRANSACTION WHERE ID=xx;`

Currently is only record error happen in publish phase, which can help us to find out which txn
is blocked.

Fix #3646
This commit is contained in:
Mingyu Chen
2020-05-22 22:59:53 +08:00
committed by GitHub
parent ba7d2dbf7b
commit 1124808fbc
5 changed files with 50 additions and 16 deletions

View File

@ -214,10 +214,11 @@ public class DatabaseTransactionMgrTest {
assertTrue(currentTime > TimeUtils.timeStringToLong(txnInfo.get(5)));
assertTrue(currentTime > TimeUtils.timeStringToLong(txnInfo.get(6)));
assertTrue(currentTime > TimeUtils.timeStringToLong(txnInfo.get(7)));
assertEquals("", txnInfo.get(8));
assertEquals("0", txnInfo.get(9));
assertEquals("-1", txnInfo.get(10));
assertEquals(String.valueOf(Config.stream_load_default_timeout_second * 1000), txnInfo.get(11));
assertTrue(currentTime > TimeUtils.timeStringToLong(txnInfo.get(8)));
assertEquals("", txnInfo.get(9));
assertEquals("0", txnInfo.get(10));
assertEquals("-1", txnInfo.get(11));
assertEquals(String.valueOf(Config.stream_load_default_timeout_second * 1000), txnInfo.get(12));
}
@Test