googleapis / googleapis/google-cloud-java

[java-bigquery] BigQuery: data is sometimes not inserted in tables

Đang mở
#12,143 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: bigquery priority: p3 type: bug
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

Hi,

I'm having random data missing/not showing up in BigQuery issues. I would seemingly write data without issues, but SELECT * would return nothing.

1. Have tried latest version but still same issue.

```

com.google.cloud
google-cloud-bigquery
2.28.0

```

2. Linux and Windows
3. JDK 8.202

#### Steps to reproduce

Issue is random, can't reproduce reliably. The writes are batched to 1-2k rows and 99% they work.

The control panel shows no errors. None of the quotas show up as exceeded. I get no exceptions and response.getInsertErrors() is always null. The issue seems to happen when doing intensive writes, as less batches per minute of the same size work fine.

Any ideas what's wrong? thank you.

#### Code example

```java
GoogleCredential credential = new GoogleCredential.Builder().setTransport(new NetHttpTransport())
.setJsonFactory(new JacksonFactory())
.setClientSecrets("clientId", "clientSecret")
.build()
.setFromTokenResponse(new TokenResponse().setRefreshToken("refreshToken");

Bigquery bigquery = new Bigquery.Builder(new NetHttpTransport(), new JacksonFactory(), credential)
.setApplicationName("name").build();

List rowList = new ArrayList();

TableRow rowWrapper = new TableRow();
rowWrapper.set("date", item.GetDate());
rowWrapper.set("value", item.GetValue());

TableDataInsertAllRequest.Rows insertRowRequest = new TableDataInsertAllRequest.Rows();

rowList.add(insertRowRequest);

TableDataInsertAllRequest content = new TableDataInsertAllRequest().setRows(rowList);

InsertAll op = bigquery.tabledata().insertAll("project", "dataset", "table", content);

TableDataInsertAllResponse response = op.execute();
if (response.getInsertErrors() == null)
{
; // all good
}
// example

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.