chore(protocol): minor cleanup of ClusterConfig messages; remove DisableTempIndexes option (#10202)

This makes a couple of backwards compatible changes to the
ClusterConfig:

- Remove the `ignore_permissions` and `ignore_delete` booleans which
we've never read or used for anything
- Remove the `disable_temp_indexes` boolean and option entirely. We did
use this one, and about 1% of users have set the option. The only thing
it does is inhibits sending of periodical DownloadProgress messages
while downloading data, which is a minuscule bandwidth optimisation
given that we're already sending data at the time.
- Change the `read_only` boolean (which indicated send-only folders) to
an enum `FolderType`, where the values zero and one match the existing
usage. Again, we don't actually use this value, but I can see that we
might want to and then it makes more sense for it to be more
comprehensive.
- Change the `paused` boolean to an enum `StopReason`, where zero
indicates not stopped and one indicates paused, exactly the same wire
representation as previously but leaves space for additional stop
reasons (errors etc).
This commit is contained in:
Jakob Borg
2025-06-29 10:18:51 +02:00
committed by GitHub
parent f2a5b62733
commit 95187bcc64
13 changed files with 523 additions and 420 deletions
+4 -4
View File
@@ -1118,7 +1118,7 @@ func TestRequestIndexSenderPause(t *testing.T) {
// Remote paused
cc := basicClusterConfig(device1, myID, fcfg.ID)
cc.Folders[0].Paused = true
cc.Folders[0].StopReason = protocol.FolderStopReasonPaused
m.ClusterConfig(fc, cc)
seq++
@@ -1139,7 +1139,7 @@ func TestRequestIndexSenderPause(t *testing.T) {
// Remote unpaused
cc.Folders[0].Paused = false
cc.Folders[0].StopReason = protocol.FolderStopReasonRunning
m.ClusterConfig(fc, cc)
select {
case <-time.After(5 * time.Second):
@@ -1164,12 +1164,12 @@ func TestRequestIndexSenderPause(t *testing.T) {
// Local and remote paused, then first resume remote, then local
cc.Folders[0].Paused = true
cc.Folders[0].StopReason = protocol.FolderStopReasonPaused
m.ClusterConfig(fc, cc)
pauseFolder(t, m.cfg, fcfg.ID, true)
cc.Folders[0].Paused = false
cc.Folders[0].StopReason = protocol.FolderStopReasonRunning
m.ClusterConfig(fc, cc)
pauseFolder(t, m.cfg, fcfg.ID, false)