Skip to content

ATLAS-5017: Patch to replace the long strings set in spark_process at… #337

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chaitalicod
Copy link
Contributor

…tributes

What changes were proposed in this pull request?

In this fix i have handled existing data with attributes details and sparkplandescription and removed the data from those to avoid OOM errors

How was this patch tested?

Sanity testing,Manual testing

@chaitalicod chaitalicod requested a review from mneethiraj April 22, 2025 13:35
@chaitalicod chaitalicod self-assigned this Apr 22, 2025
@Override
public void submitVerticesToUpdate(WorkItemManager manager) {
AtlasGraph graph = getGraph();
Iterable<Object> iterable = graph.query().has(Constants.ENTITY_TYPE_PROPERTY_KEY, TYPE_NAME_SPARK_PROCESS).vertexIds();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will it encounter Out of Memory, if there are large number of spark_process entities and each have huge string?
It loads vertices, before getting vertexIds
Can you use pagination?

LOG.debug("processItem(typeName={}, vertexId={})", typeName, vertexId);

try {
AtlasGraphUtilsV2.setEncodedProperty(vertex, entityType.getVertexPropertyName(ATTR_NAME_DETAILS), null);
Copy link
Collaborator

Choose a reason for hiding this comment

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

setEncodedProperty --> will get the property value (huge string) and then set

  1. can you check for removeProperty?
  2. getWrappedElement().property(propertyName, null) --> if it allows setting value as null

if above one of the options works without loading the value then, you have to handle usecase where if the property is not present (you can catch exception)

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