Thank you James.
So, the way this works would be that for each statement with CURRENT_TIME(), 
that particular region server would query another region server (the one which 
is hosting SYSTEM.CATALOG table) and get its current time. Hence, for each row 
there is a potential cross-region-server fetch for current time stamp. It is 
also possible that a particular region server got these values a bit delayed 
(due to n/w etc) and other region servers could commit data having time stamp 
values greater than this one. Eventually, of course, this region server will 
also be able to upsert with the timestamp it got from an earlier fetch.
If this is possible, then how are fetches by timestamp range handled? It is 
possible that certain region servers are still in the process of reading this 
current time stamp off the network while others have already committed with 
values greater than this one. In this case, a time based range query can return 
different results when executed twice.
Or am I missing something?
Thanks,Sumit
      From: James Taylor <[email protected]>
 To: user <[email protected]>; Sumit Nigam <[email protected]> 
 Sent: Tuesday, October 20, 2015 10:00 PM
 Subject: Re: Using CURRENT_TIME()
   
The CURRENT_TIME() function is evaluated once per statement execution. The 
timestamp used is the current time on the region server hosting the 
SYSTEM.CATALOG table. So for batched UPSERT VALUES calls, you'd have different 
values for different rows based on when the statement was executed.
Thanks,James


On Tue, Oct 20, 2015 at 8:26 AM, Sumit Nigam <[email protected]> wrote:

Hi,
I am using CURRENT_TIME() for one of the columns. 
I wanted to know how is this value passed along to different region servers 
involved in processing the UPSERT? Does it use the current timestamps of 
individual region servers ?
I am using batched upserts (huge) and have current_time() as one of the column 
values. Would it be right to assume that those rows can get different 
timestamps? Or would they all have same timestamp?

Thanks,Sumit



  

Reply via email to