You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mnemonic.apache.org by paleyss <gi...@git.apache.org> on 2017/10/08 05:51:04 UTC
[GitHub] incubator-mnemonic pull request #74: MNEMONIC-376: Support shrinkable durabl...
GitHub user paleyss opened a pull request:
https://github.com/apache/incubator-mnemonic/pull/74
MNEMONIC-376: Support shrinkable durable memory service
MNEMONIC-376: Support shrinkable durable memory service
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/paleyss/incubator-mnemonic master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-mnemonic/pull/74.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #74
----
commit 2da83bb190f5f92e5a106c81e3da96df600fb101
Author: paleyss <pa...@gmail.com>
Date: 2017-10-08T05:48:36Z
MNEMONIC-376: Support shrinkable durable memory service
----
---
[GitHub] incubator-mnemonic pull request #74: MNEMONIC-376: Support shrinkable durabl...
Posted by bigdata-memory <gi...@git.apache.org>.
Github user bigdata-memory commented on a diff in the pull request:
https://github.com/apache/incubator-mnemonic/pull/74#discussion_r143510963
--- 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)) {
--- End diff --
Please add an else branch for this if statement.
---
[GitHub] incubator-mnemonic pull request #74: MNEMONIC-376: Support shrinkable durabl...
Posted by bigdata-memory <gi...@git.apache.org>.
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
---
[GitHub] incubator-mnemonic pull request #74: MNEMONIC-376: Support shrinkable durabl...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-mnemonic/pull/74
---