[
https://issues.apache.org/jira/browse/PHOENIX-7939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Kyle Purtell updated PHOENIX-7939:
-----------------------------------------
Description:
{{UpgradeUtil.getSysTableSnapshotName(long, String)}} formats its snapshot id
suffix with {{SimpleDateFormat("yyyyMMddHHmmss")}}, which has the minimum
resolution of only one second. During Phoenix's {{upgradeSystemTables}} path
and especially under {{BackwardCompatibilityIT}}'s parameterized replay of
old-client upgrades, the same {{SYSTEM.LOG}} snapshot can be requested twice
inside the same second. The second request produces an identical snapshot id,
HBase's {{SnapshotManager.prepareToTakeSnapshot}} sees an in-flight snapshot
with the very same id, and rejects it with {{SnapshotCreationException:
"already running another snapshot on the same table"}}.
The proposed fix is ensure two concurrent or back-to-back snapshot requests in
the same upgrade process cannot collide with the same name.
> BackwardCompatibilityIT.testUpsertDeleteWithOldClient flakes with
> SnapshotCreationException
> -------------------------------------------------------------------------------------------
>
> Key: PHOENIX-7939
> URL: https://issues.apache.org/jira/browse/PHOENIX-7939
> Project: Phoenix
> Issue Type: Bug
> Components: test
> Reporter: Andrew Kyle Purtell
> Priority: Major
>
> {{UpgradeUtil.getSysTableSnapshotName(long, String)}} formats its snapshot id
> suffix with {{SimpleDateFormat("yyyyMMddHHmmss")}}, which has the minimum
> resolution of only one second. During Phoenix's {{upgradeSystemTables}} path
> and especially under {{BackwardCompatibilityIT}}'s parameterized replay of
> old-client upgrades, the same {{SYSTEM.LOG}} snapshot can be requested twice
> inside the same second. The second request produces an identical snapshot id,
> HBase's {{SnapshotManager.prepareToTakeSnapshot}} sees an in-flight snapshot
> with the very same id, and rejects it with {{SnapshotCreationException:
> "already running another snapshot on the same table"}}.
> The proposed fix is ensure two concurrent or back-to-back snapshot requests
> in the same upgrade process cannot collide with the same name.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)