# Persistent queue corruption

**URL:** <https://discuss.elastic.co/t/persistent-queue-corruption/286412>\
**Category:** Logstash\
**Created:** [October 11, 2021, 8:38pm UTC](https://discuss.elastic.co/t/persistent-queue-corruption/286412 "2021-10-11T20:38:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![franck.lefebure](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franck.lefebure/32/24332_2.png) [@franck.lefebure](https://discuss.elastic.co/u/franck.lefebure)\
**Post date:** [October 11, 2021, 8:38pm UTC](https://discuss.elastic.co/t/persistent-queue-corruption/286412/1 "2021-10-11T20:38:23Z")

</div>

Hi,  
I had a disk saturation on a logstash 5.6.8 installation  
I got to remove the "checkpoint.head" (0 bytes size) file to restart the pipeline  
Now I have theses files in queue dir :

```auto
-rw-r--r-- 1 logstash logstash 262144000 Oct 10 10:07 page.3999
-rw-r--r-- 1 logstash logstash 262144000 Oct 10 10:53 page.4000
-rw-r--r-- 1 logstash logstash 34 Oct 10 10:53 checkpoint.4000
-rw-r--r-- 1 logstash logstash 34 Oct 10 11:39 checkpoint.3999
-rw-r--r-- 1 logstash logstash 262144000 Oct 10 11:39 page.4001
-rw-r--r-- 1 logstash logstash 34 Oct 11 16:19 checkpoint.head
-rw-r--r-- 1 logstash logstash 262144000 Oct 11 16:19 page.35

```

I would like to reinject in the pipeline the events in pages 3999/4000/4001.  
I tried to repair directory with a pgrepair from a 7x install but without success

What are my options ?  
(I actually struggle in Queue/Page/MmapPageIO sources to find a solution)

Thanks  
Franck

---

<div class="post-metadata">

**Author:** ![franck.lefebure](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franck.lefebure/32/24332_2.png) [@franck.lefebure](https://discuss.elastic.co/u/franck.lefebure)\
**Post date:** [October 13, 2021, 3:59am UTC](https://discuss.elastic.co/t/persistent-queue-corruption/286412/2 "2021-10-13T03:59:32Z")

</div>

Well..  
I've debugged an enhanced the repair tool who can now rebuild a missing checkpoint.head with the informations from prévious pages  
And I've ported it for a 5.6x  
If you need it : [logstash/PqRepair.java at flefebure-5.6 · flefebure/logstash · GitHub](https://github.com/flefebure/logstash/blob/flefebure-5.6/logstash-core/src/main/java/org/logstash/ackedqueue/PqRepair.java)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 10, 2021, 4:00am UTC](https://discuss.elastic.co/t/persistent-queue-corruption/286412/3 "2021-11-10T04:00:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
