Marcus B Spencer
801ef0e22d
fix(beacon): don't join multicast groups on non-multicast interfaces ( fixes #10497 ) ( #10498 )
...
fix(beacon): don't join multicast groups on non-multicast interfaces
Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us >
2025-12-18 08:58:06 +01:00
Marcus B Spencer
e5dfd2c549
chore(beacon): more verbose debug logging ( #10496 )
...
Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us >
2025-12-17 15:04:47 +00:00
Marcus B Spencer
655b4568c1
fix(fs): only apply case option to fakefs in stress test ( #10440 )
...
Fixes a regression introduced in #10439 , mentioned in [a comment](https://github.com/syncthing/syncthing/pull/10439#issuecomment-3436515824 ) made by @imsodin:
> That might not be the greatest way to do this, but nevertheless it afaik means that the benchmarks now do case checking once when it shouldn't happen at all, and twice otherwise.
Benchmarks do approximately as well as before the regression, and I think most of them are random chance:
```
│ ../oldold.txt │ ../new.txt │
│ sec/op │ sec/op vs base │
WalkCaseFakeFS100k/rawfs-8 654.6m ± 1% 652.6m ± 3% ~ (p=0.971 n=10)
WalkCaseFakeFS100k/casefs-8 1.049 ± 2% 1.071 ± 3% ~ (p=0.190 n=10)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 1.053 ± 3% 1.081 ± 5% ~ (p=0.165 n=10)
geomean 897.7m 910.8m +1.46%
│ ../oldold.txt │ ../new.txt │
│ B/entry │ B/entry vs base │
WalkCaseFakeFS100k/rawfs-8 1.274Ki ± 0% 1.274Ki ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-8 1.771Ki ± 0% 1.771Ki ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 1.772Ki ± 0% 1.772Ki ± 0% ~ (p=1.000 n=10) ¹
geomean 1.587Ki 1.587Ki +0.00%
¹ all samples are equal
│ ../oldold.txt │ ../new.txt │
│ DirNames/entry │ DirNames/entry vs base │
WalkCaseFakeFS100k/rawfs-8 512.5m ± 0% 512.5m ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-8 1.025 ± 0% 1.025 ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 1.025 ± 0% 1.025 ± 0% ~ (p=1.000 n=10) ¹
geomean 813.5m 813.5m +0.00%
¹ all samples are equal
│ ../oldold.txt │ ../new.txt │
│ DirNames/op │ DirNames/op vs base │
WalkCaseFakeFS100k/rawfs-8 51.25k ± 0% 51.25k ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-8 102.5k ± 0% 102.5k ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 102.5k ± 0% 102.5k ± 0% ~ (p=1.000 n=10) ¹
geomean 81.35k 81.35k +0.00%
¹ all samples are equal
│ ../oldold.txt │ ../new.txt │
│ Lstat/entry │ Lstat/entry vs base │
WalkCaseFakeFS100k/rawfs-8 5.535 ± 0% 5.535 ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-8 5.535 ± 0% 5.535 ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 5.540 ± 0% 5.540 ± 0% ~ (p=1.000 n=10) ¹
geomean 5.537 5.537 +0.00%
¹ all samples are equal
│ ../oldold.txt │ ../new.txt │
│ Lstat/op │ Lstat/op vs base │
WalkCaseFakeFS100k/rawfs-8 553.5k ± 0% 553.5k ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-8 553.5k ± 0% 553.5k ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 554.0k ± 0% 554.0k ± 0% ~ (p=1.000 n=10) ¹
geomean 553.7k 553.7k +0.00%
¹ all samples are equal
│ ../oldold.txt │ ../new.txt │
│ allocs/entry │ allocs/entry vs base │
WalkCaseFakeFS100k/rawfs-8 19.00 ± 0% 19.00 ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-8 35.35 ± 0% 35.35 ± 0% ~ (p=1.000 n=10) ¹
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 35.38 ± 0% 35.38 ± 0% ~ (p=1.000 n=10) ¹
geomean 28.75 28.75 +0.00%
¹ all samples are equal
│ ../oldold.txt │ ../new.txt │
│ sec/entry │ sec/entry vs base │
WalkCaseFakeFS100k/rawfs-8 4.328µ ± 1% 4.315µ ± 3% ~ (p=0.971 n=10)
WalkCaseFakeFS100k/casefs-8 6.936µ ± 2% 7.082µ ± 3% ~ (p=0.171 n=10)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 6.965µ ± 3% 7.147µ ± 5% ~ (p=0.165 n=10)
geomean 5.935µ 6.022µ +1.46%
│ ../oldold.txt │ ../new.txt │
│ B/op │ B/op vs base │
WalkCaseFakeFS100k/rawfs-8 188.3Mi ± 0% 188.3Mi ± 0% -0.00% (p=0.006 n=10)
WalkCaseFakeFS100k/casefs-8 261.5Mi ± 0% 261.5Mi ± 0% ~ (p=0.142 n=10)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 261.7Mi ± 0% 261.7Mi ± 0% ~ (p=0.315 n=10)
geomean 234.4Mi 234.4Mi -0.00%
│ ../oldold.txt │ ../new.txt │
│ allocs/op │ allocs/op vs base │
WalkCaseFakeFS100k/rawfs-8 2.873M ± 0% 2.873M ± 0% -0.00% (p=0.026 n=10)
WalkCaseFakeFS100k/casefs-8 5.346M ± 0% 5.346M ± 0% ~ (p=0.136 n=10)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 5.351M ± 0% 5.351M ± 0% ~ (p=0.305 n=10)
geomean 4.348M 4.348M -0.00%
```
Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us >
2025-10-23 13:12:03 -05:00
Marcus B Spencer
c6a887865f
fix(fs): apply case option to fakefs in casefs tests ( #10439 )
...
Required for the casefs tests/benchmarks to test the casefs.
Benchmarks do significantly worse (as expected).
```
│ ../old.txt │ ../new.txt │
│ sec/op │ sec/op vs base │
WalkCaseFakeFS100k/rawfs-8 626.5m ± 5% 993.4m ± 1% +58.56% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 1.011 ± 1% 1.425 ± 1% +40.94% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 1.014 ± 2% 1.439 ± 1% +41.97% (p=0.002 n=6)
geomean 862.9m 1.268 +46.94%
│ ../old.txt │ ../new.txt │
│ B/entry │ B/entry vs base │
WalkCaseFakeFS100k/rawfs-8 1.274Ki ± 0% 1.766Ki ± 0% +38.54% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 1.771Ki ± 0% 2.354Ki ± 0% +32.98% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 1.772Ki ± 0% 2.356Ki ± 0% +32.95% (p=0.002 n=6)
geomean 1.587Ki 2.140Ki +34.80%
│ ../old.txt │ ../new.txt │
│ DirNames/entry │ DirNames/entry vs base │
WalkCaseFakeFS100k/rawfs-8 512.5m ± 0% 1025.0m ± 0% +100.00% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 1.025 ± 0% 1.537 ± 0% +49.95% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 1.025 ± 0% 1.537 ± 0% +49.95% (p=0.002 n=6)
geomean 813.5m 1.343 +65.06%
│ ../old.txt │ ../new.txt │
│ DirNames/op │ DirNames/op vs base │
WalkCaseFakeFS100k/rawfs-8 51.25k ± 0% 102.49k ± 0% +100.00% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 102.5k ± 0% 153.7k ± 0% +50.00% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 102.5k ± 0% 153.7k ± 0% +50.00% (p=0.002 n=6)
geomean 81.35k 134.3k +65.10%
│ ../old.txt │ ../new.txt │
│ allocs/entry │ allocs/entry vs base │
WalkCaseFakeFS100k/rawfs-8 19.00 ± 0% 35.35 ± 0% +86.05% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 35.35 ± 0% 54.40 ± 0% +53.89% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 35.38 ± 0% 54.46 ± 0% +53.93% (p=0.002 n=6)
geomean 28.75 47.14 +63.95%
│ ../old.txt │ ../new.txt │
│ sec/entry │ sec/entry vs base │
WalkCaseFakeFS100k/rawfs-8 4.143µ ± 5% 6.568µ ± 1% +58.55% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 6.686µ ± 1% 9.424µ ± 1% +40.95% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 6.703µ ± 2% 9.517µ ± 1% +41.97% (p=0.002 n=6)
geomean 5.705µ 8.383µ +46.94%
│ ../old.txt │ ../new.txt │
│ B/op │ B/op vs base │
WalkCaseFakeFS100k/rawfs-8 188.3Mi ± 0% 260.8Mi ± 0% +38.51% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 261.5Mi ± 0% 347.7Mi ± 0% +32.98% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 261.7Mi ± 0% 348.0Mi ± 0% +32.96% (p=0.002 n=6)
geomean 234.4Mi 316.0Mi +34.79%
│ ../old.txt │ ../new.txt │
│ allocs/op │ allocs/op vs base │
WalkCaseFakeFS100k/rawfs-8 2.873M ± 0% 5.346M ± 0% +86.04% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-8 5.346M ± 0% 8.228M ± 0% +53.91% (p=0.002 n=6)
WalkCaseFakeFS100k/casefs-otherOpEvery1000-8 5.351M ± 0% 8.236M ± 0% +53.92% (p=0.002 n=6)
geomean 4.348M 7.129M +63.96%
```
Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us >
2025-10-23 08:40:42 +00:00
Marcus B Spencer
b4565c87ee
fix(fs): store getExpireAdd mutex in caseCache ( fixes #9836 ) ( #10430 )
...
In #9701 there was a change that put the mutex used for `getExpireAdd` directly in `defaultRealCaser`, which is erroneous because multiple filesystems can share the same `caseCache`.
### Purpose
Fixes #9836 and [Slow sync sending files from Android](https://forum.syncthing.net/t/slow-sync-sending-files-from-android/24208?u=marbens ). There may be other issues caused by `getExpireAdd` conflicting with itself, though.
### Testing
Unit tests pass and the case cache and conflict detection _seem_ to behave correctly.
Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us >
2025-10-18 21:56:03 +02:00
Marcus B Spencer
d3d3fc2d0e
fix(policy): only allow approvals by non-author contributors ( #10419 )
...
This replaces `allow_contributor` with `allow_non_author_contributor`,
because the former allows authors to approve their own pull requests.
From https://github.com/syncthing/syncthing/pull/9818#issue-2651431707 :
> This adds `allow_contributor: true` which allows approvals by contributors to the PR (*but still not the author themself*, which is a different thing).
This statement conflicts with [the policybot README](https://github.com/palantir/policy-bot/blob/c013552248d2a99911207fa5c0045428ac073fa2/README.md ), which says:
> If true, the approvals of someone who has committed to the pull request are
> considered when calculating the status.
> *The pull request author is considered a contributor.*
Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us >
2025-10-06 08:42:58 +02:00
Marcus B Spencer
54bb987fae
chore(config): remove fallback STUN servers that are CNAMEs to stun.counterpath.com ( #10219 )
...
ref
https://forum.syncthing.net/t/my-local-dns-server-technitium-is-getting-spammed-with-stun-lookups-that-are-failing/24627/2?u=marbens
### Purpose
Reduces unnecessary load on CounterPath's server(s).
### Testing
STUN is still functional, and appears to get the correct external ports,
if enabled.
2025-07-24 13:55:42 +02:00
Marcus B Spencer
32a913c0ff
refactor(beacon, osutil, upnp, netutil): only use anet on Android ( #10211 )
...
Add a wrapper that uses anet on Android, but net on other platforms.
### Purpose
Fixes
https://forum.syncthing.net/t/workaround-for-android-local-discovery/20403/12
### Testing
Run two Syncthing instances with Global Discovery disabled. Pair them
with each other, don't hardcode their addresses, and verify they
connect.
2025-07-08 08:18:51 +02:00
Marcus B Spencer
4c64843d60
feat(connections, nat): add UDP portmapping/pinhole for QUIC ( fixes #7403 ) ( #10171 )
...
Fixes #7403 .
Tested by enabling UPnP on the router, and checking on the router page
that the external ports of the UDP mappings match what is shown in the
logs and the internal ports matching the QUIC listening port.
2025-06-20 04:24:45 +00:00
Marcus B Spencer and Jakob Borg
4215058911
fix(gui): don't show dial errors for paused devices ( fixes #10166 ) ( #10167 )
...
### Purpose
Fixes the problem where paused devices show errors from dials from
previous disconnections (#10166 ).
### Testing
Tested manually by reproducing using the steps in the mentioned issue.
### Screenshots
Before:

After:

Co-authored-by: Jakob Borg <jakob@kastelo.net >
2025-06-09 05:38:07 +00:00
Marcus B Spencer and Jakob Borg
8c3d2f3bc5
fix(config): mark audit log options as needing restart ( fixes #10099 ) ( #10100 )
...
### Testing
Change the `auditEnabled` option and you should get a prompt in the Web
GUI.
Restart and change the `auditFile` option, and you should get that same
prompt.
The prompt you should get is shown in the screenshots below.
### Screenshots

Co-authored-by: Jakob Borg <jakob@kastelo.net >
2025-05-09 10:49:11 +00:00
Marcus B Spencer
190dff142c
feat(config): add option for audit file ( fixes #9481 ) ( #10066 )
2025-04-23 22:32:23 +07:00