Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cap max creation time used in ranking calculation (#630)
added a cap on creation timestamp used in ranking calculation to not exceeds the current time while performing calculation to cope with posts' that have funny created date far into the future, also cap the final score value to not exceed int32 max size (2**31 - 1) the current ranking function involves using the posts' object creation timestamp as part of the calculation, but if the datetime is too far in the future (e.g. 4200-06-09, as seen in [this example][ex1]), it can cause the ranking score value to exceeds the ranking score field size, which appears to be int32 sized technically we'll still be running into year 2038 problem on this field, but there's some discussion on adjusting the ranking score and keep that below int32 sized altogether, so that's left for the future exercise also see #622 for more context [ex1]: https://myfriendsare.gay/notice/APx5K7aeglknMfm1A0
- Loading branch information