You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2023/09/08 23:28:10 UTC
[GitHub] [hudi] nsivabalan opened a new pull request, #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
nsivabalan opened a new pull request, #9666:
URL: https://github.com/apache/hudi/pull/9666
…me window
### Change Logs
When time travel query overlaps with cleaner or archival window, we should explicitly fail the query. If not, we might end up serving partial/wrong results or empty rows.
### Impact
When time travel query overlaps with cleaner or archival window, we should explicitly fail the query. If not, we might end up serving partial/wrong results or empty rows.
### Risk level (write none, low medium or high below)
low
### Documentation Update
_Describe any necessary documentation update if there is any new feature, config, or user-facing change_
- _The config description must be updated if new configs are added or the default value of the configs are changed_
- _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
changes to the website._
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nsivabalan commented on a diff in pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #9666:
URL: https://github.com/apache/hudi/pull/9666#discussion_r1321801446
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -339,6 +343,31 @@ public static void validateTimestampAsOf(HoodieTableMetaClient metaClient, Strin
timestampAsOf, incompleteCommitTime));
}
}
+
+ // also timestamp as of cannot query cleaned up data.
+ Option<HoodieInstant> latestCleanOpt = metaClient.getActiveTimeline().getCleanerTimeline().filterCompletedInstants().lastInstant();
+ if (latestCleanOpt.isPresent()) {
+ // Ensure timestamp as of is > than the earliest commit to retain and
+ try {
+ HoodieCleanMetadata cleanMetadata = CleanerUtils.getCleanerMetadata(metaClient, latestCleanOpt.get());
+ String earliestCommitToRetain = cleanMetadata.getEarliestCommitToRetain();
+ if (!StringUtils.isNullOrEmpty(earliestCommitToRetain)) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(earliestCommitToRetain, LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Cleaner cleaned up the timestamp of interest. Please ensure sufficient commits are retained with cleaner "
+ + "for Timestamp as of query to work");
+ } else {
+ // when cleaner is based on file versions, we may not find value for earliestCommitToRetain. so, lets check for archival
+ Option<HoodieInstant> firstCompletedInstant = metaClient.getActiveTimeline().getWriteTimeline().filterCompletedInstants().firstInstant();
+ if (firstCompletedInstant.isPresent()) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(firstCompletedInstant.get().getTimestamp(), LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Please ensure sufficient commits are retained (uncleaned and un-archived) for timestamp as of query to work.");
Review Comment:
yes, we are ensuring that firstInstant <= timestampAsOf.
if not, we fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714532991
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9eb5b9774aff4779e33feac92a513a9543be9752 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764)
* 4a7a105d08389f525adfc8bc8fdabd3a449180d5 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714957487
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19825",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "5ac171d5a7e29a17ff86117900020a7419c36ba2",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19826",
"triggerID" : "5ac171d5a7e29a17ff86117900020a7419c36ba2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5ac171d5a7e29a17ff86117900020a7419c36ba2 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19826)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714789961
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4a7a105d08389f525adfc8bc8fdabd3a449180d5 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810)
* a415bd41b66ec698d891c7aab3b26cf3b857b996 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714838951
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19825",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "5ac171d5a7e29a17ff86117900020a7419c36ba2",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5ac171d5a7e29a17ff86117900020a7419c36ba2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4a7a105d08389f525adfc8bc8fdabd3a449180d5 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810)
* a415bd41b66ec698d891c7aab3b26cf3b857b996 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19825) Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819)
* 5ac171d5a7e29a17ff86117900020a7419c36ba2 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714833175
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19825",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 4a7a105d08389f525adfc8bc8fdabd3a449180d5 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810)
* a415bd41b66ec698d891c7aab3b26cf3b857b996 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19825)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codope merged pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "codope (via GitHub)" <gi...@apache.org>.
codope merged PR #9666:
URL: https://github.com/apache/hudi/pull/9666
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714669539
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4a7a105d08389f525adfc8bc8fdabd3a449180d5 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nsivabalan commented on a diff in pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #9666:
URL: https://github.com/apache/hudi/pull/9666#discussion_r1321803157
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -339,6 +343,31 @@ public static void validateTimestampAsOf(HoodieTableMetaClient metaClient, Strin
timestampAsOf, incompleteCommitTime));
}
}
+
+ // also timestamp as of cannot query cleaned up data.
+ Option<HoodieInstant> latestCleanOpt = metaClient.getActiveTimeline().getCleanerTimeline().filterCompletedInstants().lastInstant();
+ if (latestCleanOpt.isPresent()) {
+ // Ensure timestamp as of is > than the earliest commit to retain and
+ try {
+ HoodieCleanMetadata cleanMetadata = CleanerUtils.getCleanerMetadata(metaClient, latestCleanOpt.get());
+ String earliestCommitToRetain = cleanMetadata.getEarliestCommitToRetain();
+ if (!StringUtils.isNullOrEmpty(earliestCommitToRetain)) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(earliestCommitToRetain, LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Cleaner cleaned up the timestamp of interest. Please ensure sufficient commits are retained with cleaner "
+ + "for Timestamp as of query to work");
+ } else {
+ // when cleaner is based on file versions, we may not find value for earliestCommitToRetain. so, lets check for archival
+ Option<HoodieInstant> firstCompletedInstant = metaClient.getActiveTimeline().getWriteTimeline().filterCompletedInstants().firstInstant();
Review Comment:
sure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1712356002
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9eb5b9774aff4779e33feac92a513a9543be9752 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1712359070
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9eb5b9774aff4779e33feac92a513a9543be9752 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nsivabalan commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714811238
@hudi-bot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nsivabalan commented on a diff in pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #9666:
URL: https://github.com/apache/hudi/pull/9666#discussion_r1321801446
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -339,6 +343,31 @@ public static void validateTimestampAsOf(HoodieTableMetaClient metaClient, Strin
timestampAsOf, incompleteCommitTime));
}
}
+
+ // also timestamp as of cannot query cleaned up data.
+ Option<HoodieInstant> latestCleanOpt = metaClient.getActiveTimeline().getCleanerTimeline().filterCompletedInstants().lastInstant();
+ if (latestCleanOpt.isPresent()) {
+ // Ensure timestamp as of is > than the earliest commit to retain and
+ try {
+ HoodieCleanMetadata cleanMetadata = CleanerUtils.getCleanerMetadata(metaClient, latestCleanOpt.get());
+ String earliestCommitToRetain = cleanMetadata.getEarliestCommitToRetain();
+ if (!StringUtils.isNullOrEmpty(earliestCommitToRetain)) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(earliestCommitToRetain, LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Cleaner cleaned up the timestamp of interest. Please ensure sufficient commits are retained with cleaner "
+ + "for Timestamp as of query to work");
+ } else {
+ // when cleaner is based on file versions, we may not find value for earliestCommitToRetain. so, lets check for archival
+ Option<HoodieInstant> firstCompletedInstant = metaClient.getActiveTimeline().getWriteTimeline().filterCompletedInstants().firstInstant();
+ if (firstCompletedInstant.isPresent()) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(firstCompletedInstant.get().getTimestamp(), LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Please ensure sufficient commits are retained (uncleaned and un-archived) for timestamp as of query to work.");
Review Comment:
yes, we are ensuring that firstCompletedInstant <= timestampAsOf.
if not, we fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714745861
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4a7a105d08389f525adfc8bc8fdabd3a449180d5 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810)
* a415bd41b66ec698d891c7aab3b26cf3b857b996 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1712401455
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9eb5b9774aff4779e33feac92a513a9543be9752 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714474742
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9eb5b9774aff4779e33feac92a513a9543be9752 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764)
* 4a7a105d08389f525adfc8bc8fdabd3a449180d5 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] codope commented on a diff in pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #9666:
URL: https://github.com/apache/hudi/pull/9666#discussion_r1321787996
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -339,6 +343,31 @@ public static void validateTimestampAsOf(HoodieTableMetaClient metaClient, Strin
timestampAsOf, incompleteCommitTime));
}
}
+
+ // also timestamp as of cannot query cleaned up data.
+ Option<HoodieInstant> latestCleanOpt = metaClient.getActiveTimeline().getCleanerTimeline().filterCompletedInstants().lastInstant();
+ if (latestCleanOpt.isPresent()) {
+ // Ensure timestamp as of is > than the earliest commit to retain and
+ try {
+ HoodieCleanMetadata cleanMetadata = CleanerUtils.getCleanerMetadata(metaClient, latestCleanOpt.get());
+ String earliestCommitToRetain = cleanMetadata.getEarliestCommitToRetain();
+ if (!StringUtils.isNullOrEmpty(earliestCommitToRetain)) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(earliestCommitToRetain, LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Cleaner cleaned up the timestamp of interest. Please ensure sufficient commits are retained with cleaner "
+ + "for Timestamp as of query to work");
+ } else {
+ // when cleaner is based on file versions, we may not find value for earliestCommitToRetain. so, lets check for archival
+ Option<HoodieInstant> firstCompletedInstant = metaClient.getActiveTimeline().getWriteTimeline().filterCompletedInstants().firstInstant();
+ if (firstCompletedInstant.isPresent()) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(firstCompletedInstant.get().getTimestamp(), LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Please ensure sufficient commits are retained (uncleaned and un-archived) for timestamp as of query to work.");
Review Comment:
If the `firstCompletedInstant` is lesser than the input `timestampAsOf` then it's valid right? Or am I misunderstanding?
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -339,6 +343,31 @@ public static void validateTimestampAsOf(HoodieTableMetaClient metaClient, Strin
timestampAsOf, incompleteCommitTime));
}
}
+
+ // also timestamp as of cannot query cleaned up data.
+ Option<HoodieInstant> latestCleanOpt = metaClient.getActiveTimeline().getCleanerTimeline().filterCompletedInstants().lastInstant();
+ if (latestCleanOpt.isPresent()) {
+ // Ensure timestamp as of is > than the earliest commit to retain and
+ try {
+ HoodieCleanMetadata cleanMetadata = CleanerUtils.getCleanerMetadata(metaClient, latestCleanOpt.get());
+ String earliestCommitToRetain = cleanMetadata.getEarliestCommitToRetain();
+ if (!StringUtils.isNullOrEmpty(earliestCommitToRetain)) {
+ ValidationUtils.checkArgument(HoodieTimeline.compareTimestamps(earliestCommitToRetain, LESSER_THAN_OR_EQUALS, timestampAsOf),
+ "Cleaner cleaned up the timestamp of interest. Please ensure sufficient commits are retained with cleaner "
+ + "for Timestamp as of query to work");
+ } else {
+ // when cleaner is based on file versions, we may not find value for earliestCommitToRetain. so, lets check for archival
+ Option<HoodieInstant> firstCompletedInstant = metaClient.getActiveTimeline().getWriteTimeline().filterCompletedInstants().firstInstant();
Review Comment:
Can we fix the comment? Looks like it is parsing archived timeline but actually it isn't.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] lokeshj1703 commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "lokeshj1703 (via GitHub)" <gi...@apache.org>.
lokeshj1703 commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1715072323
<img width="976" alt="image" src="https://github.com/apache/hudi/assets/9255455/53e17d90-6032-4e33-a5ab-41b6063a6c72">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #9666: [HUDI-6834] Fixing time travel queries when overlaps with cleaner and archival time window
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9666:
URL: https://github.com/apache/hudi/pull/9666#issuecomment-1714870656
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19764",
"triggerID" : "9eb5b9774aff4779e33feac92a513a9543be9752",
"triggerType" : "PUSH"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"triggerType" : "PUSH"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19825",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "4a7a105d08389f525adfc8bc8fdabd3a449180d5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19810",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "a415bd41b66ec698d891c7aab3b26cf3b857b996",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819",
"triggerID" : "1714811238",
"triggerType" : "MANUAL"
}, {
"hash" : "5ac171d5a7e29a17ff86117900020a7419c36ba2",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19826",
"triggerID" : "5ac171d5a7e29a17ff86117900020a7419c36ba2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a415bd41b66ec698d891c7aab3b26cf3b857b996 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19825) Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19819)
* 5ac171d5a7e29a17ff86117900020a7419c36ba2 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19826)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org