Skip to content

Commit 26d407d

Browse files
committed
PR feedback
1 parent 5096a9e commit 26d407d

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

packages/dart/lib/src/network/parse_network_retry.dart

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,21 @@ part of '../../parse_server_sdk.dart';
2727
/// This retry mechanism is applied to ALL HTTP methods including POST and PUT.
2828
/// While GET and DELETE are generally safe to retry, POST and PUT operations
2929
/// may cause duplicate operations if the original request succeeded but the
30-
/// response was lost or corrupted. Consider this when using retry intervals
31-
/// with operations that modify server state.
32-
///
33-
/// In most Parse Server scenarios, this is acceptable because:
34-
/// - Parse uses optimistic locking with object versions
35-
/// - Many Parse operations are idempotent by design
36-
/// - Retries only occur on network-level failures (status -1), not on
37-
/// successful operations that return Parse error codes
30+
/// response was lost or corrupted.
31+
///
32+
/// **Parse Server does not provide automatic optimistic locking or built-in
33+
/// idempotency guarantees for POST/PUT operations.** Retrying these methods
34+
/// can result in duplicate data creation or unintended state changes.
35+
///
36+
/// To mitigate retry risks for critical operations:
37+
/// - Implement application-level idempotency keys or version tracking
38+
/// - Disable retries for create/update operations by setting
39+
/// `ParseCoreData().restRetryIntervals = []` before critical calls
40+
/// - Use Parse's experimental `X-Parse-Request-Id` header (if available)
41+
/// with explicit duplicate detection in your application logic
42+
///
43+
/// Note: Retries only occur on network-level failures (status -1), not on
44+
/// successful operations that return Parse error codes
3845
///
3946
/// Example:
4047
///

0 commit comments

Comments
 (0)