Skip to content

Commit f3d0b62

Browse files
author
Richard Bennett
committed
Adds a partition key to the reminders table, to resolve OrleansContrib#22
1 parent 81ab49c commit f3d0b62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Orleans.Reminders.CosmosDB/CosmosDBReminderTable.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Orleans.Reminders.CosmosDB
1818
{
1919
internal class CosmosDBReminderTable : IReminderTable
2020
{
21+
private const string PARTITION_KEY = "/GrainId";
2122
private const string READ_RANGE_ROW_SPROC = "ReadRangeRows";
2223
private const string READ_ROW_SPROC = "ReadRow";
2324
private const string READ_ROWS_SPROC = "ReadRows";
@@ -278,7 +279,7 @@ private async Task TryCreateCosmosDBResources()
278279
{
279280
Id = this._options.Collection
280281
};
281-
282+
remindersCollection.PartitionKey.Paths.Add(PARTITION_KEY);
282283
remindersCollection.IndexingPolicy.IndexingMode = IndexingMode.Consistent;
283284
remindersCollection.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/*" });
284285
remindersCollection.IndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/StartAt/*" });

0 commit comments

Comments
 (0)