[ https://issues.apache.org/jira/browse/MNEMONIC-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16197197#comment-16197197 ]
ASF GitHub Bot commented on MNEMONIC-376: ----------------------------------------- Github user bigdata-memory commented on a diff in the pull request: https://github.com/apache/incubator-mnemonic/pull/74#discussion_r143510796 --- Diff: mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java --- @@ -158,6 +159,19 @@ public long expand(long size) { return ret; } + @Override + public long shrink(long size) { + long ret = 0L; + if (null != m_features) { + if (m_features.contains(SHRINKABLE)) { + return m_vmasvc.adjustCapacity(m_nid, (-1) * size); --- End diff -- Please assign the result to ret variable > Support shrinkable durable memory service > ------------------------------------------ > > Key: MNEMONIC-376 > URL: https://issues.apache.org/jira/browse/MNEMONIC-376 > Project: Mnemonic > Issue Type: New Feature > Components: Memory-Service > Affects Versions: 0.10.0-incubating > Reporter: Wang, Gang > Assignee: Peili SHEN > > The shrinkable feature would be required if we want to transfer durable > objects to remote nodes. The user cannot predict how much space they need so > there must be some free space is not necessary to be transferred. the > shrinkable memory service also needs to handle the change of capacity > underlying. -- This message was sent by Atlassian JIRA (v6.4.14#64029)