You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mh...@apache.org on 2025/01/21 13:04:50 UTC

(asterixdb) branch master updated: [NO ISSUE]: Fix failing CloudStorageGCSTest

This is an automated email from the ASF dual-hosted git repository.

mhubail pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 88b1086079 [NO ISSUE]: Fix failing CloudStorageGCSTest
88b1086079 is described below

commit 88b10860798c13e2a362a0394cf126c06eaed7f0
Author: Savyasach Reddy <sa...@couchbase.com>
AuthorDate: Tue Jan 21 13:09:59 2025 +0530

    [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 <je...@fulliautomatix.ics.uci.edu>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Murtadha Hubail <mh...@apache.org>
---
 asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf    | 1 -
 .../java/org/apache/asterix/cloud/clients/google/gcs/GCSWriter.java   | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

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 325143962a..9b6f5477cb 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.anonymous.auth=true
 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 a95a9d9236..89d8fd549a 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 @@ public class GCSWriter implements ICloudWriter {
         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();
         }