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

Disable annotation processing in the runtime compiler #518

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

nisargthakkar
Copy link
Contributor

In one of our use-cases, we noticed this compilation failure:

FastSerdeBase [INFO] Starting compilation for the generated source file: <redacted>/MultiGetResponseRecordV1_GenericDeserializer_1339531883776153861_1339531883776153861.java 
warning: Supported source version 'RELEASE_6' from annotation processor 'org.antlr.v4.runtime.misc.NullUsageProcessor' less than -source '1.8'
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider lombok.launch.AnnotationProcessorHider$AnnotationProcessor not found
...
Caused by: com.linkedin.venice.exceptions.VeniceException: Failed to generate fast generic de-serializer for Avro schema: {"type":"record","name":"MultiGetResponseRecordV1","namespace":"com.linkedin.venice.read.protocol.response","doc":"This field will store all the related info for one record","fields":[{"name":"keyIndex","type":"int","doc":"The corresponding key index for each record. Venice Client/Router is maintaining a mapping between a unique index and the corresponding key, so that Venice backend doesn't need to return the full key bytes to reduce network overhead"},{"name":"value","type":"bytes","doc":"Avro serialized value"},{"name":"schemaId","type":"int","doc":"Schema id of current store being used when serializing this record"}]}
	at com.linkedin.venice.serializer.FastSerializerDeserializerFactory.verifyWhetherFastGenericDeserializerWorks(FastSerializerDeserializerFactory.java:78) ~[venice-client-common-0.4.111.jar:?]
...

It turned out that the user had excluded lombok from all configurations and hence, the annotation processor was not found in the classpath. Although this can be attributed as a user error, since fast-avro doesn't use annotations, we can disable annotation processing completely. It could potentially speed up the compilation a bit too since the compiler won't search through the classpath to find all annotation processors.

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (b96177e) 45.75% compared to head (05edbb8) 45.75%.
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #518   +/-   ##
=========================================
  Coverage     45.75%   45.75%           
- Complexity     4432     4433    +1     
=========================================
  Files           398      398           
  Lines         28015    28015           
  Branches       4619     4619           
=========================================
+ Hits          12817    12819    +2     
  Misses        13640    13640           
+ Partials       1558     1556    -2     

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@FelixGV FelixGV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM! Thanks for digging and putting out the fix!

@FelixGV FelixGV merged commit 917b1b9 into linkedin:master Sep 20, 2023
2 checks passed
@nisargthakkar nisargthakkar deleted the noAnnotationProcessingJavac branch September 20, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants