sijocherian / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

Rows not inserted into table when insertAll method (java api) is used more than once per second #243

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Insert multiple rows with the insertAll java api method with a frequency of 
more than 1Hz

What is the expected output? What do you see instead?
All rows should be inserted - instead about half the rows are inserted.
(We have queried the table a day later to check).
e.g. if 10 rows are sent only rows 1, 2, 4, 7, 8, 10 may be added.

What version of the product are you using? On what operating system?
Spring boot java app using google-api-services-bigquery v2-rev205-1.20.0
Windows 7

Please provide any additional information below.
The code used to insert the rows is attached.
No errors were received in the response. 
If we add Thread.sleep(1000) before each call of the insertAll method then all 
of the rows are successfully inserted.
We are using a free trial - does that limit the number of rows added per second?

Original issue reported on code.google.com by zetasafe...@gmail.com on 6 May 2015 at 8:34

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

I checked your table. It has 6 rows from streaming as you said.
I'm wondering if you still have the logging of the response and error you print 
out?

Thanks,
Cheng

Original comment by che...@google.com on 7 May 2015 at 12:48

GoogleCodeExporter commented 8 years ago
Hi Cheng,

Thanks for your response.
We did not receive any errors.

Ian

Original comment by zetasafe...@gmail.com on 15 May 2015 at 1:48

GoogleCodeExporter commented 8 years ago
Sorry for the late response.
I couldn't reproduce the same failure scenario. If you don't see any logging 
from your program, I suspect it might be a transient connection problem and the 
program need to handle the exception thrown by the execute() and ingest/retry 
with insertId for row deduping.
https://cloud.google.com/bigquery/streaming-data-into-bigquery?#dataconsistency

I'll close the issue for now, but feel free to reopen it if you still encounter 
the same failure.
Thank you!

Original comment by che...@google.com on 29 May 2015 at 6:25

GoogleCodeExporter commented 8 years ago
Hi Cheng,

We are still encountering the issue and the execute method is not throwing any 
exceptions.

Thanks,
Ian

Original comment by zetasafe...@gmail.com on 8 Jun 2015 at 2:57

GoogleCodeExporter commented 8 years ago
Update - issue has been resolved!

Setting an insertId for the TableDataInsertAllRequest.Rows object solved the 
issue.

Thanks for you help,
Ian

Original comment by zetasafe...@gmail.com on 8 Jun 2015 at 3:12