You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Sort registrations by version from oldest to newest so that they are processed in order.
475
483
// Otherwise, if we process a newer version (i.e., with bigger sequence number) first, older
476
484
// versions will be dropped because they are considered "seen".
477
-
letregistrations=(self.storage.registrations(forKey: key)??[]).sorted{ l, r in l.version < r.version }
485
+
letregistrations=(self.storage.registrations(forKey: key)??[]).sorted{ l, r in l.version < r.version } // FIXME: use ordered set or Deque now that we have them
// self.instrumentation.listingPublished(key: key, subscribers: subscriptions.count, registrations: registrations.count) // TODO(distributed): make the instrumentation calls compatible with distributed actor based types
480
496
forsubscriptionin subscriptions {
497
+
self.log.notice("Offering registrations to subscription: \(subscription))", metadata:[
// assert(self.id.path.description.contains("/system/receptionist"), "Receptionist path did not include /system/receptionist, was: \(self.id.fullDescription)")
655
672
guardlet __secretlyKnownToBeLocal =selfelse{return} // FIXME: we need `local`
letremainingRegistrations= registrations.filter{ registration in
308
+
letremainingRegistrations= registrations._filter{ registration in // FIXME(collections): missing type preserving filter on OrderedSet https://github.com/apple/swift-collections/pull/159
308
309
registration.actorID.uniqueNode != node
309
310
}
310
311
if !remainingRegistrations.isEmpty {
@@ -327,6 +328,16 @@ internal final class DistributedReceptionistStorage {
327
328
}
328
329
}
329
330
331
+
/// - returns: `true` if the value was a newly inserted value, `false` otherwise
0 commit comments