Skip to content

Fix Gitaly crashing without a WAL archiver configured

Sami Hiltunen requested to merge smh-fix-wal-archiver-nil into master

Gitaly is currently crashing if a WAL archiver isn't configured as soon as a partition is initialized on access. This is because we're defining a nil *LogEntryArchiver and passing it to NewPartitionManager as a LogConsumer interface instance. This leads to failing nil checks as the LogConsumer interface instance now has its type field set to *LogEntryArchiver. Fix this by instead defining the possible archiver as the interface type so it remains nil even if we don't initialize it with an actual WAL archiver.

Merge request reports

Loading