Skip to content

Commit 9bd94ba

Browse files
authored
Rename the deprecated ActorAddress naming to DA-style ActorID (#946)
* reviving them docs * hide StashBuffer - not needed in DA world * hide SerializationPoolSettings, will be exposed via tagging in future * some more docs; hide NodeDeathWatcherError * listings topics * hide: traversal apis, resolve actor refs * Rename ActorAddress -> ActorID * fix snippet only built on CI
1 parent f5441b0 commit 9bd94ba

File tree

133 files changed

+3599
-2762
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+3599
-2762
lines changed

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ var dependencies: [Package.Dependency] = [
208208
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.7.0"),
209209

210210
// ~~~ backtraces ~~~
211+
// TODO: optimally, library should not pull swift-backtrace
211212
.package(url: "https://github.com/swift-server/swift-backtrace.git", from: "1.1.1"),
212213

213214
// ~~~ Swift Collections ~~~

Protos/ActorAddress.proto renamed to Protos/ActorID.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift Distributed Actors open source project
44
//
5-
// Copyright (c) 2018-2019 Apple Inc. and the Swift Distributed Actors project authors
5+
// Copyright (c) 2018-2022 Apple Inc. and the Swift Distributed Actors project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -17,10 +17,11 @@ syntax = "proto3";
1717
option optimize_for = SPEED;
1818
option swift_prefix = "_Proto";
1919

20-
message ActorAddress {
21-
UniqueNode node = 1; // TODO oneof { senderNode | recipientNode | node }
20+
message ActorID {
21+
UniqueNode node = 1;
2222
ActorPath path = 2;
2323
uint32 incarnation = 3;
24+
// TODO: encode tags
2425
}
2526

2627
message ActorPath {

Protos/Clocks/VersionVector.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syntax = "proto3";
1818
option optimize_for = SPEED;
1919
option swift_prefix = "_Proto";
2020

21-
import "ActorAddress.proto";
21+
import "ActorID.proto";
2222
import "Serialization/Serialization.proto";
2323

2424
// ==== Replica ID -----------------------------------------------------------------------------------------------------
@@ -30,7 +30,7 @@ message ActorIdentity {
3030

3131
message VersionReplicaID {
3232
oneof value {
33-
ActorAddress actorAddress = 1;
33+
ActorID actorID = 1;
3434
UniqueNode uniqueNode = 2;
3535
uint64 uniqueNodeID = 3;
3636
}

Protos/Cluster/Cluster.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syntax = "proto3";
1818
option optimize_for = SPEED;
1919
option swift_prefix = "_Proto";
2020

21-
import "ActorAddress.proto";
21+
import "ActorID.proto";
2222
import "Cluster/ClusterEvents.proto";
2323

2424
message ClusterShellMessage {

Protos/Cluster/ClusterEvents.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syntax = "proto3";
1818
option optimize_for = SPEED;
1919
option swift_prefix = "_Proto";
2020

21-
import "ActorAddress.proto";
21+
import "ActorID.proto";
2222
import "Cluster/Membership.proto";
2323

2424
message ClusterEvent {

Protos/Cluster/Membership.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syntax = "proto3";
1818
option optimize_for = SPEED;
1919
option swift_prefix = "_Proto";
2020

21-
import "ActorAddress.proto";
21+
import "ActorID.proto";
2222
import "Clocks/VersionVector.proto";
2323

2424
message ClusterMembership {
@@ -68,4 +68,4 @@ message ClusterMembershipSeenTable {
6868
message ClusterMembershipSeenTableRow {
6969
uint64 uniqueNodeID = 1;
7070
VersionVector version = 2;
71-
}
71+
}

Protos/Cluster/SWIM/SWIM.proto

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syntax = "proto3";
1818
option optimize_for = SPEED;
1919
option swift_prefix = "_Proto";
2020

21-
import "ActorAddress.proto";
21+
import "ActorID.proto";
2222

2323
message SWIMRemoteMessage {
2424
oneof message {
@@ -29,27 +29,27 @@ message SWIMRemoteMessage {
2929
}
3030

3131
message SWIMPing {
32-
ActorAddress origin = 1;
32+
ActorID origin = 1;
3333
SWIMGossipPayload payload = 2;
3434
uint32 sequenceNumber = 3;
3535
}
3636

3737
message SWIMPingRequest {
38-
ActorAddress target = 1;
39-
ActorAddress origin = 2;
38+
ActorID target = 1;
39+
ActorID origin = 2;
4040
SWIMGossipPayload payload = 3;
4141
uint32 sequenceNumber = 4;
4242
}
4343

4444
message SWIMPingResponse {
4545
message Ack {
46-
ActorAddress target = 1;
46+
ActorID target = 1;
4747
uint64 incarnation = 2;
4848
SWIMGossipPayload payload = 3;
4949
uint32 sequenceNumber = 4;
5050
}
5151
message Nack {
52-
ActorAddress target = 1;
52+
ActorID target = 1;
5353
uint32 sequenceNumber = 2;
5454
}
5555
oneof pingResponse {
@@ -73,7 +73,7 @@ message SWIMStatus {
7373
}
7474

7575
message SWIMMember {
76-
ActorAddress address = 1;
76+
ActorID id = 1;
7777
SWIMStatus status = 2;
7878
uint64 protocolPeriod = 3;
7979
}

Protos/SystemMessages.proto

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syntax = "proto3";
1818
option optimize_for = SPEED;
1919
option swift_prefix = "_Proto";
2020

21-
import "ActorAddress.proto";
21+
import "ActorID.proto";
2222

2323
// ==== System Message -------------------------------------------------------------------------------------------------
2424

@@ -31,19 +31,19 @@ message SystemMessage {
3131
}
3232

3333
message SystemMessage_Watch {
34-
ActorAddress watchee = 1;
35-
ActorAddress watcher = 2;
34+
ActorID watchee = 1;
35+
ActorID watcher = 2;
3636
}
3737

3838
message SystemMessage_Unwatch {
39-
ActorAddress watchee = 1;
40-
ActorAddress watcher = 2;
39+
ActorID watchee = 1;
40+
ActorID watcher = 2;
4141
}
4242

4343
message SystemMessage_Terminated {
44-
ActorAddress ref = 1;
44+
ActorID ref = 1;
4545
bool existenceConfirmed = 2;
46-
bool addressTerminated = 3;
46+
bool idTerminated = 3;
4747
}
4848

4949
// ==== Redelivery -----------------------------------------------------------------------------------------------------

Protos/WireProtocol.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syntax = "proto3";
1818
option optimize_for = SPEED;
1919
option swift_prefix = "_Proto";
2020

21-
import "ActorAddress.proto";
21+
import "ActorID.proto";
2222
import "Serialization/Serialization.proto";
2323

2424
// ==== Handshake ------------------------------------------------------------------------------------------------------
@@ -57,7 +57,7 @@ message HandshakeReject {
5757
// ==== Envelope -------------------------------------------------------------------------------------------------------
5858

5959
message Envelope {
60-
ActorAddress recipient = 1;
60+
ActorID recipient = 1;
6161

6262
Manifest manifest = 2;
6363
bytes payload = 3;

Sources/ActorSingletonPlugin/ActorSingleton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ internal struct BoxedActorSingleton: AnyActorSingleton {
8989
extension ActorSingleton: AnyActorSingleton {
9090
func stop(_ system: ClusterSystem) {
9191
// Hand over the singleton gracefully
92-
let resolveContext = ResolveContext<ActorSingletonManager<Message>.Directive>(address: ._singletonManager(name: self.settings.name, on: system.cluster.uniqueNode), system: system)
92+
let resolveContext = ResolveContext<ActorSingletonManager<Message>.Directive>(id: ._singletonManager(name: self.settings.name, on: system.cluster.uniqueNode), system: system)
9393
let managerRef = system._resolve(context: resolveContext)
9494
// If the manager is not running this will end up in dead-letters but that's fine
9595
managerRef.tell(.stop)

0 commit comments

Comments
 (0)