Open yungez opened 7 years ago
as a tester, I do this a-lot on the integration environments. I've noticed its faster to drop collections and recreate than delete the 1000+ records individually. With query failing to read once a collection has been dropped and recreated I find this very frustrating.
We have coded around this with:
private List<Document> retrieveWithDocumentClientExceptionFailover(Exception e, Integer... productsIDs) {
if (e.getCause().toString().contains("StatusCode: InvalidPartition")) {
logger.info("Catching IllegalStateException thrown by queryDocument function when Azure collection is recreated after this app is started");
documentClient = configuration.createDocumentClient();
return documentClient.queryDocuments(collectionLink(databaseName, collectionName),
StoreUtils.findObjectsByIds(collectionName, productsIDs),
new FeedOptions()).getQueryIterable().toList();
}
return null;
}
But find this very unsatisfactory...
Watching this thread with interest.
sdk version: 1.11.0 java version: 1.8 repro steps:
Question:
anything info need feel free to ping me. thanks.