Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/db: Drop indexes for outgoing data to force refresh (ref #9496) #9502

Merged
merged 1 commit into from Apr 8, 2024

Conversation

calmh
Copy link
Member

@calmh calmh commented Apr 8, 2024

Purpose

Resend our indexes since we fixed that index-sending issue.

I made a new thing to only drop the non-local-device index IDs, i.e., those for other devices. This means we will see a mismatch and resend all indexes, but they will not. This is somewhat cleaner as it avoids resending everything twice when two devices are upgraded, and in any case, we have no reason to force a resend of incoming indexes here.

Testing

It happens on my computer...

@calmh calmh requested a review from imsodin April 8, 2024 06:43
Comment on lines -133 to +140
if err := miscDB.PutInt64("dbVersion", m.schemaVersion); err != nil && err == nil {
if err := miscDB.PutInt64("dbVersion", m.schemaVersion); err != nil {
return err
}
if err := miscDB.PutString("dbMinSyncthingVersion", m.minSyncthingVersion); err != nil && err == nil {
if err := miscDB.PutString("dbMinSyncthingVersion", m.minSyncthingVersion); err != nil {
return err
}
if err := miscDB.PutInt64("dbMigrationVersion", m.migrationVersion); err != nil && err == nil {
if err := miscDB.PutInt64("dbMigrationVersion", m.migrationVersion); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:(

@calmh calmh merged commit 61b94b9 into syncthing:main Apr 8, 2024
21 checks passed
@calmh calmh deleted the dropoutgoingindexes branch April 8, 2024 13:14
calmh added a commit to calmh/syncthing that referenced this pull request May 9, 2024
* main: (45 commits)
  build: Use Go 1.22.3 at minimum
  build: Use Go 1.22.3 at minimum
  gui: Add Hindi (hi) translation template (syncthing#9530)
  gui, man, authors: Update docs, translations, and contributors
  lib/connections: Add syncthing_connections_active metric (fixes syncthing#9527) (syncthing#9528)
  etc: Use 7MiB buffer size (syncthing#9524)
  gui: Fix Firefox bookmark favicon (fixes syncthing#9506) (syncthing#9507)
  gui, man, authors: Update docs, translations, and contributors
  gui, man, authors: Update docs, translations, and contributors
  gui, man, authors: Update docs, translations, and contributors
  lib/nat: Don't crash on empty address list (fixes syncthing#9503) (syncthing#9504)
  lib/db: Drop indexes for outgoing data to force refresh (ref syncthing#9496) (syncthing#9502)
  gui: Fix missing link to device editor for names with superscript (ref syncthing#9472) (syncthing#9494)
  lib/db: Hold update lock while taking snapshot (syncthing#9496)
  build: Update dependencies (syncthing#9497)
  gui, man, authors: Update docs, translations, and contributors
  gui, man, authors: Update docs, translations, and contributors
  Removed no longer relevant Bountysource link (syncthing#9480)
  lib/api: Missing return after HTTP error
  lib/api: Extract session store (syncthing#9425)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants