Skip to content

Commit 5e31041

Browse files
committed
Generate index key suffix in consistent byte order
1 parent e0750be commit 5e31041

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mongo/db/fts/fts_index_format.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ namespace mongo {
201201
} t;
202202
uint32_t seed = 0;
203203
MurmurHash3_x64_128( term.data(), term.size(), seed, t.hash );
204+
t.hash[0] = littleEndian<uint64_t>(t.hash[0]);
205+
t.hash[1] = littleEndian<uint64_t>(t.hash[1]);
204206
string keySuffix = mongo::toHexLower( t.data, sizeof( t.data ) );
205207
invariant( termKeySuffixLength == keySuffix.size() );
206208
b.append( "", term.substr( 0, termKeyPrefixLength ) +

0 commit comments

Comments
 (0)