Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
35
src/Framework/Filesystem/AtomicStorage.php
Normal file
35
src/Framework/Filesystem/AtomicStorage.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem;
|
||||
|
||||
/**
|
||||
* Interface für atomare Storage-Operationen
|
||||
*
|
||||
* Garantiert, dass Schreiboperationen entweder vollständig erfolgen oder gar nicht.
|
||||
* Verhindert korrupte/teilweise Dateien bei Concurrent Access oder System-Ausfällen.
|
||||
*/
|
||||
interface AtomicStorage
|
||||
{
|
||||
/**
|
||||
* Atomare Schreiboperation
|
||||
*
|
||||
* Schreibt Inhalt atomisch (write + rename) um Race Conditions zu vermeiden.
|
||||
*/
|
||||
public function putAtomic(string $path, string $content): void;
|
||||
|
||||
/**
|
||||
* Atomare Update-Operation mit Callback
|
||||
*
|
||||
* Lädt aktuelle Daten, führt Update-Callback aus und schreibt atomisch zurück.
|
||||
*/
|
||||
public function updateAtomic(string $path, callable $updateCallback): void;
|
||||
|
||||
/**
|
||||
* Atomare JSON-Update-Operation
|
||||
*
|
||||
* Spezielle Implementierung für JSON-Updates um Parsing-Errors zu vermeiden.
|
||||
*/
|
||||
public function updateJsonAtomic(string $path, callable $updateCallback): void;
|
||||
}
|
||||
Reference in New Issue
Block a user