-
Notifications
You must be signed in to change notification settings - Fork 594
Change scaling int tests to constantly emit a stream of tuples throughout scaling event #1524
Change scaling int tests to constantly emit a stream of tuples throughout scaling event #1524
Conversation
…hout scaling event
👍 |
The test topology is Spout -> Identity Bolt -> Aggregator Bolt. Parallelism is S(1), IB(2), A(1) and we scale S up and IB down to produce S(2), IB(1), A(1). This is the sequence of events:
The 3 tuples emitted in steps 2-3 go unaccounted for on A. Of 44 total tuples emitted, only 41 are received. Still trying to understand why... |
@billonahill - is this atmost once or atleast once semantics? |
The topology is at least once. I've located the issue and verified with @maosongfu. The current integration test spout tracks how many tuples it sends and decrements that count back to zero to determine when it should send terminals, which indicate the job is done. The decrement occurs in both the
I'm going to fix by doing the following:
|
Updated per my previous comment. We now have the ability to test at least once, which I use for the scaling tests. |
map(lambda (k, v): "%s(%s)" % (str(k), v), actual_counts.iteritems()))) | ||
logging.info("Expected value frequencies ---------- \n" + ', '.join( | ||
map(lambda (k, v): "%s(%s)" % (str(k), v), expected_counts.iteritems()))) | ||
return "fail" |
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.
Can we return False
and True
, instead of strings...?
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, it's painful that these strings are being returned here and we should fix that. I'd like to contain the scope of changes in this PR though, and change all the true/falses in a PR of it's own.
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.
ok
Besides one minor comment, this PR looks good to me. |
…hout scaling event (#1524) * check for null before setting topology urls * Changing int test spout to be at least once, added at least once test result checker
Previously the scaling int test spouts did the following:
The problem with this approach is that tuples might not be sent during the scaling changes. This patches changes those tests to do the following:
Upon topology completion, the test runner would then fetch the dynamic set of expected results from the state server, instead of from a static expected results file.