[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:
Depends
Related
related to SERVER-50893 [SBE] Temporarily disable core_sbe an... Closed
is related to SERVER-55777 Fix endianness bugs in mongo/db/exec/... Closed
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: SERVER-50594 [SBE] Fix bool/int32_t issue on big-endian systems
Branch: master
https://github.com/mongodb/mongo/commit/013c3f1bed2d31995bb1ca041b41b27496e0b1a7

Comment by David Storch [ 11/Sep/20 ]

I already reverted the changes from SERVER-50591 as part of SERVER-50893. As of SERVER-50893, the core_sbe and aggregation_sbe suites are no longer running on s390x build variants. As part of the work for this ticket, we should modify evergreen.yml in order to start once again running the SBE suites on s390x.

Generated at Thu Feb 08 05:23:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.