Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data is written in case a path changes type #18

Open
htool opened this issue Jun 2, 2023 · 2 comments
Open

No data is written in case a path changes type #18

htool opened this issue Jun 2, 2023 · 2 comments

Comments

@htool
Copy link

htool commented Jun 2, 2023

This is coming from someone usng the VHFinfo plugin.
In the plugin I changed a type at some point. Not he gets:

Jun 02 22:59:27 ERROR: Write to InfluxDB failed. m [HttpError]: failure writing points to database: partial write: field type conflict: input field "value" on measurement "vhfdata.nearest.vts.channel" is type string, already exists as type float dropped=10 at IncomingMessage.<anonymous> (/home/pi/.signalk/node_modules/@influxdata/influxdb-client/dist/index.js:5:5671) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { statusCode: 422, statusMessage: 'Unprocessable Entity', body: '{"code":"unprocessable entity","message":"failure writing points to database: partial write: field type conflict: input field \\"value\\" on measurement \\"vhfdata.nearest.vts.channel\\" is type string, already exists as type float dropped=10"}', contentType: 'application/json; charset=utf-8', json: { code: 'unprocessable entity', message: 'failure writing points to database: partial write: field type conflict: input field "value" on measurement "vhfdata.nearest.vts.channel" is type string, already exists as type float dropped=10' }, code: 'unprocessable entity', _retryAfter: 0 }

He'd be happy to ignore this path, but the plugin doesn't support that.
Another option could be to drop the previously stored data?

@tkurki
Copy link
Owner

tkurki commented Jun 4, 2023

I have yet to address this issue. Haven't bumped into it myself, but people have reported it.

I see a few options:

  • use metadata to derive the data type
  • implement ignored paths, which would be useful anyway
  • implement data type override within the plugin, so that you could force the data type for a path (least interesting option, as this overlaps with metadata, but would be plugin-only)

As i haven't dug into this deeper I can't offer advice on how to get rid of the offending data already in the db.

@htool
Copy link
Author

htool commented Jun 4, 2023

  • implement ignored paths, which would be useful anyway

That would be the simplest and serves as a workaround for now.

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

No branches or pull requests

2 participants