# Failure mode for Dremio metadata refresh for asynchronously mutating data sets

**URL:** <https://community.dremio.com/t/failure-mode-for-dremio-metadata-refresh-for-asynchronously-mutating-data-sets/6865>\
**Category:** Uncategorized\
**Created:** [January 21, 2021, 6:59pm UTC](https://community.dremio.com/t/failure-mode-for-dremio-metadata-refresh-for-asynchronously-mutating-data-sets/6865 "2021-01-21T18:59:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![galevy](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@galevy](https://community.dremio.com/u/galevy)\
**Post date:** [January 21, 2021, 6:59pm UTC](https://community.dremio.com/t/failure-mode-for-dremio-metadata-refresh-for-asynchronously-mutating-data-sets/6865/1 "2021-01-21T18:59:54Z")

</div>

Hello,

We are using dremio to query S3 using AWS glue. We have encountered issues with metadata inconsistencies leading to failed queries. Our datasets are asynchronously mutating which leads to the inconsistency.

The exception on the query we get is “(java.io.FileNotFoundException) Version of file changed \<path of file\>”. When rerunning the query, the same failure is present. After doing the explicit “ALTER PDS \<dataset\> REFRESH METADATA”, rerunning the query succeeds. We would like to know if there is any existing features we can use to mitigate this. Questions:

1. Can queries trigger a metadata refresh on a failure? If this is the default case then why do we see these failures repeating?

2. I know in the settings we can set metadata to refresh after a fixed time but this is not sufficient for our asynchronously mutating datasets. Is there anything else we can do other than setting the refresh to execute more frequently?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 23, 2021, 6:44am UTC](https://community.dremio.com/t/failure-mode-for-dremio-metadata-refresh-for-asynchronously-mutating-data-sets/6865/2 "2021-01-23T06:44:39Z")

</div>

@galevy

If you want to instantly see data in Dremio, you need to run the ALTER PDS command. Ideally when a file is removed, Dremio should forget the file and retry on the fly

Please send query profile when you see this

> **[How To Share A Query Profile](https://www.dremio.com/tutorials/share-query-profile-dremio/)**
>
> Tutorial explaining how to share a query profile in Dremio.

---

<div class="post-metadata">

**Author:** ![galevy](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@galevy](https://community.dremio.com/u/galevy)\
**Post date:** [January 25, 2021, 3:43pm UTC](https://community.dremio.com/t/failure-mode-for-dremio-metadata-refresh-for-asynchronously-mutating-data-sets/6865/3 "2021-01-25T15:43:18Z")

</div>

Needs 7 total runs to succeed:

 ![Screen Shot 2021-01-25 at 10.37.07 AM](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/a/a057c51a1bac7882f07de01060cbdd1b93aa0946.png)

6 failed attempts with the 7th succeeding:

 ![Screen Shot 2021-01-25 at 10.37.25 AM](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/4/4a71a32ef17a371424f46d06769fec1ff2dbd722.png)

Profile of a failed attempt that does metadata retrieval but still gets the version change error:

 ![Screen Shot 2021-01-25 at 10.38.02 AM](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/4/4ae04807c01af394069728dfd8b48b9dd23adddb.png)

Profile of 7th attempt that finally succeeded:

 ![Screen Shot 2021-01-25 at 10.38.17 AM](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/1/1900543a145039739a91110fe3466f2af6fef6b9.png)

We would like to try and understand the reason for the consecutive failures

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 26, 2021, 6:58am UTC](https://community.dremio.com/t/failure-mode-for-dremio-metadata-refresh-for-asynchronously-mutating-data-sets/6865/4 "2021-01-26T06:58:14Z")

</div>

@galevy

As Dremio is scanning files under that folder, it encountered 7 different schemas and kept learning

Thanks  
Bali

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [January 26, 2022, 6:01am UTC](https://community.dremio.com/t/failure-mode-for-dremio-metadata-refresh-for-asynchronously-mutating-data-sets/6865/5 "2022-01-26T06:01:03Z")

</div>

@galevy Do you still have this issue?
