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

Commit db61c6a

Browse files
committed
Merge branch '1.x'
# Conflicts: # .ldrelease/config.yml # CHANGELOG.md # src/LaunchDarkly.ServerSdk.Redis.StrongName/LaunchDarkly.ServerSdk.Redis.StrongName.csproj # src/LaunchDarkly.ServerSdk.Redis/LaunchDarkly.ServerSdk.Redis.csproj # src/LaunchDarkly.ServerSdk.Redis/RedisFeatureStore.cs
2 parents 352461b + 9b0615c commit db61c6a

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.ldrelease/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ template:
2020
- test # tests require Redis - run them only in CI
2121

2222
documentation:
23-
title: LaunchDarkly SDK Redis Integration
23+
title: LaunchDarkly .NET SDK Redis Integration
2424
githubPages: true

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ This version of `LaunchDarkly.ServerSdk.Redis` requires version 5.14 or higher o
1919
### Removed:
2020
- The `ResponseTimeout` configuration property, which is no longer supported by `StackExchange.Redis`.
2121

22+
## [1.2.1] - 2021-06-01
23+
### Fixed:
24+
- The library was not fully compliant with the standard usage of Redis keys by other LaunchDarkly SDKs and by the Relay Proxy, as follows: although feature flag data was stored with the correct keys, the wrong key was used for the special value that indicates that the database has been initialized. As a result, if the Relay Proxy had stored data in Redis, the .NET SDK would not detect it, and if the .NET SDK had stored data in Redis, other SDKs might not detect it.
25+
2226
## [1.2.0] - 2021-01-26
2327
### Added:
2428
- New classes `LaunchDarkly.Client.Integrations.Redis` and `LaunchDarkly.Client.Integrations.RedisDataStoreBuilder`, which serve the same purpose as the previous classes but are designed to work with the newer persistent data store API introduced in .NET SDK 5.14.0.

src/LaunchDarkly.ServerSdk.Redis/RedisFeatureStore.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using Common.Logging;
44
using LaunchDarkly.Client.Utils;
@@ -13,6 +13,7 @@ internal sealed class RedisFeatureStoreCore : IFeatureStoreCore
1313

1414
private readonly ConnectionMultiplexer _redis;
1515
private readonly string _prefix;
16+
private readonly string _initedKey;
1617

1718
// This is used for unit testing only
1819
private Action _updateHook;
@@ -30,12 +31,13 @@ Action updateHook
3031

3132
_prefix = prefix;
3233
_updateHook = updateHook;
34+
_initedKey = prefix + ":$inited";
3335
}
3436

3537
public bool InitializedInternal()
3638
{
3739
IDatabase db = _redis.GetDatabase();
38-
return db.KeyExists(_prefix);
40+
return db.KeyExists(_initedKey);
3941
}
4042

4143
public void InitInternal(IDictionary<IVersionedDataKind, IDictionary<string, IVersionedData>> items)
@@ -54,7 +56,7 @@ public void InitInternal(IDictionary<IVersionedDataKind, IDictionary<string, IVe
5456
// transaction. We don't need to await them.
5557
}
5658
}
57-
txn.StringSetAsync(_prefix, "");
59+
txn.StringSetAsync(_initedKey, "");
5860
txn.Execute();
5961
}
6062

0 commit comments

Comments
 (0)