-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75278/#review227104
-----------------------------------------------------------


Ship it!




Ship It!

- Sheetal Shah


On Nov. 18, 2024, 6:32 p.m., Priyanshi Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75278/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2024, 6:32 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Pinal Shah, and Sheetal Shah.
> 
> 
> Bugs: ATLAS-4924
>     https://issues.apache.org/jira/browse/ATLAS-4924
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When client timezone is UTC and server is on PST timezone, search filters 
> will process the result according to the system timezone i.e PST and hence, 
> the results are wrongly fetched. This is an intermittent issue as if the 
> entities were created according to PST timezones then the search filter could 
> have fetched proper results.
> 
> Steps to reproduce:
> ------------------
> 
> Scenario : Using "Today" filter with timerange operator, also client and 
> server are on different timezones say UTC and PST:
> 
>  
> 
> 1. Create two entities in UTC timezones.
>  For example: If Today is 18th Nov'24 set one entity createTime as 
> "1731888000000" and other as "1731974399000" which are basically start and 
> end time of the day.
> 2. Search that entity with its typedef and select "createTime" as 
> attributeName and operator as "Time Range" and value as "Today".
>  
> Results:
> --------
> 
> Expectation: Both the entities should be fetched.
> 
> Actual: Only one entity is getting fetched having createTime as 
> "1731974399000".
> 
> Fix:
> -----
> 
> The entities must be created in UTC timezone and we have fixed the timezone 
> while processing search filter to UTC as it is considered as standard time 
> globally and hence, eliminating the dependency of processing the result 
> according to the server timezone. The results will be seen as per the local 
> timezone of the client. Meaning the startTime and endTime for "Today" 
> timerange will be in UTC format and displaying of the results will be in 
> Local timezone of the client.
> 
> Note:
> -----
> In scenarios where the server and the client are having date difference (for 
> example: if the server was on UTC timezone and client on PST timezone) then 
> the result will vary as the filteration of the data will always be in UTC 
> timezone.(i.e if the request was called on or after 4pm PST then "TODAY" 
> timerange will be from 19th and not 18th as the date changes for UTC timezone)
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> 49091dcf3 
> 
> 
> Diff: https://reviews.apache.org/r/75278/diff/1/
> 
> 
> Testing
> -------
> 
> Manual Testing:
> 
> Scenario 1: The server was on PST timezone and client was in UTC timezone.
> 1. Created two entities having createTime in UTC timezone.
> 2. Applied search filter with timerange operator and value as "Today".
> 
> Result was it fetched the results properly.
> 
> Scenario 2: The server was on UTC timezone and client on PST timezone and 
> perform the both steps mentioned above.
> 
> Result was it fetched the results properly.
> 
> 
> Thanks,
> 
> Priyanshi Shah
> 
>

Reply via email to