gargvishesh opened a new pull request, #15038:
URL: https://github.com/apache/druid/pull/15038

   Fixes #12434 
   
   <!-- Replace XXXX with the id of the issue fixed in this PR. Remove this 
section if there is no corresponding issue. Don't reference the issue in the 
title of this pull-request. -->
   
   <!-- If you are a committer, follow the PR action item checklist for 
committers:
   
https://github.com/apache/druid/blob/master/dev/committer-instructions.md#pr-and-issue-action-item-checklist-for-committers.
 -->
   
   ### Description
   When moving timestamps by an offset using 
`org.joda.time.chrono.ISOChronology` library, if the new timestamp falls in 
Daylight Savings Time (DST) transition period, the library rounds it off to the 
nearest _valid_ time. This can lead to incorrect final timestamp when 
calculated using intermediate offsets landing in DST transition, for e.g. 
`+21D` arrived at using `+14D` and `+7D` offset, where `+14D` lands in DST 
transition period. Since `bucketStart` values are calculated using this 
library, this behaviour can lead to incorrect `bucketStart` times.  
   
   This change combines intermediate offsets to create a single offset that is 
used for calculating the final bucketStart timestamp.
   
   This PR has:
   
   - [X] been self-reviewed.
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [X] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to