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

WriteRecordsAsync ignores first one #546

Open
rferreiraperez opened this issue Jul 5, 2023 · 1 comment
Open

WriteRecordsAsync ignores first one #546

rferreiraperez opened this issue Jul 5, 2023 · 1 comment

Comments

@rferreiraperez
Copy link

rferreiraperez commented Jul 5, 2023

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
@rferreiraperez
Copy link
Author

Testing with other datasets produces the same result

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

1 participant