-
Notifications
You must be signed in to change notification settings - Fork 96
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
Synchronous queries are no longer stored in ApiJobStore. #49
Conversation
878a367
to
2313131
Compare
); | ||
) | ||
.replay(1); | ||
jobRowUpdatedNotification.connect(); |
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.
The other notifications are hot, and since this observable relies on hot observables, I felt it was safest to also make it hot.
64a68f4
to
3425245
Compare
Needs a CHANGELOG. |
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.
Looks pretty good, just a couple small things (and a Changelog entry needed, calling out that we're fixing a bug.
.delay(ignored -> preResponseStoredNotification) | ||
.delay(ignored -> jobRowStoredNotification) | ||
.zipWith(jobRowStoredNotification, (preResponse, ignored) -> preResponse) | ||
.zipWith(preResponseStoredNotification, (preResponse, ignored) -> preResponse) |
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.
A comment around why we can ignore the other side of these zips would be good.
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.
The comment above the stream is supposed to explain it, by explaining that we need to wait until the job row has been stored, and the pre response has been stored before emitting the PreResponse (so we don't care about the value of the notifications, only that they arrived). I can make it more explicit that we're using the zipWith as a gating mechanism if you'd like.
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.
Yeah, the "zip as gate" is a little odd, I think.
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.
It is, but I don't really know of a better way. Not if we want to release it iff the two observables emit items.
jobs: {[ | ||
//'greg' is the UserId hard-coded in TestBinderFactory::buildJobRowBuilder and used for | ||
//all queries created in the test environment. | ||
filters: ["userId-eq[greg]"] |
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 we couldn't just get all of them?
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.
Because the job store is prepopulated with jobs for functional tests against the jobs endpoint, so it's not empty.
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.
ahh, ok. Makes sense
After CHANGELOG entry. 👍 |
c762c4f
to
218c6e2
Compare
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.
👍 once that one line in the changelog gets de-confused
storing the ticket in the ApiJobStore. | ||
* The reason the delay operator didn't stop the update workflow from executing viewed an `Observable::onCompleted` as a message for the purpose of | ||
delays. Since the two observables that that the metadata update it gated on are empty when the query is synchronous, the update metadata workflow | ||
was being updated. |
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.
This bullet seems... confusing? Could it be cleaned / tightened up a bit?
-- The `delay` operator considers `Observable::onCompleted` to be an "emitted item." Therefore, the job row was still being stored in the ApiJobStore even when the query was synchronous. --This has been fixed by replacing `delay` with a subscription, and/or zip when appropriate.
218c6e2
to
7091fc9
Compare
-- The
delay
operator considersObservable::onCompleted
to be an"emitted item." Therefore, the job row was still being stored in the
ApiJobStore even when the query was synchronous.
--This has been fixed by replacing
delay
with a subscription, and/orzip when appropriate.