Skip to content

Conversation

@KodaiD
Copy link
Contributor

@KodaiD KodaiD commented Dec 2, 2025

Description

This PR fixes the option issue specific to Object Storage adapter.

The current code does not pass the threshold option value properly to the client in S3 adapter. Additionally, option names have a '-' character, which is inconsistent with other options.

Related issues and/or PRs

Changes made

  • Updated Object Storage configs to use '_' instead of '-' in option names.
  • Updated S3Wrapper to register the threshold option value.

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

Fixed option issues in Object Storage adapter.

@KodaiD KodaiD self-assigned this Dec 2, 2025
@KodaiD KodaiD added the bugfix label Dec 2, 2025
@KodaiD
Copy link
Contributor Author

KodaiD commented Dec 2, 2025

/gemini review

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@KodaiD KodaiD marked this pull request as ready for review December 2, 2025 03:46
Copilot AI review requested due to automatic review settings December 2, 2025 03:46
Copilot finished reviewing on behalf of KodaiD December 2, 2025 03:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses configuration naming inconsistencies and fixes a missing threshold option registration in the S3 adapter. The changes standardize configuration property keys to use underscores instead of hyphens across all object storage adapters (S3, Blob Storage, and Cloud Storage).

Key Changes:

  • Renamed configuration properties from hyphenated format (e.g., parallel_upload_block_size_in_bytes) to simplified underscore format (e.g., multipart_upload_part_size_bytes for S3, parallel_upload_block_size_bytes for Blob Storage)
  • Fixed S3Wrapper to properly register the multipart upload threshold option with the S3 client (lines 53-55 in S3Wrapper.java)
  • Updated CloudStorageConfig and BlobStorageConfig to use STORAGE_NAME_IN_PREFIX constant for configuration key prefixes, replacing hyphens with underscores

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
core/src/main/java/com/scalar/db/storage/objectstorage/s3/S3Config.java Updated constant names from PARALLEL_UPLOAD_*_IN_BYTES to MULTIPART_UPLOAD_*_BYTES and REQUEST_TIMEOUT_IN_SECONDS to REQUEST_TIMEOUT_SECS; renamed corresponding fields and methods
core/src/main/java/com/scalar/db/storage/objectstorage/s3/S3Wrapper.java Added missing threshold configuration registration (lines 53-55); updated method calls to use renamed config getters
core/src/main/java/com/scalar/db/storage/objectstorage/blobstorage/BlobStorageConfig.java Introduced STORAGE_NAME_IN_PREFIX constant using underscores; renamed constants from *_IN_BYTES to *_BYTES and *_IN_SECONDS to *_SECS; updated fields and methods accordingly
core/src/main/java/com/scalar/db/storage/objectstorage/blobstorage/BlobStorageWrapper.java Updated field name from requestTimeoutInSeconds to requestTimeoutSecs and updated all references to renamed config methods
core/src/main/java/com/scalar/db/storage/objectstorage/cloudstorage/CloudStorageConfig.java Introduced STORAGE_NAME_IN_PREFIX constant; renamed PARALLEL_UPLOAD_BLOCK_SIZE_IN_BYTES to UPLOAD_CHUNK_SIZE_BYTES and renamed field/method accordingly
core/src/main/java/com/scalar/db/storage/objectstorage/cloudstorage/CloudStorageWrapper.java Renamed field from parallelUploadBlockSizeInBytes to uploadMaxChunkSizeBytes and updated references to renamed config methods
core/src/test/java/com/scalar/db/storage/objectstorage/s3/S3ConfigTest.java Updated test constants and assertions to use new configuration property names
core/src/test/java/com/scalar/db/storage/objectstorage/blobstorage/BlobStorageConfigTest.java Updated test constants and assertions to use new configuration property names
core/src/test/java/com/scalar/db/storage/objectstorage/cloudstorage/CloudStorageConfigTest.java Updated test constants and assertions to use new configuration property names
core/src/test/java/com/scalar/db/storage/objectstorage/cloudstorage/CloudStorageWrapperTest.java Updated mock setup to call renamed getUploadChunkSizeBytes() method
core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageWrapperLargeObjectWriteIntegrationTest.java Updated property setters to use new constant names; renamed local variables for clarity
core/src/integration-test/java/com/scalar/db/storage/objectstorage/ObjectStorageEnv.java Updated property setters to use new constant names across all storage adapters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KodaiD KodaiD requested review from a team, Torch3333, brfrn169, feeblefakie and komamitsu and removed request for a team December 2, 2025 06:15
Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@feeblefakie
Copy link
Contributor

@KodaiD Can you check the CI failure?

@brfrn169 brfrn169 merged commit 4318570 into master Dec 4, 2025
139 of 140 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants