You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/01/03 14:56:49 UTC

[GitHub] chetanmeh opened a new pull request #4198: Enable configuring CosmosDB client per collection

chetanmeh opened a new pull request #4198: Enable configuring CosmosDB client per collection
URL: https://github.com/apache/incubator-openwhisk/pull/4198
 
 
   Currently same CosmosDB client is used for all collections. This PR enables configuring separate client having different config on per collection basis.
   
   ## Description
   
   Depending on requirements it may be required to configure `AsyncDocumentClient` on per collection basis. For e.g. to use different config for each collection use following config
   
   ```
   cosmosdb {
     endpoint          =  "https://<account>.documents.azure.com:443/"
     key               =  "secret"             # Access key
     db                =  "openwhisk"            # Database name
     throughput        = 1000          # Throughput configured for each collection within this db
     consistency-level = "Session"
     connection-policy {
       max-pool-size = 1000
       # When the value of this property is true, the SDK will direct write operations to
       # available writable locations of geo-replicated database account
       using-multiple-write-locations = false
   
       # Sets the preferred locations for geo-replicated database accounts e.g. "East US"
       # See names at https://azure.microsoft.com/en-in/global-infrastructure/locations/
       preferred-locations = []
       retry-options {
         # Sets the maximum number of retries in the case where the request fails
         # because the service has applied rate limiting on the client.
         max-retry-attempts-on-throttled-requests = 9
   
         # Sets the maximum retry time
         # If the cumulative wait time exceeds this SDK will stop retrying and return the
         # error to the application.
         max-retry-wait-time                      = 30 s
       }
     }
   
     # Specify entity specific overrides below. By default all config values would be picked from top level. To override
     # any config option for specific entity specify them below. For example if multiple region writes need to be enabled
     # for activations then
      collections {
           WhiskActivation {            # Add entity specific overrides here
               using-multiple-write-locations = true
           }
       }
   }
   ```
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
   
   - [ ] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [ ] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services