Skip to content

[Fixes #625] Error flushing memcached in restore#621

Merged
etj merged 1 commit into
GeoNode:masterfrom
Valyrian-Code:fix/restore-memcached-flush
Jun 10, 2026
Merged

[Fixes #625] Error flushing memcached in restore#621
etj merged 1 commit into
GeoNode:masterfrom
Valyrian-Code:fix/restore-memcached-flush

Conversation

@Valyrian-Code

Copy link
Copy Markdown
Contributor

Problem

The post-restore cleanup runs:

echo echo "flush_all" | nc -q 1 memcached 11211

The doubled echo sends the literal string echo flush_all to memcached, which isn't a valid command — memcached replies ERROR and the cache is never actually flushed. Stale entries can survive a restore until they expire.

Fix

Drop the duplicated echo so the intended flush_all command is sent:

echo "flush_all" | nc -q 1 memcached 11211

Verification

  • sh -n restore.sh passes.
  • echo echo "flush_all" emits echo flush_all; echo "flush_all" emits flush_all — confirming the byte stream sent to memcached.

Note

This is independent of #618 (which modernizes create_tile_layersgwc create on line 76); this touches only the memcached flush on line 92.

The post-restore cleanup ran 'echo echo "flush_all" | nc ... memcached',
which sends the literal string 'echo flush_all' to memcached. That is not a
valid command, so memcached replies ERROR and the cache is never flushed.
Drop the duplicated echo so the intended 'flush_all' command is sent.
Copilot AI review requested due to automatic review settings June 9, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@etj etj changed the title Fix no-op memcached cache flush in restore.sh Error flushing memcached in restore Jun 10, 2026
@etj etj changed the title Error flushing memcached in restore [Fixes #625] Error flushing memcached in restore Jun 10, 2026
@etj etj linked an issue Jun 10, 2026 that may be closed by this pull request
@etj etj self-assigned this Jun 10, 2026
@etj etj requested a review from Copilot June 10, 2026 10:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@etj etj merged commit c0bbd15 into GeoNode:master Jun 10, 2026
4 checks passed
@Valyrian-Code Valyrian-Code deleted the fix/restore-memcached-flush branch June 10, 2026 10:45
@Valyrian-Code

Copy link
Copy Markdown
Contributor Author

Thanks for the fast review and merge, @etj! 🙏 I hadn't realised it traced back to #613 — glad it's sorted. I'll keep an eye on the backup/restore scripts and send fixes if I spot anything else.

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.

Error flushing memcached in restore

3 participants