chetanmeh opened a new pull request #4484: Switch to consistent indexing policy 
for CosmosDB
URL: https://github.com/apache/incubator-openwhisk/pull/4484
 
 
   `activations` collection currently uses `lazy` indexing policy. Per 
MicrosoftDocs/azure-docs#23875 this is deprecated and should be avoided.
   
   > Lazy mode performs updates to the index at a much lower priority level 
when the engine is not doing any other work. Because of this query performance 
can be highly unpredictable. It can also result in higher cost queries because 
the query engine has to do more work because it can't answer the query from the 
index. For these reasons we recommend against customers using it.
   
   This PR switches to consistent indexing policy. Further it also removes 
logic to automatically update the indexing policy if the collection already 
exists. Instead it would now log a warning log
   
   ```
   [2019-05-17T14:47:36.102Z] [WARN] Indexing policy for collection 
[activations] found to be different.
   Expected - 
{"automatic":true,"indexingMode":"Lazy","includedPaths":[{"path":"/namespace/?","indexes":[{"kind":"Hash","dataType":"String","precision":-1}]},{"path":"/_c/nspath/?","indexes":[{"kind":"Hash","dataType":"String","precision":-1}]},{"path":"/start/?","indexes":[{"kind":"Range","dataType":"Number","precision":-1}]}],"excludedPaths":[{"path":"/"}]}
   Existing - 
{"automatic":true,"indexingMode":"Lazy","includedPaths":[{"path":"/namespace/?","indexes":[]},{"path":"/_c/nspath/?","indexes":[]},{"path":"/start/?","indexes":[]}],"excludedPaths":[{"path":"/"},{"path":"/\"_etag\"/?"}]}
   ```
   
   Any index update would then need to be done manually by the system 
administrator
   
   ## 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 to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to