You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/26 03:30:13 UTC

[GitHub] [pulsar-client-go] wolfstudy opened a new pull request #601: Fix panic when scale down partitions

wolfstudy opened a new pull request #601:
URL: https://github.com/apache/pulsar-client-go/pull/601


   Signed-off-by: xiaolongran <xi...@tencent.com>
   
   
   
   ### Motivation
   
   When the program is running, if the business is forced to delete certain sub partitions, the following error message will be caused, that is, old_partitions is greater than new_partitions, it looks like it is doing scale down partitions, and the current code logic only deals with the scenario of scale up partitions , So if the user is forced to delete some sub partitions, the following error will be encountered:
   
   ```
   time="2021-08-24T21:18:27+08:00" level=info msg="[Changed number of partitions in topic]" new_partitions=1 old_partitions=20 topic="persistent://pulsar-ev297bm5n9j4/dogfood/1253970226_lam-1f67hbru"
   ```
   
   ```
   panic: runtime error: index out of range [1] with length 1
   
   goroutine 166288 [running]:
   github.com/apache/pulsar-client-go/pulsar.(*producer).internalCreatePartitionsProducers(0xc0070aa6e0, 0x0, 0x0)
           /Users/lzhuang/scfproj/scf_trigger_v2/vendor/github.com/apache/pulsar-client-go/pulsar/producer_impl.go:194 +0x785
   github.com/apache/pulsar-client-go/pulsar.(*producer).runBackgroundPartitionDiscovery.func1(0xc004167cd0, 0xc00559f5c0, 0xc006af6dc0, 0xc0070aa6e0)
           /Users/lzhuang/scfproj/scf_trigger_v2/vendor/github.com/apache/pulsar-client-go/pulsar/producer_impl.go:152 +0xce
   created by github.com/apache/pulsar-client-go/pulsar.(*producer).runBackgroundPartitionDiscovery
           /Users/lzhuang/scfproj/scf_trigger_v2/vendor/github.com/apache/pulsar-client-go/pulsar/producer_impl.go:144 +0xcd
   ```
   
   ### Modifications
   
   Increase the processing logic of scale down partition
   
   


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on pull request #601: Fix panic when scale down partitions

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on pull request #601:
URL: https://github.com/apache/pulsar-client-go/pull/601#issuecomment-906064881


   @merlimat @cckellogg @zymap PTAL 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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy merged pull request #601: Fix panic when scale down partitions

Posted by GitBox <gi...@apache.org>.
wolfstudy merged pull request #601:
URL: https://github.com/apache/pulsar-client-go/pull/601


   


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org