Skip to content

Conversation

@buchi-busireddy
Copy link
Contributor

Description

See #60 for more details.

Testing

Integration tests are verifying the full logic.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

This PR depends on hypertrace/document-store#18 so build will fail until that's merged.

…upsert.

This lets the clients to easily check if an entity has changed as part of an upsert,
without making an extra round trip to the service.
@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #61 (b755c33) into main (d0a1f9c) will increase coverage by 0.23%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #61      +/-   ##
============================================
+ Coverage     53.54%   53.78%   +0.23%     
- Complexity      329      335       +6     
============================================
  Files            36       36              
  Lines          2525     2551      +26     
  Branches        340      342       +2     
============================================
+ Hits           1352     1372      +20     
- Misses         1024     1030       +6     
  Partials        149      149              
Flag Coverage Δ Complexity Δ
integration 42.07% <75.00%> (-0.13%) 0.00 <6.00> (ø)
unit 33.62% <0.00%> (-0.32%) 0.00 <6.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...entity/data/service/rxclient/EntityDataClient.java 73.33% <ø> (ø) 1.00 <0.00> (ø)
...ace/entity/data/service/client/EdsCacheClient.java 81.66% <0.00%> (-1.39%) 6.00 <0.00> (ø)
...ace/entity/data/service/EntityDataServiceImpl.java 60.35% <76.92%> (+1.38%) 43.00 <5.00> (+5.00)
...y/data/service/client/EntityDataServiceClient.java 70.96% <100.00%> (+0.47%) 27.00 <1.00> (+1.00)
...ertrace/entity/service/util/DocStoreConverter.java 85.11% <0.00%> (+0.41%) 51.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0a1f9c...a58af58. Read the comment docs.

Copy link
Contributor

@kotharironak kotharironak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Had minor comments.

}
rpc upsertEntities (Entities) returns (Empty) {
}
rpc getAndUpsertEntities (Entities) returns (stream Entity) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rpc getAndUpsertEntities (Entities) returns (stream Entity) {}
rpc getAndUpsertEntities (Entities) returns (stream Entity) {
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As rest of the methods are following that pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is very minor. Will avoid one more commit and full build cycle for this :)

.map(Entity::toBuilder)
.map(builder -> builder.setTenantId(tenantId))
.map(Entity.Builder::build)
.forEach(responseObserver::onNext);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will send one document at a time, right? Should we send them in batch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Streaming one at a time will allow the client to process it and discard instead of keeping it in memory. i think that's the pattern we should always follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants