-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Switch to Cosmos SDK v3 for Cache Invalidator Service #4677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| .feedContainer(targetContainer) | ||
| .leaseContainer(leaseContainer) | ||
| .options(feedOpts) | ||
| .asInstanceOf[ChangeFeedProcessorBuilderImpl] //observerFactory is not exposed hence need to cast to impl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened Azure/azure-sdk-for-java#5744 to expose the proper api so that we do not have to rely on implementation details
8e900f8 to
6812ae7
Compare
Codecov Report
@@ Coverage Diff @@
## master #4677 +/- ##
==========================================
- Coverage 83.05% 78.34% -4.71%
==========================================
Files 189 196 +7
Lines 8555 8803 +248
Branches 597 603 +6
==========================================
- Hits 7105 6897 -208
- Misses 1450 1906 +456
Continue to review full report at Codecov.
|
|
For some reason the CacheInvalidatorTest is still failing in fork where CosmosDB tests are enabled. So need to validate that |
a87c462 to
b8ee869
Compare
|
Build passed on fork with CosmosDB tests enabled |
…Java future support
This seems to be observed only for case where collection to monitor is created fresh (in test setups). Using `startFromBeginning` option seems to fix this
5b5f919 to
c460f4f
Compare
| import java.util | ||
|
|
||
| import akka.Done | ||
| import akka.event.slf4j.SLF4JLogging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this shouldn't use the same Logging/AkkaLogging classes from common/scala? I guess this applies to all the other classes in cacheinvalidator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases (except the one to log the progress) the logs were mostly for lifecycle related messages (startup/shutdown) and the CosmosDB SDK also logs using slf4j directly so either of those logging should be fine.
Switched to AkkaLogging now for consistency
| case Success(_) => | ||
| MetricEmitter.emitCounterMetric(feedCounter, docs.size) | ||
| recordLag(context, docs.last) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we log something on failures here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging was being done by CosmosDB SDK for failure but added a log here also now such that we can always capture the failure case
tysonnorris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM some minor comments
Switches to Cosmos SDK v3 which is the next supported SDK for using ChangeFeedProcessor support
Closes #4663
Related issue and scope
My changes affect the following components
Types of changes
Checklist: