Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARCTIC-930][AMS] Snapshot expire service should not expire snapshot with the lastest checkpoint id #1178

Merged
merged 7 commits into from
Mar 6, 2023

Conversation

wangtaohz
Copy link
Contributor

Why are the changes needed?

To fix #930

Brief change log

  • the last snapshot with flink.max-committed-checkpoint-id should not be expired

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduces a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@github-actions github-actions bot added module:ams-server Ams server module module:ams-dashboard Ams dashboard module labels Mar 1, 2023
@wangtaohz wangtaohz requested a review from YesOrNo828 March 1, 2023 09:47
@wangtaohz wangtaohz changed the title [ARCTIC-930][AMS] Snapshot expire service should expire snapshot with the lastest checkpoint id [ARCTIC-930][AMS] Snapshot expire service should not expire snapshot with the lastest checkpoint id Mar 1, 2023
Copy link
Contributor

@YesOrNo828 YesOrNo828 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wangtaohz Thanks for your contribution. I left some comments.

wangtaohz and others added 2 commits March 1, 2023 20:54
2.refactor method fetchLatestFlinkCommittedSnapshotTime
change to hiveLocations
remove baseTable == null, changeTable == null
change to baseExcludePaths
add some comment for fetchLatestFlinkCommittedSnapshotTime
import a static variable for flink.max-committed-checkpoint-id
@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Patch coverage: 67.74% and project coverage change: -1.79 ⚠️

Comparison is base (d5db96a) 27.86% compared to head (d971b80) 26.07%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1178      +/-   ##
============================================
- Coverage     27.86%   26.07%   -1.79%     
+ Complexity     4929     3787    -1142     
============================================
  Files           657      486     -171     
  Lines         69172    52944   -16228     
  Branches       7978     6128    -1850     
============================================
- Hits          19275    13806    -5469     
+ Misses        47986    37745   -10241     
+ Partials       1911     1393     -518     
Flag Coverage Δ
ams 26.07% <67.74%> (?)
core ?
trino ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ms/server/service/impl/SupportHiveSyncService.java 66.91% <22.22%> (+0.48%) ⬆️
...ic/ams/server/service/impl/TableExpireService.java 63.35% <75.47%> (+30.81%) ⬆️
...tease/arctic/trino/ArcticHadoopAuthentication.java
...lyst/rule/PreprocessArcticTableInsertionRule.scala
...or/pulsar/source/reader/message/PulsarMessage.java
...ic/spark/sql/catalyst/rule/OptimizeWriteRule.scala
.../arctic/spark/sql/parser/ArcticSparkSqlParser.java
...ce/enumerator/cursor/stop/MessageIdStopCursor.java
...rce/log/pulsar/LogRecordPulsarWithRetractInfo.java
...rg/apache/spark/sql/arctic/AnalysisException.scala
... and 164 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@zhoujinsong zhoujinsong merged commit fdac57e into apache:master Mar 6, 2023
@wangtaohz wangtaohz deleted the fix-930 branch March 6, 2023 02:51
wangtaohz added a commit that referenced this pull request May 16, 2023
… not expire snapshot with the lastest checkpoint id (#1178)

* the last snapshot with flink.max-committed-checkpoint-id should not be expired

* 1.refactor TableExpireServicec for unit test
2.refactor method fetchLatestFlinkCommittedSnapshotTime

* remove the use of traceId
change to hiveLocations
remove baseTable == null, changeTable == null
change to baseExcludePaths
add some comment for fetchLatestFlinkCommittedSnapshotTime
import a static variable for flink.max-committed-checkpoint-id

* add some comment for optimizer
zhoujinsong pushed a commit that referenced this pull request May 31, 2023
…with the lastest checkpoint id (#1178)

* the last snapshot with flink.max-committed-checkpoint-id should not be expired

* 1.refactor TableExpireServicec for unit test
2.refactor method fetchLatestFlinkCommittedSnapshotTime

* remove the use of traceId
change to hiveLocations
remove baseTable == null, changeTable == null
change to baseExcludePaths
add some comment for fetchLatestFlinkCommittedSnapshotTime
import a static variable for flink.max-committed-checkpoint-id

* add some comment for optimizer
ShawHee pushed a commit to ShawHee/arctic that referenced this pull request Dec 29, 2023
…with the lastest checkpoint id (apache#1178)

* the last snapshot with flink.max-committed-checkpoint-id should not be expired

* 1.refactor TableExpireServicec for unit test
2.refactor method fetchLatestFlinkCommittedSnapshotTime

* remove the use of traceId
change to hiveLocations
remove baseTable == null, changeTable == null
change to baseExcludePaths
add some comment for fetchLatestFlinkCommittedSnapshotTime
import a static variable for flink.max-committed-checkpoint-id

* add some comment for optimizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-dashboard Ams dashboard module module:ams-server Ams server module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Flink cannot restore from old state if the snapshot with max commited ckp id info lost
3 participants