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 2022/11/16 23:08:27 UTC

[GitHub] [pulsar] aymkhalil opened a new issue, #18507: [Bug] Pulsar Admin does not update "inputSpecs" on sinks

aymkhalil opened a new issue, #18507:
URL: https://github.com/apache/pulsar/issues/18507

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Version
   
   2.10 on M1 mac
   
   ### Minimal reproduce step
   
   * Create any sink without input specs:
   ```
   bin/pulsar-admin sinks create --name print-sink --archive pulsar-io/data-generator/target/pulsar-io-data-generator-2.10.2.3-SNAPSHOT.nar --inputs persistent://public/default/fresh
   ```
   * Try to update the sink with `inputSpecs`
   ```
   bin/pulsar-admin sinks update --name print-sink --archive pulsar-io/data-generator/target/pulsar-io-data-generator-2.10.2.3-SNAPSHOT.nar --inputs persistent://public/default/fresh --input-specs '{"persistent://public/default/fresh":{"receiverQueueSize":10}}'
   ```
   
   * Get the effective sink config:
   ```
   bin/pulsar-admin sinks get --name print-sink
   ```
   
   ### What did you expect to see?
   
   ```
   {
     "tenant": "public",
     "namespace": "default",
     "name": "print-sink",
     "className": "org.apache.pulsar.io.datagenerator.DataGeneratorPrintSink",
     "sourceSubscriptionPosition": "Latest",
     "inputs": [
       "persistent://public/default/fresh"
     ],
     "inputSpecs": {
       "persistent://public/default/fresh": {
         "isRegexPattern": false,
         "schemaProperties": {},
         "consumerProperties": {},
         "receiverQueueSize": 10, 
         "poolMessages": false
       }
     },
     ...
   }
   ```
   
   ### What did you see instead?
   
   `receiverQueueSize` is missing from `inputSpecs`
   ```
   {
     "tenant": "public",
     "namespace": "default",
     "name": "print-sink",
     "className": "org.apache.pulsar.io.datagenerator.DataGeneratorPrintSink",
     "sourceSubscriptionPosition": "Latest",
     "inputs": [
       "persistent://public/default/fresh"
     ],
     "inputSpecs": {
       "persistent://public/default/fresh": {
         "isRegexPattern": false,
         "schemaProperties": {},
         "consumerProperties": {},
         "poolMessages": false
       }
     },
     ...
   }
   ```
   
   ### Anything else?
   
   Please note that the create sink command with `inputSpecs` works fine - the issue is with `update` only:
   
   ```
    bin/pulsar-admin sinks create --name print-sink --archive pulsar-io/data-generator/target/pulsar-io-data-generator-2.10.2.3-SNAPSHOT.nar --inputs persistent://public/default/fresh --input-specs '{"persistent://public/default/fresh":{"receiverQueueSize":10}}'
    
    bin/pulsar-admin sinks get --name print-sink
   
    "inputSpecs": {
       "persistent://public/default/fresh": {
         "isRegexPattern": false,
         "schemaProperties": {},
         "consumerProperties": {},
         "receiverQueueSize": 10,
         "poolMessages": false
       }
     },
   ```
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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

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


[GitHub] [pulsar] aymkhalil commented on issue #18507: [Bug] Pulsar Admin sink update can potentially wipe out "inputSpecs"

Posted by GitBox <gi...@apache.org>.
aymkhalil commented on issue #18507:
URL: https://github.com/apache/pulsar/issues/18507#issuecomment-1366200889

   @gaozhangmin yes it will update successfully using master, but then if your update have both `--inputs` and `--inputSpecs`, the `consumerConfig` will be reset as per the scenario described in this issues. I attempted a fix here if you want to take a look #19082 


-- 
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] gaozhangmin commented on issue #18507: [Bug] Pulsar Admin sink update can potentially wipe out "inputSpecs"

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on issue #18507:
URL: https://github.com/apache/pulsar/issues/18507#issuecomment-1318014642

   I will check this out


-- 
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] github-actions[bot] commented on issue #18507: [Bug] Pulsar Admin sink update can potentially wipe out "inputSpecs"

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #18507:
URL: https://github.com/apache/pulsar/issues/18507#issuecomment-1363536094

   The issue had no activity for 30 days, mark with Stale label.


-- 
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] gaozhangmin commented on issue #18507: [Bug] Pulsar Admin sink update can potentially wipe out "inputSpecs"

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on issue #18507:
URL: https://github.com/apache/pulsar/issues/18507#issuecomment-1323321721

   @aymkhalil  I can update successfuly with `bin/pulsar-admin sinks update --name print-sink  --input-specs '{"persistent://public/default/fresh":{"receiverQueueSize":12}}'` using master branch


-- 
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] nicoloboschi closed issue #18507: [Bug] Pulsar Admin sink update can potentially wipe out "inputSpecs"

Posted by GitBox <gi...@apache.org>.
nicoloboschi closed issue #18507: [Bug] Pulsar Admin sink update can potentially wipe out "inputSpecs"
URL: https://github.com/apache/pulsar/issues/18507


-- 
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