You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Alexander Kolbasov (JIRA)" <ji...@apache.org> on 2017/06/15 19:10:00 UTC

[jira] [Resolved] (SENTRY-1804) Sentry server can be more efficient in handling full snapshot from HMS

     [ https://issues.apache.org/jira/browse/SENTRY-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Kolbasov resolved SENTRY-1804.
----------------------------------------
       Resolution: Won't Fix
    Fix Version/s: sentry-ha-redesign

> Sentry server can be more efficient in handling full snapshot from HMS
> ----------------------------------------------------------------------
>
>                 Key: SENTRY-1804
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1804
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>    Affects Versions: sentry-ha-redesign
>            Reporter: Alexander Kolbasov
>            Assignee: Alexander Kolbasov
>              Labels: sentry-ha
>             Fix For: sentry-ha-redesign
>
>
> When Sentry server creates a full snapshot, it does the following:
> 1) Calls {{fetchFullUpdate()}} to get a full snapshot. This returns {{Map<String, Set<String>>}}
> 2) Goes through all entries and converts them to a different format, allocating memory again for each element:
> {code}
>           for (Map.Entry<String, Set<String>> authzPath : authzPaths.entrySet()) {
>             createAuthzPathsMappingCore(pm, nextHmsImageID, authzPath.getKey(), authzPath.getValue());
>           }
> {code}
> The original full snapshot is then garbage collected and the new one persisted.
> Instead, {{fetchFullUpdate()}} should just create the full snapshot immediately in the final form. This way we do not have to allocate twice as much memory as needed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)