make maxOpenFiles configurable for AWSFactory
@@ -18,7 +18,6 @@ import (
const (
defaultAWSReadLimit = 1024
- awsMaxOpenFiles = 8192
awsMaxTables = 128
)
@@ -34,14 +33,14 @@ type AWSStoreFactory struct {
// NewAWSStoreFactory returns a ChunkStore factory that vends NomsBlockStore
// instances that store manifests in the named DynamoDB table, and chunk data
// in the named S3 bucket. All connections to AWS services share |sess|.
-func NewAWSStoreFactory(sess *session.Session, table, bucket string, indexCacheSize, tableCacheSize uint64, tableCacheDir string) chunks.Factory {
+func NewAWSStoreFactory(sess *session.Session, table, bucket string, maxOpenFiles int, indexCacheSize, tableCacheSize uint64, tableCacheDir string) chunks.Factory {
var indexCache *indexCache
if indexCacheSize > 0 {
indexCache = newIndexCache(indexCacheSize)
}
var tc *fsTableCache
if tableCacheSize > 0 {
- tc = newFSTableCache(tableCacheDir, tableCacheSize, awsMaxOpenFiles)
+ tc = newFSTableCache(tableCacheDir, tableCacheSize, maxOpenFiles)
}
return &AWSStoreFactory{
