Skip to content

Commit 438e1b8

Browse files
committed
Recover RESYNC delta under a flag
Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org>
1 parent 76fdeaf commit 438e1b8

6 files changed

Lines changed: 385 additions & 216 deletions

File tree

.github/workflows/manual-deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ on:
1616
default: "latest"
1717
type: string
1818
description: "Docker tag (quay.io)"
19+
resync-with-delta:
20+
required: false
21+
type: boolean
22+
default: false
23+
description: "Enable targeted delta for resync responses (instead of always STATE_FULL)"
1924

2025
jobs:
2126
deployment:
@@ -32,3 +37,5 @@ jobs:
3237
serviceName: "pulse-server"
3338
env: ${{ inputs.deployment-environment }}
3439
token: ${{ secrets.GITHUB_TOKEN }}
40+
env:
41+
Peers__ResyncWithDelta: ${{ inputs.resync-with-delta }}

docker-compose.debug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ services:
1111
environment:
1212
DOTNET_ENVIRONMENT: Development
1313
Logging__LogLevel__Default: Debug
14+
Peers__ResyncWithDelta: false
1415
cap_add:
1516
- SYS_PTRACE
1617
security_opt:

src/DCLPulse/Peers/PeerOptions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ public sealed class PeerOptions
2929
/// Tier index (0, 1, 2) used for self-mirror updates, controlling update frequency and field detail.
3030
/// </summary>
3131
public int SelfMirrorTier { get; set; }
32+
33+
/// <summary>
34+
/// When enabled, resync responses attempt a targeted delta from the client's
35+
/// known baseline before falling back to STATE_FULL.
36+
/// </summary>
37+
public bool ResyncWithDelta { get; set; }
3238
}

src/DCLPulse/Peers/PeersManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected override Task ExecuteAsync(CancellationToken stoppingToken)
110110
var simulation = new PeerSimulation(
111111
areaOfInterest, snapshotBoard, spatialGrid, identityBoard,
112112
messagePipe, peerOptions.SimulationSteps, timeProvider, transport, profileBoard, peerSimulationLogger,
113-
peerOptions.SelfMirrorEnabled, peerOptions.SelfMirrorTier);
113+
peerOptions.SelfMirrorEnabled, peerOptions.SelfMirrorTier, peerOptions.ResyncWithDelta);
114114

115115
int idx = i;
116116

0 commit comments

Comments
 (0)