Migrate AWS S3 Storage from s3lite to MinIO Client and Enhance Error Handling #4212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This pull request modernizes Dynmap's AWS S3 storage implementation by migrating from the unsupported
s3lite
library to the robust MinIO Java client. The changes include comprehensive error handling, support for path-style S3 access, and significant improvements in reliability and maintainability.🚀 Major Improvements
1. Library Migration
s3lite
library (unsupported, JAXB dependency issues)2. Enhanced S3 Compatibility
path_style_access
configuration3. Robust Error Handling
📋 Change Summary
Key Modified Files
DynmapCore/src/main/java/org/dynmap/storage/aws_s3/AWSS3MapStorage.java
DynmapCore/build.gradle
Configuration Files (All Platforms)
path_style_access: false
optionSupported Platforms
🔧 Configuration Changes
New S3 Configuration Options
When to Use Path-Style Access
🛡️ Enhanced Error Handling
Previous (s3lite)
After (MinIO, with enhanced handling)
Error Handling Features
📊 Performance Impact
JAR File Size
Due to the inclusion of MinIO and its dependencies, the JAR size has increased to approximately 30MB, with no easy way around this currently.
Memory Usage
🧪 Testing Recommendations
Test Scenarios
Normal Operations
Error Scenarios
Configuration Variations
Validation Steps
🔄 Migration Guide
Existing Users
No action needed — all current configurations remain compatible.
For New S3-Compatible Services
Add path style configuration if needed:
🐛 Bug Fixes
Issues Resolved
NoClassDefFoundError
at runtimeError Scenarios Addressed
📚 Dependencies
Removed
Added
📑 Code Quality
Improvements
Coding Style
🚦 Compatibility
Backward Compatibility
Forward Compatibility
Testing
Conducted on PaperMC 1.20.1.
Ready for review and testing! 🚀
Reviewers
Please focus on:
AWSS3MapStorage.java
build.gradle