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/09/16 08:38:31 UTC

[GitHub] [pulsar] nicoloboschi opened a new pull request, #17690: [fix][functions] Ensure InternalConfigurationData data model is compatible across different versions

nicoloboschi opened a new pull request, #17690:
URL: https://github.com/apache/pulsar/pull/17690

   ### Motivation
   
   After https://github.com/apache/pulsar/pull/14384, the broker and the client expects that the `InternalConfigurationData` contains `metadataStoreUrl` and `configurationMetadataStoreUrl` fields.
   However the broker is no more compatible with old clients. 
   
   
   https://github.com/apache/pulsar/pull/14384 is landed to branch-2.11 and [2.10.3](https://github.com/apache/pulsar/pull/17291)
   
   Example scenario: 
   - broker on 2.10.2
   - function worker on 2.10.2
   
   1. upgrade fn worker to 2.11.0 or 2.10.3
   2. the fn worker starts and download the internal config from the broker
   3. broker serves a json with old fields (`zookeeperServers` and `configurationStoreServers`)
   4. fn worker reads the json and convert it to a `InternalConfigurationData` instance. It expects to see the fields filled `metadataStoreUrl` and `configurationMetadataStoreUrl` but they aren't
   5. NPE on fn worker 
   ```
   2022-09-15T17:42:16,072+0000 [main] INFO  org.apache.pulsar.functions.worker.PulsarWorkerService - Initializing Pulsar Functions namespace...
   2022-09-15T17:42:16,192+0000 [main] ERROR org.apache.pulsar.functions.worker.FunctionWorkerStarter - Encountered error in function worker.
   java.lang.NullPointerException: null
       at org.apache.pulsar.metadata.impl.MetadataStoreFactoryImpl.removeIdentifierFromMetadataURL(MetadataStoreFactoryImpl.java:73) 
       at org.apache.pulsar.functions.worker.WorkerUtils.initializeDlogNamespace(WorkerUtils.java:188) 
       at org.apache.pulsar.functions.worker.PulsarWorkerService.initializeStandaloneWorkerService(PulsarWorkerService.java:281) 
       at org.apache.pulsar.functions.worker.PulsarWorkerService.initAsStandalone(PulsarWorkerService.java:208)
       at org.apache.pulsar.functions.worker.Worker.start(Worker.java:54)
       at org.apache.pulsar.functions.worker.FunctionWorkerStarter.main(FunctionWorkerStarter.java:76)
   ```
   
   
   ### Modifications
   
   * Restore old fields in `InternalConfigurationData` and add fallback the old values in the new fields getters
   * Added unit test 
   
   - [x] `doc-not-needed` 


-- 
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] Jason918 commented on pull request #17690: [fix][functions] Ensure InternalConfigurationData data model is compatible across different versions

Posted by GitBox <gi...@apache.org>.
Jason918 commented on PR #17690:
URL: https://github.com/apache/pulsar/pull/17690#issuecomment-1252074367

   @nicoloboschi `internalConfigurationRetroCompatibility` fails on branch-2.10, Can you help fix this? 
   See : https://github.com/Jason918/pulsar/actions/runs/3088190598/jobs/4994380263#step:11:173


-- 
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 commented on pull request #17690: [fix][functions] Ensure InternalConfigurationData data model is compatible across different versions

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on PR #17690:
URL: https://github.com/apache/pulsar/pull/17690#issuecomment-1252128879

   @Jason918 I pushed a `[fix for the test](https://github.com/apache/pulsar/commit/df128578bfb)`. The motivation is that [this commit](https://github.com/apache/pulsar/commit/3d4fa00b0059744c3d945c77672b9769c335014c#diff-cc761e782083f37db72cd91684fee07b931c188dd93333397c62b0a4c45a657eR2883) is not present in 2.10. But it's not a problem, I just updated the test.


-- 
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] michaeljmarshall merged pull request #17690: [fix][functions] Ensure InternalConfigurationData data model is compatible across different versions

Posted by GitBox <gi...@apache.org>.
michaeljmarshall merged PR #17690:
URL: https://github.com/apache/pulsar/pull/17690


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