Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMPRESSED_FILTERED_TSI produces different output on different JDKs #264

Open
reckart opened this issue Nov 25, 2022 · 1 comment
Open
Labels
🦟 Bug Something isn't working

Comments

@reckart
Copy link
Member

reckart commented Nov 25, 2022

Describe the bug
COMPRESSED_FILTERED_TSI produces different output on different JDKs or at least on different systems.

To Reproduce
Steps to reproduce the behavior:
Run CasSerializationDeserialization_COMPRESSED_FILTERED_TSI_Test.serializeAndCompareToReferenceTest in particular test 12 (casWithLists) and 13 (casWithArrays) on different JDKs:

  • ❌ MacOS
    openjdk version "1.8.0_252"
    OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
    OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)
  • ✅ Mac OS
    openjdk version "1.8.0_332"
    OpenJDK Runtime Environment (Zulu 8.62.0.19-CA-macosx) (build 1.8.0_332-b09)
    OpenJDK 64-Bit Server VM (Zulu 8.62.0.19-CA-macosx) (build 25.332-b09, mixed mode)
  • ❌ Linux
    Azul_JDK_8/zulu8.62.0.19-ca-jdk8.0.332-linux_x64

Expected behavior
The format should be consistent across deployments.

Screenshots

Please complete the following information:

  • Version: 3.4.0-SNAPSHOT
@reckart
Copy link
Member Author

reckart commented Nov 25, 2022

Interestingly, the deserialized CASes seem to be equivalent though.

Maybe the difference is related to differences or non-deterministic behaviour in the compression or in the iteration order through the feature structures.

class Investigate {
  @Test
  void test() throws Exception {
    CAS ref = CasCreationUtils.createCas();
    CAS act = CasCreationUtils.createCas();

    CasIOUtils.load(new File("actual-cas.bin").toURL(), act);
    CasIOUtils.load(new File("reference-cas.bin").toURL(), ref);

    assertThat(toComparableString(act)).isEqualTo(toComparableString(ref));
  }
}

@reckart reckart added the 🦟 Bug Something isn't working label Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦟 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant