LEAD-454 return long.max_value -1 because in elasticsearch code, https://github.com/elasticsearch/elasticsearch/blob/v1.2.1/src/main/java/org/elasticsearch/index/translog/fs/FsTranslog.java#L231 . so the if check won't give location as null.