Summary
When adding a new source, background tasks related to the creation continue to run even after the source appears to be fully added. There is often a 502 error with no additional context indicating this may be happening. Some functionality isn't available until the background tasks are completed.
Reported Issue
When adding a new source, a 502 error may pop up in the Dremio UI after clicking "save." Users have reported that the source appears to have successfully been created in the UI, despite the error. This error can also be seen when creating a source via an API call.
If you try to delete the source, you may see errors like the following:
Skipping synchronizing source [...] since it's being modified
Unable to acquire source change lock for source [...] within timeout
In some cases, you may not be able to query or view all datasets from the source.
Relevant Versions
All Dremio Versions
Cause
One of the causes of this error is the API call timing out. This can happen when the source you are trying to add is a particularly large source and the creation takes a long time. This error can safely be ignored, as the source creation is still happening in the background.
Steps to Resolve
Wait for the source creation to complete in the background. This can sometimes take hours, depending on how large the source is. Eventually, Dremio will have finished all the background tasks involved in creating the source and all further actions on the source should then be successful (modifying, deleting, querying, etc).
Additional Resources
To improve the user experience, a new feature has been proposed to create sources asynchronously, so that some resources aren't locked up during the creation. This is tracked internally via ticket #DX-90289.