You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/09 06:05:35 UTC

[GitHub] [pulsar] AnonHxy commented on pull request #17948: [improve][java-client][issue-17931]Refactor SchemaHash to reduce call of hashFunction in SchemaHash

AnonHxy commented on PR #17948:
URL: https://github.com/apache/pulsar/pull/17948#issuecomment-1272464597

   @codelipenghui @merlimat  @Jason918  PTAL  the refator of this PR. There are many changed files but we only need focus on the following 3 files.
   1. SchemaInfoImpl.java :
   
    Initializing `schemaHash` in the constructor and add a `getSchemaHash()` method to access it. In order to Initialize `schemaHash` correctly , we should always create `SchemaInfoImpl` instance by the builder.
   
   For the `@InterfaceStability.Stable`, I didn't remove the `@NoArgsConstructor`. This might allow `SchemaInfoImpl` created by no-args-constructor,  which will cause `schemaHash` not initialized. We could remove `@NoArgsConstructor` from the major release I think.
   
   2. MessageImpl.java
   3. SchemaHash.java
   4. Other files are just `new SchemaInfoImpl()` ->  `SchemaInfoImpl.builder()`  change


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org