geospatial icon indicating copy to clipboard operation
geospatial copied to clipboard

[FEATURE]Show IP2Geo datasource create/update progress percentage

Open heemin32 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Show IP2Geo datasource create/update progress percentage

What solution would you like? When user call GET API of IP2Geo datasource, it shows how much percentage of the update are done

What alternatives have you considered? Not showing create/update progress information

Do you have any additional context?

heemin32 avatar Sep 15 '23 23:09 heemin32

Hello @heemin32 From where to get started?

Thanks

alankar-asthana avatar Sep 16 '23 06:09 alankar-asthana

Hi @alankar-asthana,

The creation/update is happening in https://github.com/opensearch-project/geospatial/blob/main/src/main/java/org/opensearch/geospatial/ip2geo/jobscheduler/DatasourceUpdateService.java#L63

If we can get the size of file in advance, we can calculate how much of data is processed and store the completed percentage in memory.

In GET API, we can make a call to the node who is creating or updating datasource to get the percentage value and return it in response.

heemin32 avatar Sep 17 '23 04:09 heemin32