Skip to content
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

IGNITE-8021 Delete cache config files when destroyed #3697

Closed
wants to merge 15 commits into from

Conversation

@ivandasch
Copy link
Contributor

ivandasch commented Mar 26, 2018

No description provided.

ignite = (IgniteEx)startGrids(NODES);

for (String cacheName: ignite.cacheNames())
info("!!! " + cacheName);

This comment has been minimized.

Copy link
@alamar

alamar Mar 28, 2018

Contributor

I would expect something descriptive here


stopAllGrids();

info("WHOLE GRID STOPPED");

This comment has been minimized.

Copy link
@alamar

alamar Mar 28, 2018

Contributor

Is caps lock necessary?

/**
* Test correct clean up cache configuration data after destroying cache.
*/
public class IgnitePdsDeleteCacheConfigurationDataAfterDestroyCacheTest extends GridCommonAbstractTest {

This comment has been minimized.

Copy link
@alamar

alamar Mar 28, 2018

Contributor

Can we test indexing-enabled caches as well?

else
file = new File(cacheWorkDir, CACHE_DATA_FILENAME);

if(file.exists())

This comment has been minimized.

Copy link
@alamar

alamar Mar 28, 2018

Contributor

Whitespace required after if. Body longer than 1 line - {}s required.

if (cacheDatFiles != null)
for (File file : cacheDatFiles)
if (file.exists())
file.delete();

This comment has been minimized.

Copy link
@alamar

alamar Mar 28, 2018

Contributor

Blocks with more than 1 line warrant curly braces {}

private void deleteCacheGroupConfigurationData(CacheGroupContext ctx) {
File cacheGrpDir = cacheWorkDir(ctx.sharedGroup(), ctx.cacheOrGroupName());

if( cacheGrpDir != null && cacheGrpDir.exists()) {

This comment has been minimized.

Copy link
@alamar

alamar Mar 28, 2018

Contributor

Whitespace before ( not after

if(file.exists())
if(!file.delete())
throw new IgniteCheckedException("Failed to delete cache configuration:" + cacheCfg.getName());

This comment has been minimized.

Copy link
@alamar

alamar Mar 28, 2018

Contributor

Extra blank line

@ivandasch ivandasch force-pushed the ivandasch:ignite-8021 branch from 083963b to 9ad55be Mar 28, 2018
@asfgit asfgit closed this in 2edcb22 Apr 17, 2018
asfgit pushed a commit that referenced this pull request Apr 17, 2018
…3697.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>
ivandasch added a commit to gridgain/apache-ignite that referenced this pull request Apr 17, 2018
…pache#3697.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>

(cherry picked from commit 2edcb22)
ivandasch added a commit to gridgain/apache-ignite that referenced this pull request Apr 17, 2018
…pache#3697.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>
(cherry picked from commit 2edcb22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.