Details
-
Bug
-
Resolution: Fixed
-
Major
-
Cheshire-Cat
-
None
-
Untriaged
-
1
-
Unknown
Description
In Cheshire Cat the following function has a syntax error in the timer callback (I have a source bucket with 10M docs and only make about 19.5K timers) oddly the code editor is showing the error count promptly at the problematic line - but the main statistic doesn't show the count for minutes - yet my timer fires as soon as possible!
function TimerCallback(context) {
|
// intentional error pegging as a failure is too slow
|
e = 10;
|
// correct syntax
|
// var e = 10;
|
}
|
function OnUpdate(doc, meta) {
|
// only process 1/512 or 2 vBuckets 0.19% of 10M or 19.5 k timers
|
if (meta.vb && ((meta.vb % 512) !== 0)) return;
|
|
// intentional error pegging as a failure is too slow
|
// e = 10;
|
// correct syntax
|
// var e = 10;
|
|
createTimer(TimerCallback, new Date(), meta.id, {id: meta.id, doc: doc});
|
}
|
If the syntax error is as shown in the code block above my failure: statistic across 10M incorrectly stays at 0 - but I can View the code and hover over the "caution" symbol where the failure occurs and se he count incrementing each time I open the code editor.
Deployment | Statistics | ||
---|---|---|---|
Success | 9.98M | backlog | 3066 |
Timeout | 0 | failure | 0 |
However if I wait a few more minutes the failure: statistic will correctly display 19572 - this is delayed by too much as the timer was firing from now, i.e. new Date(). I would expect a 7-14 second delay not several minutes for the failure: statistic to peg. We really want more prompt feedback that something is failing.
Deployment | Statistics | ||
---|---|---|---|
Success | 9.98M | backlog | 3066 |
Timeout | 0 | failure | 19572 |
If the syntax error is in the OnUpdate block it works as expected uncomment "e = 10;" and my failure: statistic across 10M rows is about 0.19% of the bucket or ~ 19572. However I do end up with a "backlog" of 3066 when the backlog should be 0.