You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ramzinator <ra...@gmail.com> on 2017/05/29 15:27:57 UTC

Cache.destroy() & close() does not delete SwapFile Ignite 2.0

Hi all,

I have a Cache that I've configured to use swap space by setting it's policy
configuration as such:
policy.setSwapFilePath("ignite\\cache");

Yet at the end of my unit tests, when I call cache.close() or
cache.destroy(), it does not delete the created file.

What can I do to guarantee the deletion of the file, both in tests and in
production?

Thanks,
Rami




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache.destroy() & close() does not delete SwapFile Ignite 2.0

Posted by afedotov <al...@gmail.com>.
Hi,

Deletion happens on next startup of the node.

Kind regards,
Alex.

On Thu, Aug 24, 2017 at 7:13 PM, Ramzinator [via Apache Ignite Users] <
ml+s70518n16401h65@n6.nabble.com> wrote:

> Hi
>
> It appears that even when the ignite node shuts down, it does not delete
> the created cache files.
> Is there any prebuilt way in ignite to delete these files?
>
> Thanks,
> Ramz
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Cache-
> destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205p16401.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1h65@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205p16456.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache.destroy() & close() does not delete SwapFile Ignite 2.0

Posted by Ramzinator <ra...@gmail.com>.
Hi

It appears that even when the ignite node shuts down, it does not delete the
created cache files.
Is there any prebuilt way in ignite to delete these files?

Thanks,
Ramz



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205p16401.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache.destroy() & close() does not delete SwapFile Ignite 2.0

Posted by Ramzinator <ra...@gmail.com>.
Thanks for the tip Alex, I agree it makes sense.
As for the file being deleted upon node exit. That doesn't seem to be the
case in my test.
In any case, I'll make sure to delete the files manually when I'm sure I
want to.

Thanks
Ramzinator



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205p13352.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache.destroy() & close() does not delete SwapFile Ignite 2.0

Posted by Alexander Fedotov <al...@gmail.com>.
Hi.

Just another thing is worth to be mentioned is that by design memory policy
could be used
by multiple caches, that's why in general it's not safe to remove swap
files on cache closing/destruction.


Kind regards,
Alex.

On Thu, Jun 1, 2017 at 11:52 PM, afedotov <al...@gmail.com>
wrote:

> Hi.
>
> As for now, there is no safe way to do it via the public API.
> Nevertheless, these files will be cleared after the Ignite node bounce.
>
>
> Kind regards,
> Alex.
>
> On Mon, May 29, 2017 at 6:27 PM, Ramzinator [via Apache Ignite Users] <[hidden
> email] <http:///user/SendEmail.jtp?type=node&node=13323&i=0>> wrote:
>
>> Hi all,
>>
>> I have a Cache that I've configured to use swap space by setting it's
>> policy configuration as such:
>> policy.setSwapFilePath("ignite\\cache");
>>
>> Yet at the end of my unit tests, when I call cache.close() or
>> cache.destroy(), it does not delete the created file.
>>
>> What can I do to guarantee the deletion of the file, both in tests and in
>> production?
>>
>> Thanks,
>> Rami
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://apache-ignite-users.70518.x6.nabble.com/Cache-destroy
>> -close-does-not-delete-SwapFile-Ignite-2-0-tp13205.html
>> To start a new topic under Apache Ignite Users, email [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=13323&i=1>
>> To unsubscribe from Apache Ignite Users, click here.
>> NAML
>> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: Cache.destroy() & close() does not
> delete SwapFile Ignite 2.0
> <http://apache-ignite-users.70518.x6.nabble.com/Cache-destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205p13323.html>
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>

Re: Cache.destroy() & close() does not delete SwapFile Ignite 2.0

Posted by afedotov <al...@gmail.com>.
Hi.

As for now, there is no safe way to do it via the public API.
Nevertheless, these files will be cleared after the Ignite node bounce.


Kind regards,
Alex.

On Mon, May 29, 2017 at 6:27 PM, Ramzinator [via Apache Ignite Users] <
ml+s70518n13205h89@n6.nabble.com> wrote:

> Hi all,
>
> I have a Cache that I've configured to use swap space by setting it's
> policy configuration as such:
> policy.setSwapFilePath("ignite\\cache");
>
> Yet at the end of my unit tests, when I call cache.close() or
> cache.destroy(), it does not delete the created file.
>
> What can I do to guarantee the deletion of the file, both in tests and in
> production?
>
> Thanks,
> Rami
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Cache-
> destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1h65@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-destroy-close-does-not-delete-SwapFile-Ignite-2-0-tp13205p13323.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.