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

Fix auto-initialize default value in default configuration #212

Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/Akka.Persistence.MongoDb.Tests/MongoDbSettingsSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void Mongo_JournalSettings_must_have_default_values()
var mongoPersistence = MongoDbPersistence.Get(Sys);

mongoPersistence.JournalSettings.ConnectionString.Should().Be(string.Empty);
mongoPersistence.JournalSettings.AutoInitialize.Should().BeFalse();
mongoPersistence.JournalSettings.AutoInitialize.Should().BeTrue();
mongoPersistence.JournalSettings.Collection.Should().Be("EventJournal");
mongoPersistence.JournalSettings.MetadataCollection.Should().Be("Metadata");
mongoPersistence.JournalSettings.LegacySerialization.Should().BeFalse();
Expand All @@ -31,7 +31,7 @@ public void Mongo_SnapshotStoreSettingsSettings_must_have_default_values()
var mongoPersistence = MongoDbPersistence.Get(Sys);

mongoPersistence.SnapshotStoreSettings.ConnectionString.Should().Be(string.Empty);
mongoPersistence.SnapshotStoreSettings.AutoInitialize.Should().BeFalse();
mongoPersistence.SnapshotStoreSettings.AutoInitialize.Should().BeTrue();
mongoPersistence.SnapshotStoreSettings.Collection.Should().Be("SnapshotStore");
mongoPersistence.SnapshotStoreSettings.LegacySerialization.Should().BeFalse();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Akka.Persistence.MongoDb/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
connection-string = ""

# should corresponding journal table's indexes be initialized automatically
auto-initialize = off
auto-initialize = on
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to enable this for snapshots too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


# dispatcher used to drive journal actor
plugin-dispatcher = "akka.actor.default-dispatcher"
Expand Down Expand Up @@ -37,7 +37,7 @@
connection-string = ""

# should corresponding snapshot's indexes be initialized automatically
auto-initialize = off
auto-initialize = on

# dispatcher used to drive snapshot storage actor
plugin-dispatcher = "akka.actor.default-dispatcher"
Expand Down