Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
petrov-mg committed May 24, 2024
1 parent 3e7ba24 commit eb36194
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@
* Binary class descriptor.
*/
public class BinaryClassDescriptor {
/** For test use only. */
static boolean foreSortedFieldsOrder;

/** */
@GridToStringExclude
private final BinaryContext ctx;
Expand Down Expand Up @@ -335,7 +332,7 @@ else if (useOptMarshaller)
else {
Map<Object, BinaryFieldAccessor> fields0;

if (BinaryUtils.FIELDS_SORTED_ORDER || foreSortedFieldsOrder) {
if (BinaryUtils.FIELDS_SORTED_ORDER) {
fields0 = new TreeMap<>();

stableFieldsMeta = metaDataEnabled ? new TreeMap<>() : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public class BinaryUtils {
!IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_BINARY_DONT_WRAP_TREE_STRUCTURES);

/** Whether to sort field in binary objects (doesn't affect Binarylizable). */
public static final boolean FIELDS_SORTED_ORDER =
public static boolean FIELDS_SORTED_ORDER =
IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_BINARY_SORT_OBJECT_FIELDS);

/** Field type names. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,14 @@ private boolean findInNextObject() {

reader.position(objDataStartPos);

boolean isFound = false;

while (reader.position() < objDataEndPos) {
if (findInNextObject())
return true;
}

reader.position(objEndPos);

return isFound;
return false;
}

case GridBinaryMarshaller.HANDLE: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ public static Iterable<Object[]> parameters() {
srvCache = srv.cache(DEFAULT_CACHE_NAME);
cliCache = cli.cache(DEFAULT_CACHE_NAME);

BinaryClassDescriptor.foreSortedFieldsOrder = true;
BinaryUtils.FIELDS_SORTED_ORDER = true;
}

/** {@inheritDoc} */
@Override protected void afterTestsStopped() throws Exception {
BinaryClassDescriptor.foreSortedFieldsOrder = false;
BinaryUtils.FIELDS_SORTED_ORDER = false;

super.afterTestsStopped();

Expand Down

0 comments on commit eb36194

Please sign in to comment.