Skip to content

Conversation

@parasjain1
Copy link
Contributor

@parasjain1 parasjain1 commented May 18, 2023

Description

  • Category - Enhancement
  • JDK serialization is slow. Using protostuff for (de)serialization in security plugin

Issues Resolved

Resolves #2780

Testing

  • Unit tests
  • End to end testing for version upgrade scenario

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Paras Jain <[email protected]>
*
* SerializableWrapper here will hold our actual serializable object, and we'll always (de)serialize
* SerializableWrapper object. Protostuff will internally construct and maintain schemas for underlying
* classes.
Copy link
Member

Choose a reason for hiding this comment

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

nice

final String origCCSTransientFls = getThreadContext().getTransient(ConfigConstants.OPENDISTRO_SECURITY_FLS_FIELDS_CCS);
final String origCCSTransientMf = getThreadContext().getTransient(ConfigConstants.OPENDISTRO_SECURITY_MASKED_FIELD_CCS);

final boolean useJDKSerialization = connection.getVersion().before(Version.V_2_7_0);
Copy link
Member

Choose a reason for hiding this comment

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

👏

}
}

private void serializeHeadersUsingProtoForVersionUpgrade() {
Copy link
Member

Choose a reason for hiding this comment

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

We can move this function to HeaderHelpers to re-use

@peternied
Copy link
Member

Looks like this pull request has stalled for a little bit @parasjain1 thoughts on picking this back up?

For the content of the pull request itself, you say this is faster, how are you quantifying this?

@parasjain1
Copy link
Contributor Author

Closing this in favour of - #2802

@parasjain1 parasjain1 closed this Jun 8, 2023
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.

[Performance] Use a faster serialization protocol within security plugin

3 participants