[SERVER-50594] [SBE] Fix bool/int32_t issue on big-endian systems Created: 27/Aug/20 Updated: 29/Oct/23 Resolved: 08/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Drew Paroski | Assignee: | Drew Paroski |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Query 2020-09-07, Query 2020-09-21, Query 2020-10-05, Query 2020-10-19 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
In various places in the codebase, we store bool's and int32_t's inside sbe::value::Value's and retrieve bool's / int32_t's from sbe::value::Value's in different ways, and this is causing problems on big endian systems like s390x. For an example of where we've been bitten by this, see https://jira.mongodb.org/browse/BF-18537 . First, we need to decide on the encoding we want to use when storing a bool or an int32_t into an sbe::value::Value, both for little-endian systems and for big-endian systems. Based on that decision, we can then identify which places in the code are storing/retrieving bool's and int32_t's correctly and which places in the code are storing/retrieving bool's and int32_t's incorrectly. Finally, we can identify the pitfalls that exist where developers might accidentally use the wrong ways to store/retrieve bool's and int32_t's, and what we can do to make it harder for developers to accidentally make these mistakes. |
| Comments |
| Comment by Githook User [ 08/Oct/20 ] |
|
Author: {'name': 'Drew Paroski', 'email': 'drew.paroski@mongodb.com', 'username': 'paroski'}Message: |
| Comment by David Storch [ 11/Sep/20 ] |
|
I already reverted the changes from |