From b9874563907cd713b251ba3822b78c4900ed5631 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Sun, 23 Apr 2023 18:47:35 +0200 Subject: [PATCH] remove maxStoreIndexSize option from create-version-store-index command --- commands/cmd_createversionstoreindex.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/commands/cmd_createversionstoreindex.go b/commands/cmd_createversionstoreindex.go index 07a4f843..20fe619f 100644 --- a/commands/cmd_createversionstoreindex.go +++ b/commands/cmd_createversionstoreindex.go @@ -16,8 +16,7 @@ func createVersionStoreIndex( s3EndpointResolverURI string, sourceFilePath string, versionLocalStoreIndexPath string, - storeIndexCachePath string, - maxStoreIndexSize int64) ([]longtailutils.StoreStat, []longtailutils.TimeStat, error) { + storeIndexCachePath string) ([]longtailutils.StoreStat, []longtailutils.TimeStat, error) { const fname = "createVersionStoreIndex" log := logrus.WithFields(logrus.Fields{ "fname": fname, @@ -27,7 +26,6 @@ func createVersionStoreIndex( "sourceFilePath": sourceFilePath, "versionLocalStoreIndexPath": versionLocalStoreIndexPath, "storeIndexCachePath": storeIndexCachePath, - "maxStoreIndexSize": maxStoreIndexSize, }) log.Info(fname) @@ -39,7 +37,7 @@ func createVersionStoreIndex( jobs := longtaillib.CreateBikeshedJobAPI(uint32(numWorkerCount), 0) defer jobs.Dispose() - indexStore, err := remotestore.CreateBlockStoreForURI(blobStoreURI, storeIndexCachePath, maxStoreIndexSize, nil, jobs, numWorkerCount, 8388608, 1024, remotestore.ReadOnly, false, longtailutils.WithS3EndpointResolverURI(s3EndpointResolverURI)) + indexStore, err := remotestore.CreateBlockStoreForURI(blobStoreURI, storeIndexCachePath, -1, nil, jobs, numWorkerCount, 8388608, 1024, remotestore.ReadOnly, false, longtailutils.WithS3EndpointResolverURI(s3EndpointResolverURI)) if err != nil { return storeStats, timeStats, errors.Wrap(err, fname) } @@ -96,7 +94,6 @@ type CreateVersionStoreIndexCmd struct { SourceUriOption VersionLocalStoreIndexPathOption StoreIndexCachePathOption - MaxStoreIndexSizeOption } func (r *CreateVersionStoreIndexCmd) Run(ctx *Context) error { @@ -106,8 +103,7 @@ func (r *CreateVersionStoreIndexCmd) Run(ctx *Context) error { r.S3EndpointResolverURL, r.SourcePath, r.VersionLocalStoreIndexPath, - r.StoreIndexCachePath, - r.MaxStoreIndexSize) + r.StoreIndexCachePath) ctx.StoreStats = append(ctx.StoreStats, storeStats...) ctx.TimeStats = append(ctx.TimeStats, timeStats...) return err