Update helpers.js #350

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@ryanrf
ryanrf commented Oct 8, 2013

The previous regex was catching lines with scientific notation (ending in E or e) as bad lines - continuously writing to the statsd.log file, (using lots of I/O).
Also added 'Na' to regex to prevent NaN messages being logged continuously.

@ryanrf ryanrf Update helpers.js
The previous regex was catching lines with scientific notation (ending in E or e) as bad lines - continuously writing to the statsd.log file, (using lots of I/O).
Also added 'Na' to regex to prevent NaN messages being logged continuously.
9a5a8ae
Owner
mrtazz commented Oct 20, 2013

Thanks for the patch. Can you add tests for this change so it doesn't break in the future?

ryanrf commented Oct 23, 2013

I'll be working on it a bit in the future and will add tests if I have a
chance.

On Sat, Oct 19, 2013 at 8:43 PM, Daniel Schauenberg <
notifications@github.com> wrote:

Thanks for the patch. Can you add tests for this change so it doesn't
break in the future?


Reply to this email directly or view it on GitHubhttps://github.com/etsy/statsd/pull/350#issuecomment-26664230
.

@SaveTheRbtz SaveTheRbtz pushed a commit to SaveTheRbtz/statsd that referenced this pull request Dec 31, 2013
Alexey Ivanov lib/helpers: fixed is_valid_packet()
This commit introduces following changes:
 * Be liberal in what you recieve - do not rely on regexps for packet
   parsing but instead accept anything that can be parsed by JavaScript
   as a number e.g: +1e-17, -0511, 0xDEADbeef, etc
 * Accept both positive and negative counters with explicit / implicit
   sign
 * Provides more strict error checking then regexp, for example
   following strings match previously used '([\-\+\d\.]+' regexp:
   .
   .123.
   .\-+\0\+-.1-

Also while here added more tests.

Closes: #350 #357

Signed-off-by: Alexey Ivanov <SaveTheRbtz@GMail.com>
Signed-off-by: Alexey Ivanov <aivanov@linkedin.com>
4828361
@SaveTheRbtz SaveTheRbtz pushed a commit to SaveTheRbtz/statsd that referenced this pull request Dec 31, 2013
Alexey Ivanov lib/helpers: fixed is_valid_packet()
This commit introduces following changes:
 * Be liberal in what you recieve - do not rely on regexps for packet
   parsing but instead accept anything that can be parsed by JavaScript
   as a number e.g: +1e-17, -0511, 0xDEADbeef, etc
 * Accept both positive and negative counters with explicit / implicit
   sign
 * Provides more strict error checking then regexp, for example
   following strings match previously used '([\-\+\d\.]+' regexp:
   .
   .123.
   .\-+\0\+-.1-

Also while here added more tests.

Closes: #350 #357

Signed-off-by: Alexey Ivanov <SaveTheRbtz@GMail.com>
e752cbf
@SaveTheRbtz SaveTheRbtz pushed a commit to SaveTheRbtz/statsd that referenced this pull request Dec 31, 2013
Alexey Ivanov lib/helpers: fixed is_valid_packet()
This commit introduces following changes:
 * Be liberal in what you recieve - do not rely on regexps for packet
   parsing but instead accept anything that can be parsed by JavaScript
   as a number e.g: +1e-17, -0511, 0xDEADbeef, etc
 * Accept both positive and negative counters with explicit / implicit
   sign
 * Provides more strict error checking then regexp, for example
   following strings match previously used '([\-\+\d\.]+' regexp:
   .
   .123.
   .\-+\0\+-.1-

Also while here added more tests.

Closes: #350 #357

Signed-off-by: Alexey Ivanov <SaveTheRbtz@GMail.com>
63fb16c
Owner
mrtazz commented Apr 14, 2014

fixed via #382

@mrtazz mrtazz closed this Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment