You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/02/25 05:50:44 UTC
[GitHub] [flink] Jiayi-Liao opened a new pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Jiayi-Liao opened a new pull request #15016:
URL: https://github.com/apache/flink/pull/15016
## What is the purpose of the change
Solve the memory leak in #TtlMapState and #TtlListState with #FsStateBackend and incremental cleanup feature.
## Brief change log
Changes in #TtlMapState and #TtlListState
* In #getUnexpiredOrNull method, return null if all the elements are expired
## Verifying this change
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 02bd50240636971f1b38f6ca0e2940200de2453a Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742)
* dd64013d8919ad2d5790a0184d952c7123be7da3 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r602880016
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -471,6 +473,26 @@ public void testRestoreTtlAndRegisterNonTtlStateCompatFailure() throws Exception
sbetc.createState(ctx().createStateDescriptor(), "");
}
+ @Test
+ public void testIncrementalCleanupWholeState() throws Exception {
+ assumeTrue(incrementalCleanupSupported());
+ initTest(getConfBuilder(TTL).cleanupIncrementally(5, true).build());
+ timeProvider.time = 0;
+ // create enough keys to trigger incremental rehash
+ updateKeys(0, INC_CLEANUP_ALL_KEYS, ctx().updateEmpty);
+ // expire all state
+ timeProvider.time = 120;
+ // trigger state clean up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ }
+ // check all state cleaned up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ assertTrue("Original state should be cleared", ctx().isOriginalNull());
Review comment:
Here we're testing the existence of the state of specific key and namespace, right? so why not rename the method to `isOriginalExisting()`, which can also keep the same style with another method `isOriginalEmptyValue()`.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r603040907
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -471,6 +473,26 @@ public void testRestoreTtlAndRegisterNonTtlStateCompatFailure() throws Exception
sbetc.createState(ctx().createStateDescriptor(), "");
}
+ @Test
+ public void testIncrementalCleanupWholeState() throws Exception {
+ assumeTrue(incrementalCleanupSupported());
+ initTest(getConfBuilder(TTL).cleanupIncrementally(5, true).build());
+ timeProvider.time = 0;
+ // create enough keys to trigger incremental rehash
+ updateKeys(0, INC_CLEANUP_ALL_KEYS, ctx().updateEmpty);
+ // expire all state
+ timeProvider.time = 120;
+ // trigger state clean up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ }
+ // check all state cleaned up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ assertTrue("Original state should be cleared", ctx().isOriginalNull());
Review comment:
@Myasuka Oh.. I see what you mean here. Very good point. :)
I've improved the codes based on your comments.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "567defb6c3ea18ae1fc13c80cd1e7247d882bfa5",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15811",
"triggerID" : "567defb6c3ea18ae1fc13c80cd1e7247d882bfa5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 567defb6c3ea18ae1fc13c80cd1e7247d882bfa5 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15811)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5d95fe96d132b396f3d59f2c102d63a68ccd0d73 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5d95fe96d132b396f3d59f2c102d63a68ccd0d73 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646)
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785633040
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 567defb6c3ea18ae1fc13c80cd1e7247d882bfa5 (Sat Aug 28 11:11:17 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-809872620
We need to get a green build to commit the change, let me trigger another pre-commit run, will merge it once the build passes.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* dd64013d8919ad2d5790a0184d952c7123be7da3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-809872667
@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 02bd50240636971f1b38f6ca0e2940200de2453a Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742)
* dd64013d8919ad2d5790a0184d952c7123be7da3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Myasuka commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Myasuka commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r603034801
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -471,6 +473,26 @@ public void testRestoreTtlAndRegisterNonTtlStateCompatFailure() throws Exception
sbetc.createState(ctx().createStateDescriptor(), "");
}
+ @Test
+ public void testIncrementalCleanupWholeState() throws Exception {
+ assumeTrue(incrementalCleanupSupported());
+ initTest(getConfBuilder(TTL).cleanupIncrementally(5, true).build());
+ timeProvider.time = 0;
+ // create enough keys to trigger incremental rehash
+ updateKeys(0, INC_CLEANUP_ALL_KEYS, ctx().updateEmpty);
+ // expire all state
+ timeProvider.time = 120;
+ // trigger state clean up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ }
+ // check all state cleaned up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ assertTrue("Original state should be cleared", ctx().isOriginalNull());
Review comment:
My original point is that we could avoid to introduce those `isValueOfCurrentKeyNull` related methods by just introducing one single `isCurrentStateTableNull` method within `TtlStateTestBase.java` (no matter what name it is).
FLINK-21413 is about to fix a performance problem to avoid many unnecessary empty hash map and state entry, instead of incorrect query result. This new added test should only targets for heap-based keyed state backend and we can safely cast to `AbstractHeapState` here.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785633040
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 02bd50240636971f1b38f6ca0e2940200de2453a (Thu Feb 25 05:53:12 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785653274
@carp84 It took me some time to dig how to test this change, but unfortunately there may not be an easy way to achieve this.
Take the `TtlListState` as an example, in `TtlStateTestBase`, Flink uses `TtlStateTestContextBase.isOriginalEmptyValue()` to test whether the state is cleared, which is `Objects.equals(emptyValue, getOriginal());` in TtlListState's testing. To test my change, I need to verify the result of `AbstractHeapAppendingState.getInternal()`, but unit testing uses `MockInternalKvState.getInternal()`, which never returns null in `TtlListState`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-810388729
I guess something is wrong with the machine running the azure build, and re-trigger the test against last build will always run on the same machine, so I've merged the commits, rebased the latest master branch, and force-pushed to trigger a new one. Let's see how it goes this time.
> 2021-03-30T04:37:46.3354934Z Mar 30 04:37:45 sed: couldn't open temporary file /opt/flink/conf/sedMH11PH: Read-only file system
> 2021-03-30T04:37:46.3355705Z Mar 30 04:37:45 sed: couldn't open temporary file /opt/flink/conf/sed3FBMoH: Read-only file system
> 2021-03-30T04:37:46.3356478Z Mar 30 04:37:45 /docker-entrypoint.sh: line 73: /opt/flink/conf/flink-conf.yaml: Read-only file system
> 2021-03-30T04:37:46.3357550Z Mar 30 04:37:45 sed: couldn't open temporary file /opt/flink/conf/sedmsw7OJ: Read-only file system
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "567defb6c3ea18ae1fc13c80cd1e7247d882bfa5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15811",
"triggerID" : "567defb6c3ea18ae1fc13c80cd1e7247d882bfa5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743)
* 567defb6c3ea18ae1fc13c80cd1e7247d882bfa5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15811)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-801845613
> @Jiayi-Liao please check [e840893](https://github.com/apache/flink/commit/e84089332fef495e70324c67f9d9a7297c927065) in my [private branch](https://github.com/carp84/flink/tree/flink-21413) about adding the unit test (I've confirmed the added case would fail w/o the fix here). I'd also suggest to refine the fix in the way of [256c160](https://github.com/apache/flink/commit/256c16072e50a569e824cf79115f80234d833c31). Please let me know your thoughts.
Your implementation looks good to me, I tried to verify my logic in #TtlStateTestContextBase#isOriginalEmptyValue before, which makes it hard to implement.
Thanks for the help. I've refined my commit and cherry-pick your commit of unit testing here. Could you take another look? @carp84
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785653274
@carp84 It took me some time to dig how to test this change, but unfortunately there may not be an easy way to achieve this.
Take the `TtlListState` as an example, in `TtlStateTestBase`, Flink uses `TtlStateTestContextBase.isOriginalEmptyValue()` to test whether the state is cleared, which is `Objects.equals(emptyValue, getOriginal());` in TtlListState's testing. To test my change, I need to verify the result of `stateTable.get(currentNamespace);`, but unit testing uses `MockInternalKvState.getInternal()` which uses `computeIfAbsent(currentNamespace, n -> emptyValue.get())` and never returns null in `TtlListState`.
If we want to test the change, we might need to change the `emptyValue` in `MockInternalListState`、`MockInternalMapState` and related `TtlStateTestContextBase`, which may affect a lot of tests.
Do you have any better idea about this ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* dd64013d8919ad2d5790a0184d952c7123be7da3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963)
* cf3c223658f37cc838409b690e2e1bf93c04f207 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-809035046
@carp84 @Myasuka Sorry for the late reply(pretty busy these days). I've improved the codes based on your comments, please take another look, thanks!
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 closed pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 closed pull request #15016:
URL: https://github.com/apache/flink/pull/15016
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 02bd50240636971f1b38f6ca0e2940200de2453a Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] StephanEwen commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
StephanEwen commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r598899522
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlListState.java
##########
@@ -103,6 +103,11 @@ public void add(T value) throws Exception {
@Nullable
@Override
public List<TtlValue<T>> getUnexpiredOrNull(@Nonnull List<TtlValue<T>> ttlValues) {
+ // the update operation will clear the whole state if the list becomes empty after init
+ if (ttlValues.isEmpty()) {
+ return ttlValues;
Review comment:
Can this ever happen here? Are we wrapping the `UserFacingListState` which maps `null` to an empty list, or are empty lists never possible?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r602882247
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlListState.java
##########
@@ -103,6 +103,11 @@ public void add(T value) throws Exception {
@Nullable
@Override
public List<TtlValue<T>> getUnexpiredOrNull(@Nonnull List<TtlValue<T>> ttlValues) {
+ // the update operation will clear the whole state if the list becomes empty after init
+ if (ttlValues.isEmpty()) {
+ return ttlValues;
Review comment:
This could happen before this change(after the elements are all expired). So... if a job restores from a previous Flink version without this change, it may still happen.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] StephanEwen commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
StephanEwen commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-803920047
To make a review here, I would need a bit more context about this problem. @Jiayi-Liao if you can give me a bit of context for you assumptions on this fix, I can do a review here.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cf3c223658f37cc838409b690e2e1bf93c04f207 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5d95fe96d132b396f3d59f2c102d63a68ccd0d73 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646)
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-803950932
> To make a review here, I would need a bit more context about this problem. @Jiayi-Liao if you can give me a bit of context for you assumptions on this fix, I can do a review here.
There is a memory leak issue in the incremental cleanup of #TtlMapState and #TtlListState in FsStateBackend. The #TtlIncrementalCleanup expires the state from #StateTable when #getUnexpiredOrNull(ttlValue) returns null, but #TtlMapState and #TtlListState never return null in the method, which means the #TtlMapState and #TtlListState will never be removed from #StateTable. We met the issue when we're trying to process a stream of new devices and the range of new devices is unbounded.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785653274
@carp84 It took me some time to dig how to test this change, but unfortunately there may not be an easy way to achieve this.
Take the `TtlListState` as an example, in `TtlStateTestBase`, Flink uses `TtlStateTestContextBase.isOriginalEmptyValue()` to test whether the state is cleared, which is `Objects.equals(emptyValue, getOriginal());` in TtlListState's testing. To test my change, I need to verify the result of `AbstractHeapAppendingState.getInternal()`, but unit testing uses `MockInternalKvState.getInternal()` in `getOriginal()`, which never returns null in `TtlListState`.
To test the change, we might need to change the `emptyValue` in `MockInternalListState`、`MockInternalMapState` and related `TtlStateTestContextBase`, which may affect a lot of tests.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r598873871
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -471,6 +473,26 @@ public void testRestoreTtlAndRegisterNonTtlStateCompatFailure() throws Exception
sbetc.createState(ctx().createStateDescriptor(), "");
}
+ @Test
+ public void testIncrementalCleanupWholeState() throws Exception {
+ assumeTrue(incrementalCleanupSupported());
+ initTest(getConfBuilder(TTL).cleanupIncrementally(5, true).build());
+ timeProvider.time = 0;
+ // create enough keys to trigger incremental rehash
+ updateKeys(0, INC_CLEANUP_ALL_KEYS, ctx().updateEmpty);
+ // expire all state
+ timeProvider.time = 120;
+ // trigger state clean up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ }
+ // check all state cleaned up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ assertTrue("Original state should be cleared", ctx().isOriginalNull());
Review comment:
I agree it is somewhat over-designed here but the original thought is to try not to fail the test if `assumeTrue(incrementalCleanupSupported())` returns `true` for RocksDB backend in the future.
The suggested way works but the name `isCurrentStateTableNull` is misleading... It's "the state of the mapping for the composite of active key and given namespace" (referring to `StateTable#get(N namespace)`) that should be null, rather than the current state table. `isOriginalCleared` may be a better name.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cf3c223658f37cc838409b690e2e1bf93c04f207 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641)
* 5d95fe96d132b396f3d59f2c102d63a68ccd0d73 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Myasuka commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Myasuka commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r603034801
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -471,6 +473,26 @@ public void testRestoreTtlAndRegisterNonTtlStateCompatFailure() throws Exception
sbetc.createState(ctx().createStateDescriptor(), "");
}
+ @Test
+ public void testIncrementalCleanupWholeState() throws Exception {
+ assumeTrue(incrementalCleanupSupported());
+ initTest(getConfBuilder(TTL).cleanupIncrementally(5, true).build());
+ timeProvider.time = 0;
+ // create enough keys to trigger incremental rehash
+ updateKeys(0, INC_CLEANUP_ALL_KEYS, ctx().updateEmpty);
+ // expire all state
+ timeProvider.time = 120;
+ // trigger state clean up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ }
+ // check all state cleaned up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ assertTrue("Original state should be cleared", ctx().isOriginalNull());
Review comment:
My original point is that we could avoid to introduce those `isValueOfCurrentKeyNull` related methods by just introduce one single `isCurrentStateTableNull` method within `TtlStateTestBase.java` (no matter what name it is).
FLINK-21413 is about to fix a performance problem to avoid many unnecessary empty hash map and state entry, instead of incorrect query result. This new added test should only targets for heap-based keyed state backend and we can safely cast to `AbstractHeapState` here.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Myasuka commented on a change in pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Myasuka commented on a change in pull request #15016:
URL: https://github.com/apache/flink/pull/15016#discussion_r598517449
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestContextBase.java
##########
@@ -60,4 +67,19 @@ public String getName() {
public String toString() {
return this.getClass().getSimpleName();
}
+
+ public void setCurrentNamespace(Object currentNamespace) {
Review comment:
The same here, we should use `String` as current name space type.
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestContextBase.java
##########
@@ -37,6 +39,7 @@
GV getUpdateExpired;
public GV emptyValue = null;
+ public Object currentNamespace = VoidNamespace.INSTANCE;
Review comment:
Since `InternalKvState` already has a fixed type of `String` as namespace in `TtlStateTestContextBase` definition, we should change `currentNameSpace` to `String` type.
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlMapState.java
##########
@@ -134,6 +134,10 @@ public boolean isEmpty() throws Exception {
@Nullable
@Override
public Map<UK, TtlValue<UV>> getUnexpiredOrNull(@Nonnull Map<UK, TtlValue<UV>> ttlValue) {
+ // the remove operation will clear the whole state if the list becomes empty after init
Review comment:
```suggestion
// the remove operation will clear the whole state if the map becomes empty after init
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -471,6 +473,26 @@ public void testRestoreTtlAndRegisterNonTtlStateCompatFailure() throws Exception
sbetc.createState(ctx().createStateDescriptor(), "");
}
+ @Test
+ public void testIncrementalCleanupWholeState() throws Exception {
+ assumeTrue(incrementalCleanupSupported());
+ initTest(getConfBuilder(TTL).cleanupIncrementally(5, true).build());
+ timeProvider.time = 0;
+ // create enough keys to trigger incremental rehash
+ updateKeys(0, INC_CLEANUP_ALL_KEYS, ctx().updateEmpty);
+ // expire all state
+ timeProvider.time = 120;
+ // trigger state clean up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ }
+ // check all state cleaned up
+ for (int i = 0; i < INC_CLEANUP_ALL_KEYS; i++) {
+ sbetc.setCurrentKey(Integer.toString(i));
+ assertTrue("Original state should be cleared", ctx().isOriginalNull());
Review comment:
I think the kernel logic is to verify that current `StateTable` at `currentNamespace` is null and current logic seems a bit strange as its name `is original null` hided what we want.
I prefer to change this line to
~~~java
assertTrue("Original state table should be cleared", isCurrentStateTableNull());
~~~
And we could also adding method below:
~~~java
@SuppressWarnings({"rawtypes", "unchecked"})
private boolean isCurrentStateTableNull() {
InternalKvState<?, String, ?> original = ((AbstractTtlDecorator<InternalKvState<?, String, ?>>) ctx.ttlState).original;
Preconditions.checkState(original instanceof AbstractHeapState);
return ((AbstractHeapState) original).getStateTable().get(ctx.currentNamespace) == null;
}
~~~
By doing so, we could remove those strange `isValueOfCurrentKeyNull` and `isOriginalNull` methods.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-790816666
Sorry for the late response @Jiayi-Liao that I'm a little bit overloaded these days and may need some more time to get back, will ping back once ready.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-810070242
@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] carp84 commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
carp84 commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-801167382
@Jiayi-Liao please check e840893 in my [private branch](https://github.com/carp84/flink/tree/flink-21413) about adding the unit test (I've confirmed the added case would fail w/o the fix here). I'd also suggest to refine the fix in the way of 256c160. Please let me know your thoughts.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-809859267
The error of CI should be unrelated.
```
Mar 29 07:53:23 Error: Could not find or load main class org.apache.flink.kubernetes.entrypoint.KubernetesSessionClusterEntrypoint
Mar 29 07:53:41 [FAIL] 'Run kubernetes session test (default input)' failed after 1 minutes and 59 seconds! Test exited with exit code 1
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cf3c223658f37cc838409b690e2e1bf93c04f207 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641)
* 5d95fe96d132b396f3d59f2c102d63a68ccd0d73 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
}, {
"hash" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14963",
"triggerID" : "dd64013d8919ad2d5790a0184d952c7123be7da3",
"triggerType" : "PUSH"
}, {
"hash" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15641",
"triggerID" : "cf3c223658f37cc838409b690e2e1bf93c04f207",
"triggerType" : "PUSH"
}, {
"hash" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15646",
"triggerID" : "5d95fe96d132b396f3d59f2c102d63a68ccd0d73",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"triggerType" : "PUSH"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653",
"triggerID" : "809872667",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743",
"triggerID" : "810070242",
"triggerType" : "MANUAL"
}, {
"hash" : "567defb6c3ea18ae1fc13c80cd1e7247d882bfa5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "567defb6c3ea18ae1fc13c80cd1e7247d882bfa5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4862f8a8e8dab12ec9c0d71d8a31152cb212ebc Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15653) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15777) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=15743)
* 567defb6c3ea18ae1fc13c80cd1e7247d882bfa5 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Jiayi-Liao edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
Jiayi-Liao edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785653274
@carp84 It took me some time to dig how to test this change, but unfortunately there may not be an easy way to achieve this.
Take the `TtlListState` as an example, in `TtlStateTestBase`, Flink uses `TtlStateTestContextBase.isOriginalEmptyValue()` to test whether the state is cleared, which is `Objects.equals(emptyValue, getOriginal());` in TtlListState's testing. To test my change, I need to verify the result of `stateTable.get(currentNamespace);`, but unit testing uses `MockInternalKvState.getInternal()` which uses `computeIfAbsent(currentNamespace, n -> emptyValue.get())` and never returns null in `TtlListState`.
If we want to test the change, we might need to change the `emptyValue` in `MockInternalListState`、`MockInternalMapState` and related `TtlStateTestContextBase`, which may affect a lot of tests.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 02bd50240636971f1b38f6ca0e2940200de2453a UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #15016: [FLINK-21413][state] Clean TtlMapState and TtlListState after all elements are expired
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15016:
URL: https://github.com/apache/flink/pull/15016#issuecomment-785640058
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742",
"triggerID" : "02bd50240636971f1b38f6ca0e2940200de2453a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 02bd50240636971f1b38f6ca0e2940200de2453a Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13742)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org