Fix export when index already exists

This commit is contained in:
Mubelotix 2025-07-01 15:03:04 +02:00
parent 37a692f942
commit b7bebe9bbb
No known key found for this signature in database
GPG key ID: 0406DF6C3A69B942

View file

@ -72,8 +72,12 @@ impl IndexScheduler {
}
request.send_bytes(Default::default()).map_err(into_backoff_error)
})?;
let index_exists = response.status() == 200;
});
let index_exists = match response {
Ok(response) => response.status() == 200,
Err(Error::FromRemoteWhenExporting { code, .. }) if code == "index_not_found" => false,
Err(e) => return Err(e),
};
let primary_key = index
.primary_key(&index_rtxn)