You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a unique index on the 'startDate' column, however, nothing enforces the uniqueness. It appears that an expectation that new Date() will always produce unique result. In our case, this is certainly not the case.
Our logs are filling up with about 15 million entries which look like this:
There is an attempt to detect the duplicate case and try a new startDate, but it appears to me that the lines below should change the startDate and updatedDate on this.worker, not this.
It appears to be this bug is causing an infinite loop in our system, since the function recurses and tries the same wrong value over and over, logging each time....
I'm looking at a patch in our fork right now.
The text was updated successfully, but these errors were encountered:
Thanks, yeah it looks like you are correct, I referenced the wrong this so the startDate was not updating on the new insert attempt after a fail. I will get this fixed soon unless you already have a pull request in the works.
Should be fixed, I verified that it works properly by forcing the date to a specific date when I was testing. Let me know if you have any other issues.
There's a unique index on the 'startDate' column, however, nothing enforces the uniqueness. It appears that an expectation that
new Date()
will always produce unique result. In our case, this is certainly not the case.Our logs are filling up with about 15 million entries which look like this:
(This is across several clusters in several databases, so the indexes and dates involved vary some).
I think there may be an infinite loop bug here:
https://github.com/mattpker/node-is-master/blob/master/is-master.js#L97
There is an attempt to detect the duplicate case and try a new startDate, but it appears to me that the lines below should change the
startDate
and updatedDate onthis.worker
, notthis
.It appears to be this bug is causing an infinite loop in our system, since the function recurses and tries the same wrong value over and over, logging each time....
I'm looking at a patch in our fork right now.
The text was updated successfully, but these errors were encountered: