Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Commit 195b938

Browse files
V1.3.8 upgrade (#52)
* working on adding v1.3.8 support * finished upgrade to Akka.NET v1.3.8 * disabled sequential access=on per #53 * Update RELEASE_NOTES.md * update release date
1 parent 5d372f0 commit 195b938

File tree

10 files changed

+34
-17
lines changed

10 files changed

+34
-17
lines changed

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#### 1.3.8 July 6 2018 ####
2+
Upgraded to support Akka.NET 1.3.8 and to take advantage of some performance improvements that have been added to Akka.Persistence for loading large snapshots, which you can read more about here: https://github.com/akkadotnet/akka.net/issues/3422
3+
4+
Note that this feature is currently disabled by default in Akka.Persistence.PostgreSql due to https://github.com/AkkaNetContrib/Akka.Persistence.PostgreSql/issues/53
5+
16
#### 1.3.1 September 11 2017 ####
27
Support for Akka.NET 1.3, .NET Standard 1.6, and the first stable RTM release of Akka.Persistence.
38

src/Akka.Persistence.PostgreSql.Tests/Akka.Persistence.PostgreSql.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Akka.Persistence.Sql.Common" Version="1.3.2" />
11-
<PackageReference Include="Akka.Persistence.Sql.TestKit" Version="1.3.2" />
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170425-07" />
10+
<PackageReference Include="Akka.Persistence.Sql.Common" Version="1.3.8" />
11+
<PackageReference Include="Akka.Persistence.Sql.TestKit" Version="1.3.8" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
1313
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.2" />
1414
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="1.1.2" />
1515
<PackageReference Include="Npgsql" Version="3.2.5" />

src/Akka.Persistence.PostgreSql.Tests/PostgreSqlConfigSpec.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public void Should_PostgreSql_journal_has_default_config()
3131
Assert.Equal("metadata", config.GetString("metadata-table-name"));
3232
Assert.False(config.GetBoolean("auto-initialize"));
3333
Assert.Equal("Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common", config.GetString("timestamp-provider"));
34+
Assert.False(config.GetBoolean("sequential-access"));
3435
}
3536

3637
[Fact]
@@ -49,6 +50,7 @@ public void Should_PostgreSql_snapshot_has_default_config()
4950
Assert.Equal("public", config.GetString("schema-name"));
5051
Assert.Equal("snapshot_store", config.GetString("table-name"));
5152
Assert.False(config.GetBoolean("auto-initialize"));
53+
Assert.False(config.GetBoolean("sequential-access"));
5254
}
5355
}
5456
}

src/Akka.Persistence.PostgreSql/Akka.Persistence.PostgreSql.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Akka" Version="1.3.2" />
24-
<PackageReference Include="Akka.Persistence" Version="1.3.2" />
25-
<PackageReference Include="Akka.Persistence.Sql.Common" Version="1.3.2" />
26-
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
23+
<PackageReference Include="Akka.Persistence.Sql.Common" Version="1.3.8" />
2724
<PackageReference Include="Npgsql" Version="3.2.5" />
2825
</ItemGroup>
2926

src/Akka.Persistence.PostgreSql/Journal/PostgreSqlJournal.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public PostgreSqlJournal(Config journalConfig) : base(journalConfig)
4747
serializerIdColumnName: "serializer_id",
4848
timeout: config.GetTimeSpan("connection-timeout"),
4949
storedAs: storedAs,
50-
defaultSerializer: config.GetString("serializer")),
50+
defaultSerializer: config.GetString("serializer"),
51+
useSequentialAccess: config.GetBoolean("sequential-access")),
5152
Context.System.Serialization,
5253
GetTimestampProvider(config.GetString("timestamp-provider")));
5354

src/Akka.Persistence.PostgreSql/Journal/PostgreSqlQueryExecutor.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,11 @@ public PostgreSqlQueryConfiguration(
191191
TimeSpan timeout,
192192
StoredAsType storedAs,
193193
string defaultSerializer,
194-
JsonSerializerSettings jsonSerializerSettings = null)
194+
JsonSerializerSettings jsonSerializerSettings = null,
195+
bool useSequentialAccess = true)
195196
: base(schemaName, journalEventsTableName, metaTableName, persistenceIdColumnName, sequenceNrColumnName,
196-
payloadColumnName, manifestColumnName, timestampColumnName, isDeletedColumnName, tagsColumnName, orderingColumn, serializerIdColumnName, timeout, defaultSerializer)
197+
payloadColumnName, manifestColumnName, timestampColumnName, isDeletedColumnName, tagsColumnName, orderingColumn,
198+
serializerIdColumnName, timeout, defaultSerializer, useSequentialAccess)
197199
{
198200
StoredAs = storedAs;
199201
JsonSerializerSettings = jsonSerializerSettings ?? new JsonSerializerSettings

src/Akka.Persistence.PostgreSql/Snapshot/PostgreSqlQueryExecutor.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ public PostgreSqlQueryConfiguration(
173173
TimeSpan timeout,
174174
StoredAsType storedAs,
175175
string defaultSerializer,
176-
JsonSerializerSettings jsonSerializerSettings = null)
177-
: base(schemaName, snapshotTableName, persistenceIdColumnName, sequenceNrColumnName, payloadColumnName, manifestColumnName, timestampColumnName, serializerIdColumnName, timeout, defaultSerializer)
176+
JsonSerializerSettings jsonSerializerSettings = null,
177+
bool useSequentialAccess = true)
178+
: base(schemaName, snapshotTableName, persistenceIdColumnName, sequenceNrColumnName, payloadColumnName,
179+
manifestColumnName, timestampColumnName, serializerIdColumnName, timeout, defaultSerializer, useSequentialAccess)
178180
{
179181
StoredAs = storedAs;
180182
JsonSerializerSettings = jsonSerializerSettings ?? new JsonSerializerSettings

src/Akka.Persistence.PostgreSql/Snapshot/PostgreSqlSnapshotStore.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public PostgreSqlSnapshotStore(Config snapshotConfig) : base(snapshotConfig)
4141
serializerIdColumnName: "serializer_id",
4242
timeout: config.GetTimeSpan("connection-timeout"),
4343
storedAs: storedAs,
44-
defaultSerializer: config.GetString("serializer")),
44+
defaultSerializer: config.GetString("serializer"),
45+
useSequentialAccess: config.GetBoolean("sequential-access")),
4546
Context.System.Serialization);
4647

4748
SnapshotSettings = new PostgreSqlSnapshotStoreSettings(config);

src/Akka.Persistence.PostgreSql/postgresql.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333

3434
# Postgres data type for payload column. Allowed options: bytea, json, jsonb
3535
stored-as = bytea
36+
37+
# Setting used to toggle sequential read access when loading large objects
38+
# from journals and snapshot stores.
39+
sequential-access = off
3640
}
3741
}
3842

@@ -61,6 +65,10 @@
6165

6266
# should corresponding journal table be initialized automatically
6367
auto-initialize = off
68+
69+
# Setting used to toggle sequential read access when loading large objects
70+
# from journals and snapshot stores.
71+
sequential-access = off
6472
}
6573
}
6674
}

src/common.props

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<Copyright>Copyright © 2013-2017 Akka.NET Team</Copyright>
44
<Authors>Akka.NET Team</Authors>
5-
<VersionPrefix>1.3.1</VersionPrefix>
5+
<VersionPrefix>1.3.8</VersionPrefix>
66
<PackageIconUrl>http://getakka.net/images/akkalogo.png</PackageIconUrl>
77
<PackageProjectUrl>https://github.com/AkkaNetContrib/Akka.Persistence.PostgreSql</PackageProjectUrl>
88
<PackageLicenseUrl>https://github.com/AkkaNetContrib/Akka.Persistence.PostgreSql/blob/master/LICENSE</PackageLicenseUrl>
@@ -12,7 +12,7 @@
1212
<NoWarn>$(NoWarn);CS1591</NoWarn>
1313
</PropertyGroup>
1414
<PropertyGroup>
15-
<XunitVersion>2.3.0-beta5-*</XunitVersion>
15+
<XunitVersion>2.3.1</XunitVersion>
1616
</PropertyGroup>
1717
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
1818
<Reference Include="System.Data" />
@@ -28,7 +28,6 @@
2828
</PackageReference>
2929
</ItemGroup>
3030
<PropertyGroup>
31-
<PackageReleaseNotes>
32-
</PackageReleaseNotes>
31+
<PackageReleaseNotes>Upgraded to support Akka.NET 1.3.8 and to take advantage of some performance improvements that have been added to Akka.Persistence for loading large snapshots, which you can read more about here: https://github.com/akkadotnet/akka.net/issues/3422</PackageReleaseNotes>
3332
</PropertyGroup>
3433
</Project>

0 commit comments

Comments
 (0)