Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TTLs, indexing from Aux config #134

Merged
merged 2 commits into from
Jun 1, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix Aux Collection config
  • Loading branch information
bartelink committed Jun 1, 2019
commit 8eca935ffa80c4a2a0c47443137bd667d2286284
7 changes: 3 additions & 4 deletions src/Equinox.Cosmos/Cosmos.fs
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,9 @@ function sync(req, expectedVersion, maxEvents) {
| Some log -> log.Information("Created stored procedure {sprocId} in {ms}ms rc={ru}", sprocName, (let e = t.Elapsed in e.TotalMilliseconds), ru) }
let private createAuxCollectionIfNotExists (client: Client.DocumentClient) (dbName,collName) mode : Async<unit> =
let def = DocumentCollection(Id = collName)
// for now, we are leaving the default IndexingPolicy mode wrt fields to index and in which manner as default: autoindexing all fields
def.IndexingPolicy.IndexingMode <- IndexingMode.Lazy
// Expire Projector documentId to Kafka offsets mapping records after one year
def.DefaultTimeToLive <- Nullable (365 * 60 * 60 * 24)
// TL;DR no indexing of any kind; see https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet/issues/142
def.IndexingPolicy.Automatic <- false
def.IndexingPolicy.IndexingMode <- IndexingMode.None
createOrProvisionCollection client (dbName,def) mode
let init log (client: Client.DocumentClient) (dbName,collName) mode skipStoredProc = async {
do! createOrProvisionDatabase client dbName mode
Expand Down