introducer client uses cache even if it doesn't have to #2859
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#2859
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello, I'm at 33c3 with str4d discussing the introducer client. He's report a connectivity ordering problem in #2858 however this also brought our attention to the currenct introducer client implementation: the introducer client connects to the cached storage servers even if the introducer is available. Is this a bug?
Shouldn't the introducer client try and fail to connect to the introducer before using the introducer cache and connecting to the cache storage node addresses?
the introducer client's startService calls self._load_announcements() which loads the cache AND then calls _deliver_announcements which starts eventually connecting to all the storage nodes.
i could write a patch to fix this but i want to make sure it's the right thing to do.
thoughts?
Huh. Looking at the code (
IntroducerClient.startService
), it looks like it will only read from the cache (_load_announcements
) if a singlegetReference
fails (via the errback toconnect_failed
). If that initial connection succeeds, there's no addCallback, so nothing will ever read from the cache.Specifically, it looks like we start a Reconnector (
tub.connectTo()
), then immediately start a normaltub.getReference()
to the same FURL. If/when the Reconnector succeeds, we'll eventually overwrite the cache file. If/when the normal connector fails, we'll load the cache.Both of those are supposed to use the same connection attempt. I'm not sure which service will be
startService
d first. If the Tub is running beforeIntroducerClient.startService
is called, then theconnectTo
should create the outbound connection, and thegetReference
should wait for it to complete (success or failure). If the Tub isn't running by that point, then bothconnectTo
andgetReference
will be queued, and then maybe the order in which they trigger outbound connections will be unpredictable. But the second one is still supposed to not start a second independent connection: it should see that a connection is already in progress, and attach itself to wait for the results of that one.i was very sleepy at 33c3 when i was last looking at this and indeed i was mistaken.