Skip to content

Commit bf2aa60

Browse files
SNOW-3215001 defaultCrlDownloadMaxSize of 20MB instead of 200 (snowflakedb#1735)
### Description * Reduced the default `CrlDownloadMaxSize` from 200MB to 20MB, as the previous value was set too high and could cause out-of-memory issues. * Fixed related documentation and comments. ### Checklist - [x] Added proper logging (if possible) - [x] Created tests which fail without the change (if possible) - [x] Extended the README / documentation, if necessary
1 parent 0b6ef6c commit bf2aa60

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Upcoming Release
44

5+
Bug fixes:
6+
7+
- Fixed default `CrlDownloadMaxSize` to be 20MB instead of 200MB, as the previous value was set too high and could cause out-of-memory issues (snowflakedb/gosnowflake#1735)
8+
59
Internal changes:
610

711
- Moved configuration to a dedicated internal package (snowflakedb/gosnowflake#1720).
@@ -12,7 +16,7 @@ Breaking changes:
1216

1317
- Removed `RaisePutGetError` from `SnowflakeFileTransferOptions` - current behaviour is aligned to always raise errors for PUT/GET operations (snowflakedb/gosnowflake#1690).
1418
- Removed `GetFileToStream` from `SnowflakeFileTransferOptions` - using `WithFileGetStream` automatically enables file streaming for GETs (snowflakedb/gosnowflake#1690).
15-
- Renamed `WithFileStream` to `WithFilePutStream` for consistency (snowflakedb/gosnowflake#1690).
19+
- Renamed `WithFileStream` to `WithFilePutStream` for consistency (snowflakedb/gosnowflake#1690).
1620
- `Array` function now returns error for unsupported types (snowflakedb/gosnowflake#1693).
1721
- `WithMultiStatement` does not return error anymore (snowflakedb/gosnowflake#1693).
1822
- `WithOriginalTimestamp` is removed, use `WithArrowBatchesTimestampOption(UseOriginalTimestamp)` instead (snowflakedb/gosnowflake#1693).

crl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const (
156156
defaultCrlHTTPClientTimeout = 10 * time.Second
157157
defaultCrlCacheValidityTime = 24 * time.Hour
158158
defaultCrlOnDiskCacheRemovalDelay = 7 * time.Hour
159-
defaultCrlDownloadMaxSize = 200 * 1024 * 1024 // 200 MB
159+
defaultCrlDownloadMaxSize = 20 * 1024 * 1024 // 20 MB
160160
)
161161

162162
func (cv *crlValidator) verifyPeerCertificates(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ The following connection parameters are supported:
143143
144144
- crlOnDiskCacheDisabled: set to disable on-disk caching of CRLs (on-disk cache may help with cold starts).
145145
146-
- crlDownloadMaxSize: maximum size (in bytes) of a CRL to download. Default is 200MB.
146+
- crlDownloadMaxSize: maximum size (in bytes) of a CRL to download. Default is 20MB.
147147
148148
- SNOWFLAKE_CRL_ON_DISK_CACHE_DIR (environment variable): set to customize the directory for on-disk caching of CRLs.
149149

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ type Config struct {
107107
CrlAllowCertificatesWithoutCrlURL Bool // Allow certificates (not short-lived) without CRL DP included to be treated as correct ones
108108
CrlInMemoryCacheDisabled bool // Should the in-memory cache be disabled
109109
CrlOnDiskCacheDisabled bool // Should the on-disk cache be disabled
110-
CrlDownloadMaxSize int // Max size in bytes of CRL to download. 0 means no limit. Default is 0.
110+
CrlDownloadMaxSize int // Max size in bytes of CRL to download. 0 means use default (20MB).
111111
CrlHTTPClientTimeout time.Duration // Timeout for HTTP client used to download CRL
112112

113113
ConnectionDiagnosticsEnabled bool // Indicates whether connection diagnostics should be enabled

0 commit comments

Comments
 (0)