You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2021/07/23 06:44:32 UTC
[GitHub] [incubator-inlong] TszKitLo40 opened a new pull request #586: [INLONG-788]Fix Go SDK Remote Cache Bug
TszKitLo40 opened a new pull request #586:
URL: https://github.com/apache/incubator-inlong/pull/586
Fixes Jira Issue ID:
https://issues.apache.org/jira/browse/INLONG-788
### Motivation
*Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
### Modifications
*Describe the modifications you've done.*
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (10MB)*
- *Extended integration test for recovery after broker failure*
### Documentation
- Does this pull request introduce a new feature? (yes / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] charlely commented on a change in pull request #586: [INLONG-788]Fix Go SDK Remote Cache Bug
Posted by GitBox <gi...@apache.org>.
charlely commented on a change in pull request #586:
URL: https://github.com/apache/incubator-inlong/pull/586#discussion_r675342041
##########
File path: tubemq-client-twins/tubemq-client-go/remote/remote.go
##########
@@ -449,14 +445,20 @@ func (r *RmtDataCache) ReleasePartition(checkDelay bool, filterConsume bool, con
}
func (r *RmtDataCache) removeFromIndexPartitions(partitionKey string) {
- pos := 0
+ pos := -1
for i, p := range r.indexPartitions {
if p == partitionKey {
pos = i
break
}
}
- r.indexPartitions = append(r.indexPartitions[:pos], r.indexPartitions[pos+1:]...)
+ if len(r.indexPartitions) == 1 && pos == 0 {
+ r.indexPartitions = []string{}
+ return
+ }
+ if pos >= 0 {
+ r.indexPartitions = append(r.indexPartitions[:pos], r.indexPartitions[pos+1:]...)
Review comment:
Need check pos is Last.
if len(r.indexPartitions) == 1 && pos == 0 {
r.indexPartitions = nil // Because always use append to add item.
}
if pos >= 0 {
....
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] gosonzhang merged pull request #586: [INLONG-788]Fix Go SDK Remote Cache Bug
Posted by GitBox <gi...@apache.org>.
gosonzhang merged pull request #586:
URL: https://github.com/apache/incubator-inlong/pull/586
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] TszKitLo40 commented on pull request #586: [INLONG-788]Fix Go SDK Remote Cache Bug
Posted by GitBox <gi...@apache.org>.
TszKitLo40 commented on pull request #586:
URL: https://github.com/apache/incubator-inlong/pull/586#issuecomment-885435271
@gosonzhang @charlely PTAL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] codecov-commenter commented on pull request #586: [INLONG-788]Fix Go SDK Remote Cache Bug
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #586:
URL: https://github.com/apache/incubator-inlong/pull/586#issuecomment-885436267
# [Codecov](https://codecov.io/gh/apache/incubator-inlong/pull/586?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#586](https://codecov.io/gh/apache/incubator-inlong/pull/586?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (69c29fb) into [INLONG-25](https://codecov.io/gh/apache/incubator-inlong/commit/f711a689bd33047bbf7cd28e45421896ce8797cc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f711a68) will **increase** coverage by `0.02%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-inlong/pull/586/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-inlong/pull/586?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## INLONG-25 #586 +/- ##
==============================================
+ Coverage 7.48% 7.51% +0.02%
Complexity 479 479
==============================================
Files 267 267
Lines 29500 29500
Branches 4843 4843
==============================================
+ Hits 2209 2216 +7
+ Misses 26816 26810 -6
+ Partials 475 474 -1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-inlong/pull/586?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../java/org/apache/flume/sink/tubemq/TubemqSink.java](https://codecov.io/gh/apache/incubator-inlong/pull/586/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dHViZW1xLWNvbm5lY3RvcnMvdHViZW1xLWNvbm5lY3Rvci1mbHVtZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZmx1bWUvc2luay90dWJlbXEvVHViZW1xU2luay5qYXZh) | `55.42% <0.00%> (+4.00%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-inlong/pull/586?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-inlong/pull/586?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f711a68...69c29fb](https://codecov.io/gh/apache/incubator-inlong/pull/586?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org