[GitHub] incubator-rocketmq pull request #39: [ROCKETMQ-45]Delete hanged consume queu...
Github user lizhanhui closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/39 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq pull request #39: [ROCKETMQ-45]Delete hanged consume queu...
Github user lizhanhui commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/39#discussion_r97212223 --- Diff: store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java --- @@ -397,11 +397,21 @@ public int deleteExpiredFileByOffset(long offset, int unitSize) { log.info("physic min offset " + offset + ", logics in current mappedFile max offset " + maxOffsetInLogicQueue + ", delete it"); } +} else if (!mappedFile.isAvailable()) { // Handle hanged file. --- End diff -- > Another thing, can we just mark destroy=true in else if section and next if will destroy it ? Yep, I think we can do this. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq pull request #39: [ROCKETMQ-45]Delete hanged consume queu...
Github user zhouxinyu commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/39#discussion_r95979009 --- Diff: store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java --- @@ -397,11 +397,21 @@ public int deleteExpiredFileByOffset(long offset, int unitSize) { log.info("physic min offset " + offset + ", logics in current mappedFile max offset " + maxOffsetInLogicQueue + ", delete it"); } +} else if (!mappedFile.isAvailable()) { // Handle hanged file. --- End diff -- Another thing, can we just mark `destroy=true` in `else if` section and next `if` will destroy it ? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq pull request #39: [ROCKETMQ-45]Delete hanged consume queu...
Github user zhouxinyu commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/39#discussion_r95964644 --- Diff: store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java --- @@ -397,11 +397,21 @@ public int deleteExpiredFileByOffset(long offset, int unitSize) { log.info("physic min offset " + offset + ", logics in current mappedFile max offset " + maxOffsetInLogicQueue + ", delete it"); } +} else if (!mappedFile.isAvailable()) { // Handle hanged file. --- End diff -- When MappedFile has been `shutdown`, no more new holder appear, so the `RefCount` will to be 0 soon, so I think maybe it's more graceful :).. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq pull request #39: [ROCKETMQ-45]Delete hanged consume queu...
Github user lizhanhui commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/39#discussion_r95959190 --- Diff: store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java --- @@ -397,11 +397,21 @@ public int deleteExpiredFileByOffset(long offset, int unitSize) { log.info("physic min offset " + offset + ", logics in current mappedFile max offset " + maxOffsetInLogicQueue + ", delete it"); } +} else if (!mappedFile.isAvailable()) { // Handle hanged file. --- End diff -- Why? I do not see the rationale of awaiting `RefCount` to be 0 after commit log has been deleted after `intervalForcibly` period of time. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq pull request #39: [ROCKETMQ-45]Delete hanged consume queu...
Github user zhouxinyu commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/39#discussion_r95955059 --- Diff: store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java --- @@ -397,11 +397,21 @@ public int deleteExpiredFileByOffset(long offset, int unitSize) { log.info("physic min offset " + offset + ", logics in current mappedFile max offset " + maxOffsetInLogicQueue + ", delete it"); } +} else if (!mappedFile.isAvailable()) { // Handle hanged file. --- End diff -- I think it's better to add `RefCount` to the if condition. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-rocketmq pull request #39: [ROCKETMQ-45]Delete hanged consume queu...
GitHub user lizhanhui opened a pull request: https://github.com/apache/incubator-rocketmq/pull/39 [ROCKETMQ-45]Delete hanged consume queue files You can merge this pull request into a Git repository by running: $ git pull https://github.com/lizhanhui/incubator-rocketmq ROCKETMQ-45 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/39.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #39 commit 4bb113ce87c6ff52fc9af7ddf2a389e2a45853b6 Author: Zhanhui Li Date: 2017-01-12T07:02:26Z Delete hanged consume queue files --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---