• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to know if a table is NOT loaded
#2
(09-11-2019, 12:42 AM)simon.schvartzman Wrote: Hi team, here i go again...

I understand that if I get an answer from calling cdb_ping("tablename") then "tablename" is properly loaded and I can work with it.

Question is what happens if:

1 - there is no internet connection when I call cdb_ping("tablename").
2 - there is internet connection but for some reason "tablename" has not been loaded.

I've tried the following code 

    [b]put cdb_ping("tablename") into aux
    answer cdb_result("response")       
[/b]

and in both cases the program seems to get stuck on the cdb_ping function and never reaches cdb_result

As a corollary is there any way to find out if a table isn't loaded?

Many thanks


Hi Simon,

Calling cdb_ping(tableName) resolves your tableName validity using underlying methods. Thus, you can not rely on this to verify that you have loaded a table or not. 

  1. If there is no internet connection while calling cdb_ping(), you receive a response of 'No internet available at this time.' There is no delay on this error.
  2. If there is an internet connection, and the table has not been loaded, cdb_ping() reports the response time from the instance that is managing your table.
I would suggest trying cdb_pingNode(). This API talks to the droplet at the lowest level. It is expected to be much faster than cdb_ping() because it does not interrogate the instance. cdb_pingNode() communicates with the droplet only.

We are trying to see what your hard communication time to the region is. Please report back what you get.
  Reply


Messages In This Thread
RE: How to know if a table is NOT loaded - by mark_talluto - 09-11-2019, 11:28 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)