influxdata / influxdata/influxdb-client-csharp
Writing data with Sync API fails silently
- Dominant language
- C#
- Stars
- 377
- Forks
- 93
- Avg merge
- 9m
- Merged PRs (30d)
- 2
Description
I am using the following F# code to write
```
let write org bucket (callback: SeriesWriteEvent -> unit) (options: WriteOptions) (points: PointData array) =
log.Information("Writing {0} points in bucket {Organization}/{Bucket}", points.Length, org, bucket)
use wApi = client.GetWriteApi(options)
use _ = wApi.EventHandler |> Event.subscribe (fun (ea: EventArgs) ->
match ea with
| :? WriteSuccessEvent as ea -> BatchWritten options.BatchSize
| :? WriteErrorEvent as ea -> BatchError ea.Exception
| :? WriteRetriableErrorEvent as ea -> BatchRetry (ea.Exception, options.BatchSize, ea.RetryInterval)
| :? WriteRuntimeExceptionEvent as ea -> BatchError ea.Exception
|> callback)
try
wApi.WritePoints(points, bucket, org)
with | x -> log.Error(x, "Write Error")
```
The writing starts as expected. But, after a partial number of points is written (I am writing for example 200000 of the 1.5 million), the function returns without any error. The WriteSuccessEvent is called for 10 to 20 batches and then stops for a few seconds, and finally wApi.WritePoints simply returns without triggering any event (Retry or Error) nor throwing an exception.
Contributor guide
No contributing guide indexed for this repository
Research direction
The payload identifies the synchronous Write API entry point, wApi.WritePoints, and the subscribed write events. Start there and reproduce the partial 1.5-million-point write with the shown callbacks; done means the operation reports completion or surfaces a failure through an exception, error event, or retry event.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, fsharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100