Skip to content

Commit 59045a5

Browse files
committed
clarify why/when the old cursor API will fail
1 parent 5c61a7a commit 59045a5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/NRedisStack/Search/ISearchCommands.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public interface ISearchCommands
107107
/// <param name="cursorId">The cursor's ID.</param>
108108
/// <returns><see langword="true"/> if it has been deleted, <see langword="false"/> if it did not exist.</returns>
109109
/// <remarks><seealso href="https://redis.io/commands/ft.cursor-del/"/></remarks>
110-
[Obsolete("When possible, use CursorDel(AggregationResult) instead.")]
110+
[Obsolete("When possible, use CursorDel(AggregationResult) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
111111
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
112112
bool CursorDel(string indexName, long cursorId);
113113

@@ -127,7 +127,7 @@ public interface ISearchCommands
127127
/// <param name="count">Limit the amount of returned results.</param>
128128
/// <returns>A AggregationResult object with the results</returns>
129129
/// <remarks><seealso href="https://redis.io/commands/ft.cursor-read/"/></remarks>
130-
[Obsolete("When possible, use AggregateEnumerable or CursorRead(AggregationResult, int?) instead.")]
130+
[Obsolete("When possible, use AggregateEnumerable or CursorRead(AggregationResult, int?) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
131131
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
132132
AggregationResult CursorRead(string indexName, long cursorId, int? count = null);
133133

src/NRedisStack/Search/ISearchCommandsAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public interface ISearchCommandsAsync
108108
/// <param name="cursorId">The cursor's ID.</param>
109109
/// <returns><see langword="true"/> if it has been deleted, <see langword="false"/> if it did not exist.</returns>
110110
/// <remarks><seealso href="https://redis.io/commands/ft.cursor-del/"/></remarks>
111-
[Obsolete("When possible, use CursorDelAsync(AggregationResult, int?) instead.")]
111+
[Obsolete("When possible, use CursorDelAsync(AggregationResult, int?) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
112112
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
113113
Task<bool> CursorDelAsync(string indexName, long cursorId);
114114

@@ -128,7 +128,7 @@ public interface ISearchCommandsAsync
128128
/// <param name="count">Limit the amount of returned results.</param>
129129
/// <returns>A AggregationResult object with the results</returns>
130130
/// <remarks><seealso href="https://redis.io/commands/ft.cursor-read/"/></remarks>
131-
[Obsolete("When possible, use AggregateAsyncEnumerable or CursorReadAsync(AggregationResult, int?) instead.")]
131+
[Obsolete("When possible, use AggregateAsyncEnumerable or CursorReadAsync(AggregationResult, int?) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
132132
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
133133
Task<AggregationResult> CursorReadAsync(string indexName, long cursorId, int? count = null);
134134

src/NRedisStack/Search/SearchCommands.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public bool Create(string indexName, Schema schema)
120120
}
121121

122122
/// <inheritdoc/>
123-
[Obsolete("When possible, use CursorDel(AggregationResult) instead.")]
123+
[Obsolete("When possible, use CursorDel(AggregationResult) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
124124
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
125125
public bool CursorDel(string indexName, long cursorId)
126126
{
@@ -144,7 +144,7 @@ public bool CursorDel(AggregationResult result)
144144
}
145145

146146
/// <inheritdoc/>
147-
[Obsolete("When possible, use CusorReadEnumerable or CursorRead(AggregationResult, int?) instead.")]
147+
[Obsolete("When possible, use CusorReadEnumerable or CursorRead(AggregationResult, int?) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
148148
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
149149
public AggregationResult CursorRead(string indexName, long cursorId, int? count = null)
150150
{

src/NRedisStack/Search/SearchCommandsAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public async Task<bool> CreateAsync(string indexName, Schema schema)
161161
}
162162

163163
/// <inheritdoc/>
164-
[Obsolete("When possible, use CursorDelAsync(AggregationResult, int?) instead.")]
164+
[Obsolete("When possible, use CursorDelAsync(AggregationResult, int?) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
165165
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
166166
public async Task<bool> CursorDelAsync(string indexName, long cursorId)
167167
{
@@ -185,7 +185,7 @@ public async Task<bool> CursorDelAsync(AggregationResult result)
185185
}
186186

187187
/// <inheritdoc/>
188-
[Obsolete("When possible, use AggregateAsyncEnumerable or CursorReadAsync(AggregationResult, int?) instead.")]
188+
[Obsolete("When possible, use AggregateAsyncEnumerable or CursorReadAsync(AggregationResult, int?) instead. This legacy API will not work correctly on CLUSTER environments, but will continue to work for single-node deployments.")]
189189
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
190190
public async Task<AggregationResult> CursorReadAsync(string indexName, long cursorId, int? count = null)
191191
{

0 commit comments

Comments
 (0)