Skip to content

Commit 815e259

Browse files
Backport to branch(3.13) : Fix SQL Server 2017 CI (#2606)
Co-authored-by: Vincent Guilpain <[email protected]>
1 parent 563e178 commit 815e259

File tree

5 files changed

+70
-51
lines changed

5 files changed

+70
-51
lines changed

.github/workflows/ci.yaml

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ env:
3939
ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVersion: "${{ github.event_name != 'workflow_dispatch' && '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION }}"
4040
ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVendor: "${{ github.event_name != 'workflow_dispatch' && 'temurin' || inputs.INT_TEST_JAVA_RUNTIME_VENDOR }}"
4141
# This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK)} then {true} else {false}
42+
# Oracle JDK that are linux compatible and publicly available through direct download exist for all LTS versions
4243
SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle')) && 'true' || 'false' }}"
4344
INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT: '"-Dscalardb.consensus_commit.coordinator.group_commit.enabled=true" "-Dscalardb.consensus_commit.coordinator.group_commit.old_group_abort_timeout_millis=15000" --tests "**.ConsensusCommit**"'
4445

@@ -248,9 +249,10 @@ jobs:
248249
name: Cosmos DB integration test (${{ matrix.mode.label }})
249250
runs-on: windows-latest
250251
env:
252+
# Official Oracle JDK images that are windows compatible and publicly available through direct download do not exist for JDK 8 and 11 so we use instead cached versions hosted on the Scalar container registry.
251253
# This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK 8 or 11)} then {true} else {false}
252254
SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11'))) && 'true' || 'false' }}"
253-
SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ (inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11')) && 'true' || 'false' }}"
255+
SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ ((inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11') && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle') && 'true' || 'false' }}"
254256

255257
strategy:
256258
matrix:
@@ -1124,18 +1126,12 @@ jobs:
11241126

11251127
integration-test-for-jdbc-sqlserver-2017:
11261128
name: SQL Server 2017 integration test (${{ matrix.mode.label }})
1127-
runs-on: ubuntu-20.04
1128-
1129-
services:
1130-
sqlserver:
1131-
image: mcr.microsoft.com/mssql/server:2017-latest
1132-
env:
1133-
MSSQL_PID: "Express"
1134-
SA_PASSWORD: "SqlServer17"
1135-
ACCEPT_EULA: "Y"
1136-
ports:
1137-
- 1433:1433
1138-
options: --name sqlserver17
1129+
runs-on: windows-latest
1130+
env:
1131+
# Official Oracle JDK images that are windows compatible and publicly available through direct download do not exist for JDK 8 and 11 so we use instead cached versions hosted on the Scalar container registry.
1132+
# This variable evaluates to: if {!(Temurin JDK 8) && !(Oracle JDK 8 or 11)} then {true} else {false}
1133+
SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11: "${{ (github.event_name == 'workflow_dispatch' && !(inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'temurin') && !(inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' && (inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11'))) && 'true' || 'false' }}"
1134+
SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11: "${{ ((inputs.INT_TEST_JAVA_RUNTIME_VERSION == '8' || inputs.INT_TEST_JAVA_RUNTIME_VERSION == '11') && inputs.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle') && 'true' || 'false' }}"
11391135

11401136
strategy:
11411137
matrix:
@@ -1148,6 +1144,13 @@ jobs:
11481144
steps:
11491145
- uses: actions/checkout@v4
11501146

1147+
- name: Setup Sql Server 2017
1148+
uses: rails-sqlserver/setup-mssql@v1
1149+
with:
1150+
components: sqlcmd,sqlengine
1151+
sa-password: "SqlServer17"
1152+
version: 2017
1153+
11511154
- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})
11521155
uses: actions/setup-java@v4
11531156
with:
@@ -1156,34 +1159,45 @@ jobs:
11561159

11571160
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test
11581161
uses: actions/setup-java@v4
1159-
if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}}
1162+
if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}}
11601163
with:
11611164
java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}
11621165
distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}
11631166

1164-
- name: Login to Oracle container registry
1167+
- name: Login to GitHub Container Registry
11651168
uses: docker/login-action@v3
1166-
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
1169+
if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}}
11671170
with:
1168-
registry: container-registry.oracle.com
1169-
username: ${{ secrets.OCR_USERNAME }}
1170-
password: ${{ secrets.OCR_TOKEN }}
1171+
registry: ghcr.io
1172+
username: ${{ github.repository_owner }}
1173+
password: ${{ secrets.CR_PAT }}
11711174

11721175
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test
1173-
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
1176+
if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}}
11741177
run: |
1175-
container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}")
1176-
docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id"
1178+
$container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-windows")
1179+
docker cp "${container_id}:oracle-jdk.exe" .
1180+
docker rm "$container_id"
1181+
Write-Host "Install Oracle JDK"
1182+
Start-Process "oracle-jdk.exe" -NoNewWindow -Wait -ArgumentList "/s"
1183+
Write-Host "Oracle JDK installation successful"
1184+
if ( ${env:INT_TEST_JAVA_RUNTIME_VERSION} -eq '8' ) {
1185+
$jdk_root_dir = "jdk-1.8"
1186+
} else {
1187+
$jdk_root_dir = "jdk-11"
1188+
}
1189+
echo "JAVA_HOME=C:\Program Files\Java\${jdk_root_dir}" >> ${env:GITHUB_ENV}
11771190
11781191
- name: Create no superuser
1179-
run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver17 SqlServer17 10 3
1192+
run: ./ci/no-superuser/create-no-superuser-sqlserver.sh SqlServer17 10 3
1193+
shell: bash
11801194
timeout-minutes: 1
11811195

11821196
- name: Setup Gradle
11831197
uses: gradle/actions/setup-gradle@v4
11841198

11851199
- name: Execute Gradle 'integrationTestJdbc' task
1186-
run: ./gradlew integrationTestJdbc "-Dscalardb.jdbc.url=jdbc:sqlserver://localhost:1433;databaseName=test_db;encrypt=true;trustServerCertificate=true" -Dscalardb.jdbc.username=no_superuser -Dscalardb.jdbc.password=no_superuser_password ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
1200+
run: ./gradlew.bat integrationTestJdbc "-Dscalardb.jdbc.url=jdbc:sqlserver://localhost:1433;databaseName=test_db;encrypt=true;trustServerCertificate=true" "-Dfile.encoding=UTF-8" "-Dscalardb.jdbc.username=no_superuser" "-Dscalardb.jdbc.password=no_superuser_password" ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
11871201

11881202
- name: Upload Gradle test reports
11891203
if: always()
@@ -1246,7 +1260,7 @@ jobs:
12461260
docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id"
12471261
12481262
- name: Create no superuser
1249-
run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver19 SqlServer19 10 3
1263+
run: ./ci/no-superuser/create-no-superuser-sqlserver.sh SqlServer19 10 3 sqlserver19
12501264
timeout-minutes: 1
12511265

12521266
- name: Setup Gradle
@@ -1316,7 +1330,7 @@ jobs:
13161330
docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id"
13171331
13181332
- name: Create no superuser
1319-
run: ./ci/no-superuser/create-no-superuser-sqlserver.sh sqlserver22 SqlServer22 10 3
1333+
run: ./ci/no-superuser/create-no-superuser-sqlserver.sh SqlServer22 10 3 sqlserver22
13201334
timeout-minutes: 1
13211335

13221336
- name: Setup Gradle

ci/no-superuser/create-no-superuser-sqlserver.sh

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,24 @@
22
set -u
33

44
# Get container name and password from arguments
5-
SQL_SERVER_CONTAINER_NAME=$1
6-
SQL_SERVER_PASSWORD=$2
7-
MAX_RETRY_COUNT=$3
8-
RETRY_INTERVAL=$4
5+
SQL_SERVER_PASSWORD=$1
6+
MAX_RETRY_COUNT=$2
7+
RETRY_INTERVAL=$3
8+
# If set, use `sqlcmd` of the SQL Server docker container. If unset, use `sqlcmd` installed on the host.
9+
SQL_SERVER_CONTAINER_NAME=${4:-''}
910
COUNT=0
1011

11-
# Check if the `/opt/mssql-tools18/bin/sqlcmd` command exists or not.
12-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ls /opt/mssql-tools18/bin/sqlcmd
13-
if [[ $? -eq 0 ]]; then
14-
SQLCMD=/opt/mssql-tools18/bin/sqlcmd
12+
if [[ -n $SQL_SERVER_CONTAINER_NAME ]]; then
13+
# Check if the `/opt/mssql-tools18/bin/sqlcmd` command exists or not.
14+
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ls /opt/mssql-tools18/bin/sqlcmd
15+
if [[ $? -eq 0 ]]; then
16+
SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools18/bin/sqlcmd"
17+
else
18+
# If there is no `/opt/mssql-tools18/bin/sqlcmd` command, we use old command.
19+
SQLCMD="docker exec -t $SQL_SERVER_CONTAINER_NAME /opt/mssql-tools/bin/sqlcmd"
20+
fi
1521
else
16-
# If there is no `/opt/mssql-tools18/bin/sqlcmd` command, we use old command.
17-
SQLCMD=/opt/mssql-tools/bin/sqlcmd
22+
SQLCMD=sqlcmd
1823
fi
1924

2025
echo "INFO: Creating no superuser start."
@@ -30,7 +35,7 @@ do
3035

3136
echo "INFO: Retry count: ${COUNT}"
3237

33-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "SELECT 1"
38+
${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "SELECT 1"
3439

3540
if [[ $? -eq 0 ]]; then
3641
break
@@ -50,40 +55,40 @@ echo "INFO: sqlcmd command succeeded. Continue creating no superuser."
5055

5156
# Create login
5257
echo "INFO: Create login start"
53-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE LOGIN no_superuser WITH PASSWORD = 'no_superuser_password', DEFAULT_DATABASE = master , CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF"
58+
${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE LOGIN no_superuser WITH PASSWORD = 'no_superuser_password', DEFAULT_DATABASE = master , CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF"
5459
echo "INFO: Create login end"
5560

5661
# Create database
5762
echo "INFO: Create database start"
58-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE DATABASE test_db COLLATE Japanese_BIN2"
63+
${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d master -C -Q "CREATE DATABASE test_db COLLATE Japanese_BIN2"
5964
echo "INFO: Create database end"
6065

6166
# Create no_superuser
6267
echo "INFO: Create no_superuser start"
63-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "CREATE USER no_superuser FOR LOGIN no_superuser"
68+
${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "CREATE USER no_superuser FOR LOGIN no_superuser"
6469
echo "INFO: Create no_superuser end"
6570

6671
# Add roles
6772
echo "INFO: Add role db_ddladmin start"
68-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_ddladmin', @membername = 'no_superuser'"
73+
${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_ddladmin', @membername = 'no_superuser'"
6974
echo "INFO: Add role db_ddladmin end"
7075

7176
echo "INFO: Add role db_datawriter start"
72-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datawriter', @membername = 'no_superuser'"
77+
${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datawriter', @membername = 'no_superuser'"
7378
echo "INFO: Add role db_datawriter end"
7479

7580
echo "INFO: Add role db_datareader start"
76-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datareader', @membername = 'no_superuser'"
81+
${SQLCMD} -S localhost -U sa -P ${SQL_SERVER_PASSWORD} -d test_db -C -Q "EXEC sp_addrolemember @rolename = 'db_datareader', @membername = 'no_superuser'"
7782
echo "INFO: Add role db_datareader end"
7883

7984
# Check the collation of test_db (for debugging purposes)
8085
echo "INFO: Check collation start"
81-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT name, collation_name FROM sys.databases"
86+
${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT name, collation_name FROM sys.databases"
8287
echo "INFO: Check collation end"
8388

8489
# Check if no_superuser can access SQL Server (for debugging purposes)
8590
echo "INFO: SELECT @@version start"
86-
docker exec -t ${SQL_SERVER_CONTAINER_NAME} ${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT @@version"
91+
${SQLCMD} -S localhost -U no_superuser -P no_superuser_password -d test_db -C -Q "SELECT @@version"
8792
echo "INFO: SELECT @@version end"
8893

8994
echo "INFO: Creating no superuser succeeded."

integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitNullMetadataIntegrationTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ public void scan_ScanGivenForPreparedWhenCoordinatorStateAborted_ShouldRollback(
639639
selection_SelectionGivenForPreparedWhenCoordinatorStateNotExistAndExpired_ShouldAbortTransaction(
640640
Selection s) throws ExecutionException, CoordinatorException, TransactionException {
641641
// Arrange
642-
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS;
642+
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1;
643643
populatePreparedRecordWithNullMetadataAndCoordinatorStateRecord(
644644
storage, namespace1, TABLE_1, TransactionState.PREPARED, prepared_at, null);
645645
DistributedTransaction transaction = manager.begin();
@@ -1007,7 +1007,7 @@ public void scan_ScanGivenForDeletedWhenCoordinatorStateAborted_ShouldRollback()
10071007
selection_SelectionGivenForDeletedWhenCoordinatorStateNotExistAndExpired_ShouldAbortTransaction(
10081008
Selection s) throws ExecutionException, CoordinatorException, TransactionException {
10091009
// Arrange
1010-
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS;
1010+
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1;
10111011
populatePreparedRecordWithNullMetadataAndCoordinatorStateRecord(
10121012
storage, namespace1, TABLE_1, TransactionState.DELETED, prepared_at, null);
10131013
DistributedTransaction transaction = manager.begin();

integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitSpecificIntegrationTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ public void scan_ScanGivenForPreparedWhenCoordinatorStateAborted_ShouldRollback(
544544
Selection s, CommitType commitType)
545545
throws ExecutionException, CoordinatorException, TransactionException {
546546
// Arrange
547-
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS;
547+
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1;
548548
String ongoingTxId =
549549
populatePreparedRecordAndCoordinatorStateRecord(
550550
storage, namespace1, TABLE_1, TransactionState.PREPARED, prepared_at, null, commitType);
@@ -1015,7 +1015,7 @@ public void scan_ScanGivenForDeletedWhenCoordinatorStateAborted_ShouldRollback(
10151015
Selection s, CommitType commitType)
10161016
throws ExecutionException, CoordinatorException, TransactionException {
10171017
// Arrange
1018-
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS;
1018+
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1;
10191019
String ongoingTxId =
10201020
populatePreparedRecordAndCoordinatorStateRecord(
10211021
storage, namespace1, TABLE_1, TransactionState.DELETED, prepared_at, null, commitType);

integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/TwoPhaseConsensusCommitSpecificIntegrationTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public void scan_ScanGivenForPreparedWhenCoordinatorStateAborted_ShouldRollback(
419419
SelectionType selectionType)
420420
throws ExecutionException, TransactionException, CoordinatorException {
421421
// Arrange
422-
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS;
422+
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1;
423423
populatePreparedRecordAndCoordinatorStateRecordForStorage1(
424424
TransactionState.PREPARED, prepared_at, null);
425425

@@ -799,7 +799,7 @@ public void scan_ScanGivenForDeletedWhenCoordinatorStateAborted_ShouldRollback()
799799
SelectionType selectionType)
800800
throws ExecutionException, TransactionException, CoordinatorException {
801801
// Arrange
802-
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS;
802+
long prepared_at = System.currentTimeMillis() - RecoveryHandler.TRANSACTION_LIFETIME_MILLIS - 1;
803803
populatePreparedRecordAndCoordinatorStateRecordForStorage1(
804804
TransactionState.DELETED, prepared_at, null);
805805

0 commit comments

Comments
 (0)