diff --git a/das/local_file_storage_service.go b/das/local_file_storage_service.go index cad323b165..5623195657 100644 --- a/das/local_file_storage_service.go +++ b/das/local_file_storage_service.go @@ -229,7 +229,14 @@ func (s *LocalFileStorageService) String() string { func (s *LocalFileStorageService) HealthCheck(ctx context.Context) error { testData := []byte("Test-Data") - err := s.Put(ctx, testData, uint64(time.Now().Add(time.Minute).Unix())) + // Store some data with an expiry time at the start of the epoch. + // If expiry is disabled it will only create an index entry for the + // same timestamp each time the health check happens. + // If expiry is enabled, it will be cleaned up each time the pruning + // runs. There is a slight chance of a race between pruning and the + // Put and Get calls, but systems using the HealthCheck will just retry + // and succeed the next time. + err := s.Put(ctx, testData /* start of epoch */, 0) if err != nil { return err }