Skip to content

add endpoint to get status of alter schema ooperation of collections#2123

Merged
kishorenc merged 3 commits into
typesense:v28from
krunal1313:alter_schema_status
Dec 31, 2024
Merged

add endpoint to get status of alter schema ooperation of collections#2123
kishorenc merged 3 commits into
typesense:v28from
krunal1313:alter_schema_status

Conversation

@krunal1313

@krunal1313 krunal1313 commented Dec 30, 2024

Copy link
Copy Markdown
Contributor

Change Summary

  • add endpoint /operations/schema_changes to get the status of alter schema operation status of collections going through alter operation

Get status of alter schema operation

To get status of alter schema operations one need to put GET request on endpoint /operations/schema_changes like following,

curl "http://localhost:8108/operations/schema_changes" -X GET -H "Content-Type: application/json" -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}

If no collection is not going through alter schema operation then we get the empty response.

If collection is going through alter schema operation is then we get responses like following as per on going operation state for 1 million dataset,

[{"altered_docs":0,"collection":"hnstories","validated_docs":873000}]

Here, currently alter schema is under validation state and had validated 873000 docs so far.

similarly,

[{"altered_docs":21480,"collection":"hnstories","validated_docs":1000000}]

Here, alter schema is in altering state and has altered 21480 docs so far.

PR Checklist

@kishorenc kishorenc merged commit ebd2265 into typesense:v28 Dec 31, 2024
tharropoulos pushed a commit to tharropoulos/typesense that referenced this pull request Jan 7, 2025
…ypesense#2123)

* add endpoint to get status of alter schema ooperation of collections

* only repond status of collections in alter stage

* add collection name in response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants