code: func (s *Snapshotter) tryAppend(l string) {
  	if err := s.appendLine(l); err != nil {
  		s.logger.Printf("[ERR] serf: Failed to update snapshot: %v", err)
  		now := time.Now()
  		if now.Sub(s.lastAttemptedCompaction) > snapshotErrorRecoveryInterval {
  			s.lastAttemptedCompaction = now
  			s.logger.Printf("[INFO] serf: Attempting compaction to recover from error...")
  			err = s.compact()
  			if err != nil {
  				s.logger.Printf("[ERR] serf: Compaction failed, will reattempt after %v: %v", snapshotErrorRecoveryInterval, err)
  			} else {
  				s.logger.Printf("[INFO] serf: Finished compaction, successfully recovered from error state")
  			}
  		}
  	}
  }
docs: // tryAppend will invoke append line but will not return an error