Skip to content
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

Intermittent test failure fixes #1657

Merged
merged 14 commits into from Feb 20, 2018
Merged

Intermittent test failure fixes #1657

merged 14 commits into from Feb 20, 2018

Conversation

russelldb
Copy link
Member

Also some deps changes that will need looking at again as we move from tags to branches.

Still for discussion - the JMX stuff in the schema. It should probably be complete for all jmx properties, and the same for SNMP, and an error logged at start up if they're configured true or on.

The other commits are test fixes for hll and stats, and some dirty path munging for running tests either in riak_kv or at the top level riak project.

The `gen_valid_bucket` call used regular `gen_hll_precision` meaning
that every now and again the _valid_ bucket had an _invalid_ hll
property. When this coincides with the update property also having the
same invalid hll property the resulting bucket has an invalid hll
property that matches the input and so it appears that validation
failed, and rightly the test fails. However validation worked, the
original bucket was invalid is all. This commit adds a
`gen_valid_hll_precision` generator so that the original "valid" bucket
is actually valid.
A duplicate name was is used for the get_fsm_active stat, and also the
registration code is not robust. This commit removes the unused
duplicate alias and makes the registration code more robust by using
re-register.
Due to bad assumptions about paths to deps schema tests and cli tests
failed reliably from a top level checkout. This commit, while not pretty
or exact passes of both top level checkouts and local deps checkouts. I
don't think it is worth buring more time making it better or less
repetitive unless you do?
Cuttlefish will freakout and die and refuse to start a riak node if
there is an unknown/mapped property in riak.conf. I guess this is good
because...anyway, this is a speculative workaround for the upgrade from
riak_ee to riak+repl, since there is likely a `jmx` config setting in
riak.conf. Probably the right answer is to port riak_jmx to riak-2.2.5
and deprecate it.
@@ -516,7 +516,7 @@ stats() ->
%% node stats: gets
{[node, gets], spiral, [], [{one , node_gets},
{count, node_gets_total}]},
{[node, gets, fsm, active], counter, [], [{value, node_get_fsm_active}]},
{[node, gets, fsm, active], counter},
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, just a question really, how come the other args are no longer required?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmmm…

Copy link
Member Author

Choose a reason for hiding this comment

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

No idea, it looks wrong though, eh? node_get_fsm_active vs node_gets everywhere else. Damn, I wish I could remember october 2017 a little better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm…yeah…really…no idea…will have to go back and read through it all again

Copy link
Member Author

Choose a reason for hiding this comment

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

I honestly don't understand stats since they were changed to exometer.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh the commit message says it is "an unused duplicate alias", that answer your question?

Copy link
Contributor

Choose a reason for hiding this comment

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

that's fine, just curious

Copy link
Member Author

Choose a reason for hiding this comment

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

Look at

{[node, puts, fsm, active], counter},
it's not "args no longer required?" but that they were never required.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks.

%% F(start),
%% Acc
%% end,
[], Apps);
Copy link
Contributor

Choose a reason for hiding this comment

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

Good call - nested function definition inside fold was ugly.

Copy link
Member Author

Choose a reason for hiding this comment

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

should probably fix the commenting out though

@@ -265,8 +264,9 @@ dep_apps(Test, Extra) ->
application:set_env(riak_core, ring_state_dir, Test ++ "/ring"),
application:set_env(riak_core, platform_data_dir, Test ++ "/data"),
application:set_env(riak_core, handoff_port, 0), %% pick a random handoff port
{ok, Dir} = file:get_cwd(),
Dirs = [Dir ++ "/../deps/*/priv"],
%% @TODO this is wrong still
Copy link
Contributor

Choose a reason for hiding this comment

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

some indication of why it's wrong might be helpful

Copy link
Member Author

Choose a reason for hiding this comment

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

…erm…you got me. It's "wrong" in that it is a hack maybe?

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a comment to draw attention to it doesn't detract from the P/R - don't pay this one any more attention on my account.

@@ -326,6 +339,7 @@ start_app_and_deps(Application, Started) ->
true ->
{ok, Started};
false ->
_Apps = application:which_applications(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious as to what this does

Copy link
Member Author

Choose a reason for hiding this comment

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

I have no idea…I'll have to have a read of the whole file again. This is what happens with so much time between commit and review, eh?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it just needs to be taken out, probably a different idea, and then underbarred the binding just to make it compile.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah, it was for some printf debugging

You don't need it!
`Apps` was used for a some debugging
@russelldb
Copy link
Member Author

Pushed some commits to address @bryanhuntesl comments

It's fixed in riak_test upgrade test code instead. No need to pollute
future riak releases with any jmx carry overs.
When the 2.2.5 PRs are merged this rebar.config is correct for the set
of deps for 2.2
@russelldb
Copy link
Member Author

Same question, squash first?

@bryanhuntesl
Copy link
Contributor

+1 squash

@russelldb russelldb merged commit 8f8e930 into develop-2.2 Feb 20, 2018
@russelldb russelldb deleted the develop-2.2.5 branch February 20, 2018 13:38
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.

None yet

2 participants