Skip to content

Fix random issue - #19

Merged
ushachar merged 2 commits into
masterfrom
fix-random-issue
Feb 26, 2017
Merged

ushachar merged 2 commits into
masterfrom
fix-random-issue

Conversation

@elad-ash

Copy link
Copy Markdown
Contributor

Fixes the random problem originated by calling the random creation BEFORE setting the variable from the configuration.

The reason for the problem is that the call for setting object was done
after the use of the configurable vaiable.
The fix was to move it earlier.
@elad-ash

Copy link
Copy Markdown
Contributor Author

Note - Version tested vs. Redislabs internal ticket to verify the fix in our QA.

@ushachar
ushachar merged commit 8ed94cc into master Feb 26, 2017
@elad-ash
elad-ash deleted the fix-random-issue branch February 26, 2017 16:42
fcostaoliveira added a commit that referenced this pull request Jun 2, 2026
…/0 (#436)

* fix(opts): reject negative -c/-t/-n/--test-time; guard Hits/sec from /0

Same crash class as merged phases #428/#429 (--pipeline, --data-size,
--run-count): strtoul("-1") wraps to UINT_MAX and -c -1 then tries to
spawn ~4B clients. The four count flags missed the phase-2 sweep.

Also adds a > 0 guard to run_stats.cpp summarize() for the legacy GET
Hits/sec / Misses/sec computation (the only summarize site without one);
sub-microsecond runs were emitting +Inf / nan into the JSON.

Refs: 2.4 review findings #24 + #19

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix(stats): guard all summarize() rate computations from /0; standardize error wording

Reviewers R3+R4 flagged that the prior commit only guarded m_hits_sec
and m_misses_sec in summarize(); six sibling rate computations
(m_ops_sec, m_bytes_sec, m_bytes_sec_rx, m_bytes_sec_tx, m_moved_sec,
m_ask_sec, m_connection_errors_sec) still divided by test_duration_usec
with no guard. All now use the (test_duration_usec > 0 ? ... : 0.0)
ternary, consistent with sites at lines 1300, 1311, 1317, 1344, 1354,
1360, 1627, 1629.

R5 also flagged that the four new error messages mixed "must be a
positive integer" and "must be greater than zero". Standardized to
match the phase-2 convention.

Refs: 2.4 review of PR #436 (R3/R4/R5).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
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.

2 participants