Reported interview periodNov 2025–Aug 2026
Durable Multi-Threaded Log Writer
Implement a log writer that accepts binary records from multiple threads and durably appends each complete record to a file.
Practice focusRequirements - Encode each record as a four-byte big-endian length followed by its payload. - push returns only after all bytes for that record are written and the file is synchronized to durable storage. - A record's bytes must never interleave with another record. - Calls from one thread retain program order; calls from different threads may appear in either order. - close must coordinate with active or future pushes and be idempotent. - Handle partial writes, I/O errors, and payload lengths that cannot be represented.…