We have a service which has been running fine for a while now. The entire server is repeatedly going down today because the vertica driver is throwing an Error. Stack trace is below.
I took a look at the source, and this file is riddled with thrown Errors. Shouldn't these all be caught in query.js and returned to the callback? Taking down the entire app because an unexpected data format was received seems a bit drastic.
The value in the buffer which caused this was in the format "10:34:01.16". Apparently the time values are not limited to second precision. I patched our code for now to handle this by just discarding the fractional part, but I think this needs a more thoughtful approach.
node_modules/vertica/lib/types.js:108
throw new Error('Invalid time format!');
^
Error: Invalid time format!
at Function.VerticaTime.fromStringBuffer (node_modules/vertica/lib/types.js:108:11)
at Field.stringDecoders.time [as decoder] (node_modules/vertica/lib/types.js:259:24)
at Query.onDataRow (node_modules/vertica/lib/query.js:85:51)
at Connection.emit (events.js:95:17)
at Connection._onData (node_modules/vertica/lib/connection.js:350:14)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:764:14)
at Socket.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:426:10)
at emitReadable (_stream_readable.js:422:5)
We have a service which has been running fine for a while now. The entire server is repeatedly going down today because the vertica driver is throwing an Error. Stack trace is below.
I took a look at the source, and this file is riddled with thrown Errors. Shouldn't these all be caught in query.js and returned to the callback? Taking down the entire app because an unexpected data format was received seems a bit drastic.
The value in the buffer which caused this was in the format "10:34:01.16". Apparently the time values are not limited to second precision. I patched our code for now to handle this by just discarding the fractional part, but I think this needs a more thoughtful approach.