mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-07-21 15:32:41 +00:00
803c5a8dca
Concurrent bucket deletion across multiple filer replicas races on the per-bucket DROP TABLE. The first replica drops the table; the rest hit an undefined-table error (postgres 42P01, mysql 1051) which propagates out of DeleteFolderChildren and panics the filer. On restart the same pending DROP re-runs and the filer crash-loops. Make the drop idempotent. Same defect class in all SQL backends, so fix postgres, postgres2, mysql, mysql2, and sqlite together.
1. create "seaweedfs" database export PGHOME=/Library/PostgreSQL/10 $PGHOME/bin/createdb --username=postgres --password seaweedfs 2. create "filemeta" table $PGHOME/bin/psql --username=postgres --password seaweedfs CREATE TABLE IF NOT EXISTS filemeta ( dirhash BIGINT, name VARCHAR(65535), directory VARCHAR(65535), meta bytea, PRIMARY KEY (dirhash, name) );