cweiske / phorkie

Self-hosted pastebin software written in PHP. Pastes are editable, forkable, may have multiple files and are stored in git repositories.
https://cweiske.de/phorkie.htm
GNU Affero General Public License v3.0
216 stars 23 forks source link

deleting paste, new: .git dir not found #25

Closed cweiske closed 7 years ago

cweiske commented 7 years ago

after deleting a paste, I'm redirected to /new and get:

Paste 437 .git dir not found

#0 /home/cweiske/Dev/phorkie/src/phorkie/Repository.php(74): phorkie\Repository->loadDirs()
#1 /home/cweiske/Dev/phorkie/src/phorkie/Database/Adapter/Elasticsearch/Search.php(67): phorkie\Repository->loadById(16)
#2 /home/cweiske/Dev/phorkie/www/new.php(31): phorkie\Database_Adapter_Elasticsearch_Search->listAll(0, 5, 'modate', 'desc')
#3 {main}
cweiske commented 7 years ago

This is a race condition; elasticsearch still has it in its index and "/new" tries to list the recent pastes - including the one that does not exist anymore.