diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java index fa00248cdc..a7c33a4450 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java @@ -130,7 +130,11 @@ private Message buildMessage(JSONObject json) // Backend cache for GetWriteStream schema staleness can be 30 seconds, wait a bit before // trying to get the table schema to increase the chance of succeed. This is to avoid // client's invalid data caused storm of GetWriteStream. - Thread.sleep(3500); + LOG.warning( + "Saw Json unknown field " + + ex.getFieldName() + + ", try to refresh the writer with updated schema"); + Thread.sleep(35000); GetWriteStreamRequest writeStreamRequest = GetWriteStreamRequest.newBuilder() .setName(this.streamName)