Make S3 upload part size configurable (#26533)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
931abcb24e
Коммит
bc6182229b
@@ -122,7 +122,9 @@ const (
|
||||
|
||||
SqlSettingsDefaultDataSource = "postgres://mmuser:mostest@localhost/mattermost_test?sslmode=disable&connect_timeout=10&binary_parameters=yes"
|
||||
|
||||
FileSettingsDefaultDirectory = "./data/"
|
||||
FileSettingsDefaultDirectory = "./data/"
|
||||
FileSettingsDefaultS3UploadPartSizeBytes = 5 * 1024 * 1024 // 5MB
|
||||
FileSettingsDefaultS3ExportUploadPartSizeBytes = 100 * 1024 * 1024 // 100MB
|
||||
|
||||
ImportSettingsDefaultDirectory = "./import"
|
||||
ImportSettingsDefaultRetentionDays = 30
|
||||
@@ -1579,6 +1581,7 @@ type FileSettings struct {
|
||||
AmazonS3SSE *bool `access:"environment_file_storage,write_restrictable,cloud_restrictable"`
|
||||
AmazonS3Trace *bool `access:"environment_file_storage,write_restrictable,cloud_restrictable"`
|
||||
AmazonS3RequestTimeoutMilliseconds *int64 `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
AmazonS3UploadPartSizeBytes *int64 `access:"environment_file_storage,write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
// Export store settings
|
||||
DedicatedExportStore *bool `access:"environment_file_storage,write_restrictable"`
|
||||
ExportDriverName *string `access:"environment_file_storage,write_restrictable"`
|
||||
@@ -1595,6 +1598,7 @@ type FileSettings struct {
|
||||
ExportAmazonS3Trace *bool `access:"environment_file_storage,write_restrictable"`
|
||||
ExportAmazonS3RequestTimeoutMilliseconds *int64 `access:"environment_file_storage,write_restrictable"` // telemetry: none
|
||||
ExportAmazonS3PresignExpiresSeconds *int64 `access:"environment_file_storage,write_restrictable"` // telemetry: none
|
||||
ExportAmazonS3UploadPartSizeBytes *int64 `access:"environment_file_storage,write_restrictable"` // telemetry: none
|
||||
}
|
||||
|
||||
func (s *FileSettings) SetDefaults(isUpdate bool) {
|
||||
@@ -1703,6 +1707,10 @@ func (s *FileSettings) SetDefaults(isUpdate bool) {
|
||||
s.AmazonS3RequestTimeoutMilliseconds = NewInt64(30000)
|
||||
}
|
||||
|
||||
if s.AmazonS3UploadPartSizeBytes == nil {
|
||||
s.AmazonS3UploadPartSizeBytes = NewInt64(FileSettingsDefaultS3UploadPartSizeBytes)
|
||||
}
|
||||
|
||||
if s.DedicatedExportStore == nil {
|
||||
s.DedicatedExportStore = NewBool(false)
|
||||
}
|
||||
@@ -1764,6 +1772,10 @@ func (s *FileSettings) SetDefaults(isUpdate bool) {
|
||||
if s.ExportAmazonS3PresignExpiresSeconds == nil {
|
||||
s.ExportAmazonS3PresignExpiresSeconds = NewInt64(21600) // 6h
|
||||
}
|
||||
|
||||
if s.ExportAmazonS3UploadPartSizeBytes == nil {
|
||||
s.ExportAmazonS3UploadPartSizeBytes = NewInt64(FileSettingsDefaultS3ExportUploadPartSizeBytes)
|
||||
}
|
||||
}
|
||||
|
||||
type EmailSettings struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user