Skip to content

WriteRecordsAsync ignores first one #546

@rferreiraperez

Description

@rferreiraperez

Steps to reproduce:

I would like to write asyncronously a set of records using Line Protocol format.

I'm working with a following dataset:

measurement1,tag1="value1",tag2="value2" field1=110,field2=120,field3=130,field4=140 1673028005
measurement1,tag1="value1",tag2="value2" field1=210,field2=220,field3=230,field4=240 1673028010
measurement1,tag1="value1",tag2="value2" field1=410,field2=420,field3=430,field4=440 1673028015
measurement1,tag1="value1",tag2="value2" field1=610,field2=620,field3=630,field4=640 1673028020
measurement1,tag1="value1",tag2="value2" field1=810,field2=820,field3=830,field4=840 1673028025
measurement1,tag1="value1",tag2="value2" field1=1010,field2=1020,field3=1030,field4=1040 1673028030
measurement1,tag1="value1",tag2="value2" field1=1210,field2=1220,field3=1230,field4=1240 1673028035
measurement1,tag1="value1",tag2="value2" field1=1410,field2=1420,field3=1430,field4=1440 1673028040
measurement1,tag1="value1",tag2="value2" field1=1610,field2=1620,field3=1630,field4=1640 1673028045
measurement1,tag1="value1",tag2="value2" field1=1810,field2=1820,field3=1830,field4=1840 1673028050
measurement1,tag1="value1",tag2="value2" field1=2010,field2=2020,field3=2030,field4=2040 1673028055
measurement1,tag1="value1",tag2="value2" field1=2210,field2=2220,field3=2230,field4=2240 1673028060
measurement1,tag1="value1",tag2="value2" field1=2410,field2=2420,field3=2430,field4=2440 1673028065

And my code is:

        IEnumerable<string[]> batches = CreateBatches(data);
        using InfluxDBClient influxDBClient = new(Options.Host, Options.Token);
        WriteApiAsync writeApiAsync = influxDBClient.GetWriteApiAsync();
        foreach (var records in batches)
        {
            await writeApiAsync.WriteRecordsAsync(records, WritePrecision.S, Options.Bucket, Options.Organization, cancellationToken);
        }

Expected behavior:
I expected all the records to be written but it always ignore the first one.

Actual behavior:
All points except the first one are written.

Specifications:

  • Client Version: 4.12
  • InfluxDB Version: influxdb:2.7.1-alpine docker image
  • Platform: Ubuntu Server 20.04 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy