[
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"}}. (was: {{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.
I need to check the status of another JIRA that might duplicate this or
partially duplicate this, but am filing this as at least a placeholder.)
> BackwardCompatibilityIT.testUpsertDeleteWithOldClient flakes with
> SnapshotCreationException
> -------------------------------------------------------------------------------------------
>
> Key: PHOENIX-7939
> URL: https://issues.apache.org/jira/browse/PHOENIX-7939
> Project: Phoenix
> Issue Type: Sub-task
> 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"}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)