>From Murtadha Hubail <[email protected]>:

Murtadha Hubail has submitted this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19346 )

Change subject: [NO ISSUE]: Fix failing CloudStorageGCSTest
......................................................................

[NO ISSUE]: Fix failing CloudStorageGCSTest

- user model changes: no
- storage format changes: no
- interface changes: no

details:
- cc-cloud-storage-gcs.conf has been misconfigured to use
  5 bytes instead of 5MB
- Avoid unncessary cast to int

Change-Id: Ideb99ab281964cd7380695b8554bb0b4d61af51f
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19346
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Murtadha Hubail <[email protected]>
---
M asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
M 
asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/google/gcs/GCSWriter.java
2 files changed, 24 insertions(+), 3 deletions(-)

Approvals:
  Murtadha Hubail: Looks good to me, approved
  Jenkins: Verified; Verified
  Anon. E. Moose #1000171:




diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf 
b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
index 3251439..9b6f547 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
@@ -73,4 +73,3 @@
 cloud.storage.cache.policy=selective
 cloud.max.write.requests.per.second=1000
 cloud.max.read.requests.per.second=5000
-cloud.write.buffer.size=5
diff --git 
a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/google/gcs/GCSWriter.java
 
b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/google/gcs/GCSWriter.java
index a95a9d9..89d8fd5 100644
--- 
a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/google/gcs/GCSWriter.java
+++ 
b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/google/gcs/GCSWriter.java
@@ -66,8 +66,8 @@
         guardian.checkIsolatedWriteAccess(bucket, path);
         // The GCS library triggers a new upload when its internal buffer is 
full, not on each call to writer.write().
         // uploadsToBeTriggered estimates upload count, and we acquire 
matching tokens from the limiter.
-        int uploadsToBeTriggered =
-                (int) ((writtenBytes + page.remaining()) / writeBufferSize) - 
(int) (writtenBytes / writeBufferSize);
+        long uploadsToBeTriggered =
+                ((writtenBytes + page.remaining()) / writeBufferSize) - 
(writtenBytes / writeBufferSize);
         while (uploadsToBeTriggered-- > 0) {
             profiler.objectMultipartUpload();
         }

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19346
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Ideb99ab281964cd7380695b8554bb0b4d61af51f
Gerrit-Change-Number: 19346
Gerrit-PatchSet: 2
Gerrit-Owner: Savyasach Reddy <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-MessageType: merged

Reply via email to