Skip to content

Commit 4cfbdd7

Browse files
authored
Merge pull request #139 from lyft/endoplasmicR-patch-1
Updated the doc for graceful shutdown operations
2 parents b827c57 + a3053a4 commit 4cfbdd7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,18 @@ To delete a global property, specify the corresponding name (type String).
276276
curl -X POST http://localhost:8080/presto/globalproperty/delete/{INSERT_NAME_HERE}
277277
```
278278

279+
## Graceful shutdown
280+
Presto gateway supports graceful shutdown of Presto clusters. Even when a cluster is deactivated, any submitted query states can still be retrieved based on the Query ID.
281+
282+
To graceful shutdown a Presto cluster without query losses, the steps are:
283+
1. Set the backend to deactivate state, this prevents any new incoming queries from getting assigned to the backend.
284+
2. Poll the Presto backend coorinator URL until the queued query count and the running query count both hit 0.
285+
3. Terminate the Presto Coordinator & Worker Java process.
286+
287+
288+
To gracefully shutdown a single worker process, see [this](https://trino.io/docs/current/admin/graceful-shutdown.html) for the operations.
289+
290+
279291
## Contributing
280292

281293
Want to help build Presto Gateway? Check out our [contributing documentation](CONTRIBUTING.md)

0 commit comments

Comments
 (0)