SyncGW document import verification

Hi team,
we have a use case to find the total number for records imported to syncgw before any mobile starts syncing. For example, if we have 100k documents with type=‘abc’, all these documents to be imported to syncgw before mobile starts the pull request from cblite. We have a control file mechanism to inform mobile that whether that can start the sync or not.

Now question is , is there a way or api available to identify my 100k documents with type=‘abc’ has been reached syncgw or not?

Thanks.

Hi Nagarajan ,

You can use below api to find the total number of docs imported .

http://sg_host:4985/_expvar
stat name = import_count

Just for additional info - this api have access to other import related stats like - import_error_count, import_processing_time, import_partitions, import_cancel_cas …etc

depending on sg server version , there could be some stats not available but import_count for sure .

cheers

But is there a way to check for specific document type?
http://sg_host:4985/_expvar
stat name = import_count
above one gives all the documented imported, but we are specifically looking for type=‘abc’ documents had reached SW or not.

Sorry, There are no such api which would provide import_count for specific type of documents.