[GitHub] [ignite] acj0331 opened a new pull request #7403: IGNITE-12543 When put List>, the data was increased …
acj0331 opened a new pull request #7403: IGNITE-12543 When put List>, the data was increased … URL: https://github.com/apache/ignite/pull/7403 …much larger. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sergeyuttsel opened a new pull request #7390: Ignite 12433
sergeyuttsel opened a new pull request #7390: Ignite 12433 URL: https://github.com/apache/ignite/pull/7390 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] asfgit closed pull request #7232: IGNITE-12499 Parallel restore partitions state.
asfgit closed pull request #7232: IGNITE-12499 Parallel restore partitions state. URL: https://github.com/apache/ignite/pull/7232 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sergeyuttsel closed pull request #7390: Ignite 12433 checking column names for duplicates on create table statement
sergeyuttsel closed pull request #7390: Ignite 12433 checking column names for duplicates on create table statement URL: https://github.com/apache/ignite/pull/7390 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] asfgit closed pull request #6796: IGNITE-12049 Add user attributes to thin clients
asfgit closed pull request #6796: IGNITE-12049 Add user attributes to thin clients URL: https://github.com/apache/ignite/pull/6796 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] SomeFire commented on a change in pull request #7375: PoC security context spread
SomeFire commented on a change in pull request #7375: PoC security context spread URL: https://github.com/apache/ignite/pull/7375#discussion_r376991966 ## File path: modules/core/src/test/java/org/apache/ignite/internal/processors/security/InvalidServerTest.java ## @@ -37,29 +39,43 @@ /** Test server name. */ private static final String TEST_SERVER_NAME = "test_server"; -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String instanceName, -AbstractTestSecurityPluginProvider pluginProv) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(instanceName, pluginProv); +/** */ +@Test +public void testInvalidServer() throws Exception { +globalAuth = true; + +startServerNode("server1"); +startServerNode("server2"); + +assertThrowsWithCause(() -> startServerNode(TEST_SERVER_NAME), IgniteAuthenticationException.class); +} -cfg.setDiscoverySpi(new TcpDiscoverySpi() { -@Override protected void startMessageProcess(TcpDiscoveryAbstractMessage msg) { -if (msg instanceof TcpDiscoveryNodeAddedMessage && msg.verified()) -TestSecurityProcessor.PERMS.remove(new SecurityCredentials(TEST_SERVER_NAME, "")); +private IgniteEx startServerNode(String login) throws Exception { +TestSecurityPluginProvider provider = new TestSecurityPluginProvider(login, "", +ALLOW_ALL, null, globalAuth){ +@Override protected GridSecurityProcessor securityProcessor(GridKernalContext ctx) { +return new InvalidServerSecurityProcessor(ctx, super.securityProcessor(ctx)); } -}.setIpFinder(LOCAL_IP_FINDER)); +}; -return cfg; +return startGrid(getConfiguration(login, provider) +.setClientMode(false)); } -/** */ -@Test -public void testInvalidServer() throws Exception { -globalAuth = true; +/* */ +static class InvalidServerSecurityProcessor extends TestSecurityProcessor.TestSecurityProcessorDelegator { + Review comment: Redundant empty line. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] SomeFire commented on a change in pull request #7375: PoC security context spread
SomeFire commented on a change in pull request #7375: PoC security context spread URL: https://github.com/apache/ignite/pull/7375#discussion_r376275243 ## File path: modules/core/src/test/java/org/apache/ignite/internal/processors/security/InvalidServerTest.java ## @@ -37,29 +39,43 @@ /** Test server name. */ private static final String TEST_SERVER_NAME = "test_server"; -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String instanceName, -AbstractTestSecurityPluginProvider pluginProv) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(instanceName, pluginProv); +/** */ +@Test +public void testInvalidServer() throws Exception { +globalAuth = true; + +startServerNode("server1"); +startServerNode("server2"); + +assertThrowsWithCause(() -> startServerNode(TEST_SERVER_NAME), IgniteAuthenticationException.class); +} -cfg.setDiscoverySpi(new TcpDiscoverySpi() { -@Override protected void startMessageProcess(TcpDiscoveryAbstractMessage msg) { -if (msg instanceof TcpDiscoveryNodeAddedMessage && msg.verified()) -TestSecurityProcessor.PERMS.remove(new SecurityCredentials(TEST_SERVER_NAME, "")); +private IgniteEx startServerNode(String login) throws Exception { +TestSecurityPluginProvider provider = new TestSecurityPluginProvider(login, "", +ALLOW_ALL, null, globalAuth){ +@Override protected GridSecurityProcessor securityProcessor(GridKernalContext ctx) { +return new InvalidServerSecurityProcessor(ctx, super.securityProcessor(ctx)); } -}.setIpFinder(LOCAL_IP_FINDER)); +}; -return cfg; +return startGrid(getConfiguration(login, provider) +.setClientMode(false)); Review comment: Client mode is set to `false` by default. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] SomeFire commented on a change in pull request #7375: PoC security context spread
SomeFire commented on a change in pull request #7375: PoC security context spread URL: https://github.com/apache/ignite/pull/7375#discussion_r376275549 ## File path: modules/core/src/test/java/org/apache/ignite/internal/processors/security/InvalidServerTest.java ## @@ -37,29 +39,43 @@ /** Test server name. */ private static final String TEST_SERVER_NAME = "test_server"; -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String instanceName, -AbstractTestSecurityPluginProvider pluginProv) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(instanceName, pluginProv); +/** */ +@Test +public void testInvalidServer() throws Exception { +globalAuth = true; + +startServerNode("server1"); +startServerNode("server2"); + +assertThrowsWithCause(() -> startServerNode(TEST_SERVER_NAME), IgniteAuthenticationException.class); +} -cfg.setDiscoverySpi(new TcpDiscoverySpi() { -@Override protected void startMessageProcess(TcpDiscoveryAbstractMessage msg) { -if (msg instanceof TcpDiscoveryNodeAddedMessage && msg.verified()) -TestSecurityProcessor.PERMS.remove(new SecurityCredentials(TEST_SERVER_NAME, "")); +private IgniteEx startServerNode(String login) throws Exception { +TestSecurityPluginProvider provider = new TestSecurityPluginProvider(login, "", +ALLOW_ALL, null, globalAuth){ +@Override protected GridSecurityProcessor securityProcessor(GridKernalContext ctx) { +return new InvalidServerSecurityProcessor(ctx, super.securityProcessor(ctx)); } -}.setIpFinder(LOCAL_IP_FINDER)); +}; -return cfg; +return startGrid(getConfiguration(login, provider) +.setClientMode(false)); } -/** */ -@Test -public void testInvalidServer() throws Exception { -globalAuth = true; +/* */ +static class InvalidServerSecurityProcessor extends TestSecurityProcessor.TestSecurityProcessorDelegator { + +public InvalidServerSecurityProcessor(GridKernalContext ctx, +GridSecurityProcessor original) { +super(ctx, original); +} -startGridAllowAll("server1"); -startGridAllowAll("server2"); +@Override public SecurityContext authenticateNode(ClusterNode node, +SecurityCredentials cred) throws IgniteCheckedException { +if(TEST_SERVER_NAME.equals(cred.getLogin()) && !TEST_SERVER_NAME.equals(ctx.igniteInstanceName())) Review comment: Missed space after `if`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] SomeFire commented on a change in pull request #7375: PoC security context spread
SomeFire commented on a change in pull request #7375: PoC security context spread URL: https://github.com/apache/ignite/pull/7375#discussion_r376992257 ## File path: modules/core/src/test/java/org/apache/ignite/internal/processors/security/InvalidServerTest.java ## @@ -37,29 +39,43 @@ /** Test server name. */ private static final String TEST_SERVER_NAME = "test_server"; -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String instanceName, -AbstractTestSecurityPluginProvider pluginProv) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(instanceName, pluginProv); +/** */ +@Test +public void testInvalidServer() throws Exception { +globalAuth = true; + +startServerNode("server1"); +startServerNode("server2"); + +assertThrowsWithCause(() -> startServerNode(TEST_SERVER_NAME), IgniteAuthenticationException.class); +} -cfg.setDiscoverySpi(new TcpDiscoverySpi() { -@Override protected void startMessageProcess(TcpDiscoveryAbstractMessage msg) { -if (msg instanceof TcpDiscoveryNodeAddedMessage && msg.verified()) -TestSecurityProcessor.PERMS.remove(new SecurityCredentials(TEST_SERVER_NAME, "")); +private IgniteEx startServerNode(String login) throws Exception { +TestSecurityPluginProvider provider = new TestSecurityPluginProvider(login, "", +ALLOW_ALL, null, globalAuth){ +@Override protected GridSecurityProcessor securityProcessor(GridKernalContext ctx) { +return new InvalidServerSecurityProcessor(ctx, super.securityProcessor(ctx)); } -}.setIpFinder(LOCAL_IP_FINDER)); +}; -return cfg; +return startGrid(getConfiguration(login, provider) +.setClientMode(false)); } -/** */ -@Test -public void testInvalidServer() throws Exception { -globalAuth = true; +/* */ Review comment: Asterisk missed. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] SomeFire commented on a change in pull request #7375: PoC security context spread
SomeFire commented on a change in pull request #7375: PoC security context spread URL: https://github.com/apache/ignite/pull/7375#discussion_r376275593 ## File path: modules/core/src/test/java/org/apache/ignite/internal/processors/security/impl/TestSecurityProcessor.java ## @@ -89,6 +101,38 @@ public TestSecurityProcessor(GridKernalContext ctx, TestSecurityData nodeSecData .setPerms(PERMS.get(cred)) .sandboxPermissions(SANDBOX_PERMS.get(cred)) ); + +try { +Map attrs = new HashMap<>(node.attributes()); + +attrs.put(ATTR_SECURITY_CONTEXT, U.marshal(ctx.marshallerContext().jdkMarshaller(), res)); + +((TcpDiscoveryNode)node).setAttributes(attrs); + +return res; +} +catch (IgniteCheckedException e) { +throw new IgniteException(e); +} +} + +@Override public SecurityContext securityContext(UUID subjId) { +ClusterNode node = ctx.discovery().getInjectedDiscoverySpi().getNode(subjId); + +if(node == null) Review comment: Missed space after `if`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] SomeFire commented on a change in pull request #7375: PoC security context spread
SomeFire commented on a change in pull request #7375: PoC security context spread URL: https://github.com/apache/ignite/pull/7375#discussion_r376992354 ## File path: modules/core/src/test/java/org/apache/ignite/internal/processors/security/InvalidServerTest.java ## @@ -37,29 +39,43 @@ /** Test server name. */ private static final String TEST_SERVER_NAME = "test_server"; -/** {@inheritDoc} */ -@Override protected IgniteConfiguration getConfiguration(String instanceName, -AbstractTestSecurityPluginProvider pluginProv) throws Exception { -IgniteConfiguration cfg = super.getConfiguration(instanceName, pluginProv); +/** */ +@Test +public void testInvalidServer() throws Exception { +globalAuth = true; + +startServerNode("server1"); +startServerNode("server2"); + +assertThrowsWithCause(() -> startServerNode(TEST_SERVER_NAME), IgniteAuthenticationException.class); +} -cfg.setDiscoverySpi(new TcpDiscoverySpi() { -@Override protected void startMessageProcess(TcpDiscoveryAbstractMessage msg) { -if (msg instanceof TcpDiscoveryNodeAddedMessage && msg.verified()) -TestSecurityProcessor.PERMS.remove(new SecurityCredentials(TEST_SERVER_NAME, "")); +private IgniteEx startServerNode(String login) throws Exception { +TestSecurityPluginProvider provider = new TestSecurityPluginProvider(login, "", +ALLOW_ALL, null, globalAuth){ +@Override protected GridSecurityProcessor securityProcessor(GridKernalContext ctx) { +return new InvalidServerSecurityProcessor(ctx, super.securityProcessor(ctx)); } -}.setIpFinder(LOCAL_IP_FINDER)); +}; -return cfg; +return startGrid(getConfiguration(login, provider) +.setClientMode(false)); } -/** */ -@Test -public void testInvalidServer() throws Exception { -globalAuth = true; +/* */ +static class InvalidServerSecurityProcessor extends TestSecurityProcessor.TestSecurityProcessorDelegator { + +public InvalidServerSecurityProcessor(GridKernalContext ctx, Review comment: Missed javadocs. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sk0x50 opened a new pull request #7393: IGNITE-12649 Fixed IllegalArgumentException thrown by HibernateL2Cach…
sk0x50 opened a new pull request #7393: IGNITE-12649 Fixed IllegalArgumentException thrown by HibernateL2Cach… URL: https://github.com/apache/ignite/pull/7393 …eExample for ignite-hibernate_5.3 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sergeyuttsel opened a new pull request #7391: IGNITE-12433 checking column names for duplicates on create table statement
sergeyuttsel opened a new pull request #7391: IGNITE-12433 checking column names for duplicates on create table statement URL: https://github.com/apache/ignite/pull/7391 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] narsinallamilli opened a new pull request #7392: Update ignite-deployment.yaml
narsinallamilli opened a new pull request #7392: Update ignite-deployment.yaml URL: https://github.com/apache/ignite/pull/7392 It was referring to stateful config, updated to refer to stateless config. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377050258 ## File path: modules/spring-data-2.2/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java ## @@ -34,6 +34,16 @@ @EnableIgniteRepositories public class ApplicationConfiguration { +/** + * The bean with cache names + */ +@Bean +public CacheNamesBean cacheNames() { +CacheNamesBean bean = new CacheNamesBean(); +bean.setPersonCacheName("PersonCache"); +return bean; Review comment: Need empty line before :) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377101613 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactory.java ## @@ -108,11 +134,38 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = evaluateExpression(annotation.cacheName()); + +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * evaluate the SpEL expression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String evaluateExpression(String spelExpression) { +return (String)resolver.evaluate(spelExpression,beanExpressionContext); +} + +/** + * The method tryes to identify that the expression looks like SpEL extression + * + * @param expression string with a expression + * @return true if the string contains attributes of SpEL expression + * @see https://docs.spring.io/spring/docs/5.0.16.RELEASE/spring-framework-reference/core.html#expressions;>SpEL + */ +private boolean isSpelExpression(String expression) { Review comment: yes. thank you! fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377101687 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactory.java ## @@ -108,11 +134,38 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = evaluateExpression(annotation.cacheName()); + +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * evaluate the SpEL expression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String evaluateExpression(String spelExpression) { +return (String)resolver.evaluate(spelExpression,beanExpressionContext); Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377101419 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -108,11 +134,23 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = evaluateExpression(annotation.cacheName()); + +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * evaluate the SpEL expression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String evaluateExpression(String spelExpression) { +return (String)resolver.evaluate(spelExpression,beanExpressionContext); Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377046206 ## File path: modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/IgniteSpringDataCrudSelfExpressionTest.java ## @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ignite.springdata; + +import org.apache.ignite.springdata.misc.ApplicationConfiguration; +import org.apache.ignite.springdata.misc.Person; +import org.apache.ignite.springdata.misc.PersonExpressionRepository; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +/** + * Test with using repository which is configured by Spring EL + */ +public class IgniteSpringDataCrudSelfExpressionTest extends GridCommonAbstractTest { +/** Repository. */ +private static PersonExpressionRepository repo; + +/** Context. */ +private static AnnotationConfigApplicationContext ctx; + +/** Number of entries to store */ +private static int CACHE_SIZE = 1000; + +/** {@inheritDoc} */ +@Override protected void beforeTestsStarted() throws Exception { +super.beforeTestsStarted(); + +ctx = new AnnotationConfigApplicationContext(); + +ctx.register(ApplicationConfiguration.class); + +ctx.refresh(); + +repo = ctx.getBean(PersonExpressionRepository.class); +} + +/** {@inheritDoc} */ +@Override protected void beforeTest() throws Exception { +super.beforeTest(); + +fillInRepository(); + +assertEquals(CACHE_SIZE, repo.count()); +} + +/** {@inheritDoc} */ +@Override protected void afterTest() throws Exception { +repo.deleteAll(); + +assertEquals(0, repo.count()); + +super.afterTest(); +} + +/** + * + */ +private void fillInRepository() { +for (int i = 0; i < CACHE_SIZE - 5; i++) { +repo.save(i, new Person("person" + Integer.toHexString(i), +"lastName" + Integer.toHexString((i + 16) % 256))); +} + +repo.save((int) repo.count(), new Person("uniquePerson", "uniqueLastName")); +repo.save((int) repo.count(), new Person("nonUniquePerson", "nonUniqueLastName")); +repo.save((int) repo.count(), new Person("nonUniquePerson", "nonUniqueLastName")); +repo.save((int) repo.count(), new Person("nonUniquePerson", "nonUniqueLastName")); +repo.save((int) repo.count(), new Person("nonUniquePerson", "nonUniqueLastName")); +} + +/** {@inheritDoc} */ +@Override protected void afterTestsStopped() throws Exception { +ctx.destroy(); +} +@Test +public void testPutGet() { +Person person = new Person("some_name", "some_surname"); + +int id = CACHE_SIZE + 1; + +assertEquals(person, repo.save(id, person)); + +assertTrue(repo.existsById(id)); + +assertEquals(person, repo.findById(id).get()); + +try { +repo.save(person); + +fail("Managed to save a Person without ID"); +} +catch (UnsupportedOperationException e) { +//excepted Review comment: I think we should use it :) With `GridTestUtils.assertThrows` we can assert error message: ```java GridTestUtils .assertThrows( null, () -> repo.save(person), UnsupportedOperationException.class, "Use IgniteRepository.save(key,value) method instead." ); ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377049534 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,41 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); +String cacheName = executeExpression(annotation.cacheName()); -repoToCache.put(repoItf, annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String executeExpression(String spelExpression) { Review comment: ```suggestion @NotNull private String evaluateExpression(String spelExpression) { ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377048967 ## File path: modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java ## @@ -34,6 +34,16 @@ @EnableIgniteRepositories public class ApplicationConfiguration { +/** + * The bean with cache names Review comment: Need dots in the end :) ```suggestion * The bean with cache names. ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377047832 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,25 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); - -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = executeExpression(annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression Review comment: ```suggestion * Evaluate a SpEL expression. ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377048967 ## File path: modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java ## @@ -34,6 +34,16 @@ @EnableIgniteRepositories public class ApplicationConfiguration { +/** + * The bean with cache names Review comment: Need dots in the end :) ```suggestion * The bean with cache names. ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377049114 ## File path: modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java ## @@ -34,6 +34,16 @@ @EnableIgniteRepositories public class ApplicationConfiguration { +/** + * The bean with cache names + */ +@Bean +public CacheNamesBean cacheNames() { +CacheNamesBean bean = new CacheNamesBean(); +bean.setPersonCacheName("PersonCache"); +return bean; Review comment: Need empty line before. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377047999 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,25 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); - -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = executeExpression(annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String executeExpression(String spelExpression) { Review comment: ```suggestion @NotNull private String evaluateExpression(String spelExpression) { ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377050258 ## File path: modules/spring-data-2.2/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java ## @@ -34,6 +34,16 @@ @EnableIgniteRepositories public class ApplicationConfiguration { +/** + * The bean with cache names + */ +@Bean +public CacheNamesBean cacheNames() { +CacheNamesBean bean = new CacheNamesBean(); +bean.setPersonCacheName("PersonCache"); +return bean; Review comment: Empty line before :) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
smoldachev commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377048446 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,25 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); - -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = executeExpression(annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String executeExpression(String spelExpression) { +StandardBeanExpressionResolver resolver = new StandardBeanExpressionResolver(); +StandardEvaluationContext ec = new StandardEvaluationContext(); +ec.setBeanResolver(new BeanFactoryResolver(ctx.getAutowireCapableBeanFactory())); Review comment: Looks like we don't use `ec` variable This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sergeyuttsel opened a new pull request #7395: IGNITE-12433 checking column names for duplicates on create table statement
sergeyuttsel opened a new pull request #7395: IGNITE-12433 checking column names for duplicates on create table statement URL: https://github.com/apache/ignite/pull/7395 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377062632 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,25 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); - -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = executeExpression(annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377062162 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,25 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); - -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = executeExpression(annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String executeExpression(String spelExpression) { +StandardBeanExpressionResolver resolver = new StandardBeanExpressionResolver(); +StandardEvaluationContext ec = new StandardEvaluationContext(); +ec.setBeanResolver(new BeanFactoryResolver(ctx.getAutowireCapableBeanFactory())); Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377062241 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,25 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); - -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = executeExpression(annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String executeExpression(String spelExpression) { Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377062080 ## File path: modules/spring-data-2.0/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java ## @@ -34,6 +34,16 @@ @EnableIgniteRepositories public class ApplicationConfiguration { +/** + * The bean with cache names + */ +@Bean +public CacheNamesBean cacheNames() { +CacheNamesBean bean = new CacheNamesBean(); +bean.setPersonCacheName("PersonCache"); +return bean; Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Vladsz83 commented on a change in pull request #7358: IGNITE-12614 : Disallow silent deactivation of cluster to prevent in-mem data loss.
Vladsz83 commented on a change in pull request #7358: IGNITE-12614 : Disallow silent deactivation of cluster to prevent in-mem data loss. URL: https://github.com/apache/ignite/pull/7358#discussion_r377070501 ## File path: modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java ## @@ -388,11 +388,31 @@ ) public boolean pingNode(String nodeId); +/** Activates cluster. */ +@MXBeanDescription( Review comment: @nizhikov , how do you think, can we keep IgniteMXBean as it is now in this PR? With one new `clusterState(String state, boolean force)` Unfortunately, we can't use two different default-methods in the interfaces IgniteMXBean and Ignite: ` default public void active(boolean active){ active(active, false); } and default public void active(boolean active){ active(active, true); }` Jaca compilator forces us to choose one in IgniteKernal: `class org.apache.ignite.internal.IgniteKernal inherits unrelated defaults for active(boolean) from types org.apache.ignite.Ignite and org.apache.ignite.mxbean.IgniteMXBean` I think this happens because there are no real implementations of default methods within interfaces. They are just code sample for in-lining to implementation. So, we have two different implementations. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sergey-chugunov-1985 opened a new pull request #7396: Binary metadata should be written to disk outside of discovery thread
sergey-chugunov-1985 opened a new pull request #7396: Binary metadata should be written to disk outside of discovery thread URL: https://github.com/apache/ignite/pull/7396 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377087219 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -53,8 +70,11 @@ * * @param ignite */ -public IgniteRepositoryFactory(Ignite ignite) { +public IgniteRepositoryFactory(Ignite ignite, ApplicationContext ctx) { this.ignite = ignite; +this.ctx = ctx; +this.beanFactory = new DefaultListableBeanFactory(ctx.getAutowireCapableBeanFactory()); +this.beanExpressionContext = new BeanExpressionContext(beanFactory,null); Review comment: code style, please add space. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377088988 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -63,8 +83,11 @@ public IgniteRepositoryFactory(Ignite ignite) { * * @param cfg Ignite configuration. */ -public IgniteRepositoryFactory(IgniteConfiguration cfg) { +public IgniteRepositoryFactory(IgniteConfiguration cfg, ApplicationContext ctx) { this.ignite = Ignition.start(cfg); +this.ctx = ctx; +this.beanFactory = new DefaultListableBeanFactory(ctx.getAutowireCapableBeanFactory()); +this.beanExpressionContext = new BeanExpressionContext(beanFactory,null); Review comment: code style, please add space. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377089774 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactory.java ## @@ -108,11 +134,38 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = evaluateExpression(annotation.cacheName()); + +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * evaluate the SpEL expression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String evaluateExpression(String spelExpression) { +return (String)resolver.evaluate(spelExpression,beanExpressionContext); +} + +/** + * The method tryes to identify that the expression looks like SpEL extression + * + * @param expression string with a expression + * @return true if the string contains attributes of SpEL expression + * @see https://docs.spring.io/spring/docs/5.0.16.RELEASE/spring-framework-reference/core.html#expressions;>SpEL + */ +private boolean isSpelExpression(String expression) { Review comment: Please remove the dead code. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377100016 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -53,8 +70,11 @@ * * @param ignite */ -public IgniteRepositoryFactory(Ignite ignite) { +public IgniteRepositoryFactory(Ignite ignite, ApplicationContext ctx) { this.ignite = ignite; +this.ctx = ctx; +this.beanFactory = new DefaultListableBeanFactory(ctx.getAutowireCapableBeanFactory()); +this.beanExpressionContext = new BeanExpressionContext(beanFactory,null); Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377100655 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -73,8 +96,11 @@ public IgniteRepositoryFactory(IgniteConfiguration cfg) { * * @param springCfgPath A path to Ignite configuration. */ -public IgniteRepositoryFactory(String springCfgPath) { +public IgniteRepositoryFactory(String springCfgPath, ApplicationContext ctx) { this.ignite = Ignition.start(springCfgPath); +this.ctx = ctx; +this.beanFactory = new DefaultListableBeanFactory(ctx.getAutowireCapableBeanFactory()); +this.beanExpressionContext = new BeanExpressionContext(beanFactory,null); Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sk0x50 opened a new pull request #7397: IGNITE-12651 Non-comparable keys for eviction policy cause failure ha…
sk0x50 opened a new pull request #7397: IGNITE-12651 Non-comparable keys for eviction policy cause failure ha… URL: https://github.com/apache/ignite/pull/7397 …ndle and node shutdown. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] l4ndsc4pe opened a new pull request #7394: IGNITE-10698: Get rid of @MXBeanParametersNames and @MXBeanParametersDescriptions
l4ndsc4pe opened a new pull request #7394: IGNITE-10698: Get rid of @MXBeanParametersNames and @MXBeanParametersDescriptions URL: https://github.com/apache/ignite/pull/7394 1. New annotation for storing the name and description of the method argument added 2. New logic of getting parameter name\description implemented (backward compatible) 3. Tests for new logic of getting parameter name\description added 4. Old annotations are now marked as @Deprecated and replaced with new one 5. Minor codestyle issues fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sergeyuttsel closed pull request #7391: IGNITE-12433 checking column names for duplicates on create table statement
sergeyuttsel closed pull request #7391: IGNITE-12433 checking column names for duplicates on create table statement URL: https://github.com/apache/ignite/pull/7391 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377052511 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,25 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); - -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = executeExpression(annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String executeExpression(String spelExpression) { +StandardBeanExpressionResolver resolver = new StandardBeanExpressionResolver(); +StandardEvaluationContext ec = new StandardEvaluationContext(); +ec.setBeanResolver(new BeanFactoryResolver(ctx.getAutowireCapableBeanFactory())); Review comment: yes :-O . Will be refactored This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Vladsz83 commented on a change in pull request #7358: IGNITE-12614 : Disallow silent deactivation of cluster to prevent in-mem data loss.
Vladsz83 commented on a change in pull request #7358: IGNITE-12614 : Disallow silent deactivation of cluster to prevent in-mem data loss. URL: https://github.com/apache/ignite/pull/7358#discussion_r377070501 ## File path: modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java ## @@ -388,11 +388,31 @@ ) public boolean pingNode(String nodeId); +/** Activates cluster. */ +@MXBeanDescription( Review comment: @nizhikov , how do you think, can we keep IgniteMXBean as it is now in this PR? With one new `clusterState(String state, boolean force)` Unfortunately, we can't use two different default-methods in the interfaces IgniteMXBean and Ignite: ` default public void active(boolean active){ active(active, false); } and default public void active(boolean active){ active(active, true); }` Jaca compilator forces us to choose one in IgniteKernal: `class org.apache.ignite.internal.IgniteKernal inherits unrelated defaults for active(boolean) from types org.apache.ignite.Ignite and org.apache.ignite.mxbean.IgniteMXBean` I think this happens because there are no real implementations of default methods within interfaces. They are just code sample for in-lining to the implementation. So, we have two different implementations. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Vladsz83 commented on a change in pull request #7358: IGNITE-12614 : Disallow silent deactivation of cluster to prevent in-mem data loss.
Vladsz83 commented on a change in pull request #7358: IGNITE-12614 : Disallow silent deactivation of cluster to prevent in-mem data loss. URL: https://github.com/apache/ignite/pull/7358#discussion_r377070501 ## File path: modules/core/src/main/java/org/apache/ignite/mxbean/IgniteMXBean.java ## @@ -388,11 +388,31 @@ ) public boolean pingNode(String nodeId); +/** Activates cluster. */ +@MXBeanDescription( Review comment: @nizhikov , how do you think, can we keep IgniteMXBean as it is now in this PR? With one new `clusterState(String state, boolean force)` Unfortunately, we can't use two different default-methods in the interfaces IgniteMXBean and Ignite: ` default public void active(boolean active){ active(active, false); } and default public void active(boolean active){ active(active, true); } ` Jaca compilator forces us to choose one in IgniteKernal: `class org.apache.ignite.internal.IgniteKernal inherits unrelated defaults for active(boolean) from types org.apache.ignite.Ignite and org.apache.ignite.mxbean.IgniteMXBean` I think this happens because there are no real implementations of default methods within interfaces. They are just code sample for in-lining to the implementation. So, we have two different implementations. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377100109 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -63,8 +83,11 @@ public IgniteRepositoryFactory(Ignite ignite) { * * @param cfg Ignite configuration. */ -public IgniteRepositoryFactory(IgniteConfiguration cfg) { +public IgniteRepositoryFactory(IgniteConfiguration cfg, ApplicationContext ctx) { this.ignite = Ignition.start(cfg); +this.ctx = ctx; +this.beanFactory = new DefaultListableBeanFactory(ctx.getAutowireCapableBeanFactory()); +this.beanExpressionContext = new BeanExpressionContext(beanFactory,null); Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377056670 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactory.java ## @@ -107,12 +126,41 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); +String cacheName = executeExpression(annotation.cacheName()); -repoToCache.put(repoItf, annotation.cacheName()); +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * execute a SpEL extression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String executeExpression(String spelExpression) { Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377061733 ## File path: modules/spring-data-2.2/src/test/java/org/apache/ignite/springdata/misc/ApplicationConfiguration.java ## @@ -34,6 +34,16 @@ @EnableIgniteRepositories public class ApplicationConfiguration { +/** + * The bean with cache names + */ +@Bean +public CacheNamesBean cacheNames() { +CacheNamesBean bean = new CacheNamesBean(); +bean.setPersonCacheName("PersonCache"); +return bean; Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377089987 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactory.java ## @@ -108,11 +134,38 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = evaluateExpression(annotation.cacheName()); + +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * evaluate the SpEL expression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String evaluateExpression(String spelExpression) { +return (String)resolver.evaluate(spelExpression,beanExpressionContext); Review comment: Code style, space. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377089279 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -108,11 +134,23 @@ public IgniteRepositoryFactory(String springCfgPath) { Assert.hasText(annotation.cacheName(), "Set a name of an Apache Ignite cache using @RepositoryConfig " + "annotation to map this repository to the underlying cache."); -repoToCache.put(repoItf, annotation.cacheName()); +String cacheName = evaluateExpression(annotation.cacheName()); + +repoToCache.put(repoItf, cacheName); return super.getRepositoryMetadata(repoItf); } +/** + * evaluate the SpEL expression + * + * @param spelExpression SpEL expression + * @return the result of execution of the SpEL expression + */ +@NotNull private String evaluateExpression(String spelExpression) { +return (String)resolver.evaluate(spelExpression,beanExpressionContext); Review comment: code style, please add space. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377089080 ## File path: modules/spring-data-2.0/src/main/java/org/apache/ignite/springdata20/repository/support/IgniteRepositoryFactory.java ## @@ -73,8 +96,11 @@ public IgniteRepositoryFactory(IgniteConfiguration cfg) { * * @param springCfgPath A path to Ignite configuration. */ -public IgniteRepositoryFactory(String springCfgPath) { +public IgniteRepositoryFactory(String springCfgPath, ApplicationContext ctx) { this.ignite = Ignition.start(springCfgPath); +this.ctx = ctx; +this.beanFactory = new DefaultListableBeanFactory(ctx.getAutowireCapableBeanFactory()); +this.beanExpressionContext = new BeanExpressionContext(beanFactory,null); Review comment: code style, please add space. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
ingvard commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377090363 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactoryBean.java ## @@ -66,19 +66,19 @@ protected IgniteRepositoryFactoryBean(Class repositoryInterface) { try { Ignite ignite = (Ignite)ctx.getBean("igniteInstance"); -return new IgniteRepositoryFactory(ignite); +return new IgniteRepositoryFactory(ignite,ctx); Review comment: space here and below. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically
schernolyas commented on a change in pull request #7381: It is needed to set used cache for Spring Data dynamically URL: https://github.com/apache/ignite/pull/7381#discussion_r377102581 ## File path: modules/spring-data-2.2/src/main/java/org/apache/ignite/springdata22/repository/support/IgniteRepositoryFactoryBean.java ## @@ -66,19 +66,19 @@ protected IgniteRepositoryFactoryBean(Class repositoryInterface) { try { Ignite ignite = (Ignite)ctx.getBean("igniteInstance"); -return new IgniteRepositoryFactory(ignite); +return new IgniteRepositoryFactory(ignite,ctx); Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alievmirza opened a new pull request #7400: IGNITE-11939 Fixing error when concurrently releasing preloaded histo…
alievmirza opened a new pull request #7400: IGNITE-11939 Fixing error when concurrently releasing preloaded histo… URL: https://github.com/apache/ignite/pull/7400 …ry for WAL This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Mmuzaf opened a new pull request #7401: Ignite 2.7
Mmuzaf opened a new pull request #7401: Ignite 2.7 URL: https://github.com/apache/ignite/pull/7401 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Mmuzaf opened a new pull request #7402: Ignite 2.7
Mmuzaf opened a new pull request #7402: Ignite 2.7 URL: https://github.com/apache/ignite/pull/7402 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Mmuzaf closed pull request #7402: Ignite 2.7
Mmuzaf closed pull request #7402: Ignite 2.7 URL: https://github.com/apache/ignite/pull/7402 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] Mmuzaf closed pull request #7401: Ignite 2.7
Mmuzaf closed pull request #7401: Ignite 2.7 URL: https://github.com/apache/ignite/pull/7401 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alievmirza closed pull request #7344: Gg 27120 investigate falling tests
alievmirza closed pull request #7344: Gg 27120 investigate falling tests URL: https://github.com/apache/ignite/pull/7344 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r373434864 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java ## @@ -672,43 +717,14 @@ private CacheStoreHolder initDir(File cacheWorkDir, if (dirExisted && !idxFile.exists()) grpsWithoutIdx.add(grpId); -FileIOFactory pageStoreFileIoFactory = this.pageStoreFileIoFactory; -FileIOFactory pageStoreV1FileIoFactory = this.pageStoreV1FileIoFactory; - -if (encrypted) { -pageStoreFileIoFactory = new EncryptedFileIOFactory( -this.pageStoreFileIoFactory, -grpId, -pageSize(), -cctx.kernalContext().encryption(), -cctx.gridConfig().getEncryptionSpi()); - -pageStoreV1FileIoFactory = new EncryptedFileIOFactory( -this.pageStoreV1FileIoFactory, -grpId, -pageSize(), -cctx.kernalContext().encryption(), -cctx.gridConfig().getEncryptionSpi()); -} - -FileVersionCheckingFactory pageStoreFactory = new FileVersionCheckingFactory( -pageStoreFileIoFactory, -pageStoreV1FileIoFactory, -igniteCfg.getDataStorageConfiguration() -); - -if (encrypted) { -int headerSize = pageStoreFactory.headerSize(pageStoreFactory.latestVersion()); - - ((EncryptedFileIOFactory)pageStoreFileIoFactory).headerSize(headerSize); - ((EncryptedFileIOFactory)pageStoreV1FileIoFactory).headerSize(headerSize); -} +FileVersionCheckingFactory pageStoreFactory = (FileVersionCheckingFactory)getPageStoreFactory(grpId, Review comment: No need to cast here. Just use `FilePageStoreFactory` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377130280 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r37326 ## File path: modules/core/src/main/java/org/apache/ignite/configuration/DataStorageConfiguration.java ## @@ -81,6 +81,9 @@ (long)(DFLT_DATA_REGION_FRACTION * U.getTotalMemoryAvailable()), DFLT_DATA_REGION_INITIAL_SIZE); +/** Default working directory for snapshot temporary files. */ Review comment: As far as I understand it's not a temporary files holder. It's a directory for a final snapshot. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377046233 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotOperationAdapter.java ## @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.util.HashSet; +import java.util.Set; + +/** + * A convinient adapter for default snapshot operation. + */ +public class SnapshotOperationAdapter implements SnapshotOperation { Review comment: Can't find any usage of this class. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377128826 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r376389739 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r375720873 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java ## @@ -103,7 +108,7 @@ private boolean skipCrc = IgniteSystemProperties.getBoolean(IGNITE_PDS_SKIP_CRC, false); /** */ -private final ReadWriteLock lock = new ReentrantReadWriteLock(); +private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); Review comment: See no reason to change class This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r376389992 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377139287 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377015645 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377134976 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377073473 ## File path: modules/core/src/main/java/org/apache/ignite/internal/util/GridIntList.java ## @@ -137,6 +138,22 @@ public GridIntList copy() { return res; } +/** + * @param ints The set of partitions. Review comment: There is still `partitions` in javadoc. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377016783 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r373001693 ## File path: modules/core/src/main/java/org/apache/ignite/internal/pagemem/store/PageWriteListener.java ## @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.pagemem.store; + +import java.nio.ByteBuffer; + +/** + * Review comment: I think we should describe somehow when and how this interface should be used. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377138133 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotTask.java ## @@ -0,0 +1,929 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.Closeable; +import java.io.File; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicIntegerArray; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import java.util.function.BooleanSupplier; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.pagemem.PageIdUtils; +import org.apache.ignite.internal.pagemem.store.PageStore; +import org.apache.ignite.internal.pagemem.store.PageWriteListener; +import org.apache.ignite.internal.processors.cache.CacheGroupContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.DbCheckpointListener; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.partstate.PagesAllocationRange; +import org.apache.ignite.internal.processors.cache.persistence.partstate.PartitionAllocationMap; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import org.apache.ignite.internal.util.GridIntIterator; +import org.apache.ignite.internal.util.GridIntList; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.lang.IgniteThrowableRunner; +import org.apache.ignite.internal.util.tostring.GridToStringExclude; +import org.apache.ignite.internal.util.typedef.internal.A; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.internal.util.typedef.internal.U; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.internal.pagemem.PageIdAllocator.INDEX_PARTITION; +import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.cacheDirName; +import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.cacheWorkDir; +import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.getPartitionFile; +import static org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.getPartionDeltaFile; +import static org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.relativeNodePath; + +/** + * + */ +class SnapshotTask implements DbCheckpointListener, Closeable { +/** Shared context. */ +private final GridCacheSharedContext cctx; + +/** Ignite logger */ +private final IgniteLogger log; + +/** Factory to working with delta as
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377069874 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java ## @@ -981,13 +995,26 @@ public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteChecked // No-op. } -/** - * @param fut Partition exchange future. - */ +/** + * @param fut Partition exchange future. + */ public void rebuildIndexesIfNeeded(GridDhtPartitionsExchangeFuture fut) { // No-op. } +/** + * @param cacheCtx Cache context to rebuild index at. + * @param partPred The partition filter predicate. + * @param restore true to rebuild indexes from the original store. + */ +public IgniteInternalFuture rebuildIndexesOnDemand( Review comment: Can't find any usage of this method. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r376393923 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial
alex-plekhanov commented on a change in pull request #6554: IGNITE-11073: Backup page store manager, initial URL: https://github.com/apache/ignite/pull/6554#discussion_r377136525 ## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java ## @@ -0,0 +1,1461 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.channels.FileChannel; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Queue; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.atomic.LongAdder; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.binary.BinaryType; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.failure.FailureContext; +import org.apache.ignite.failure.FailureType; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.GridTopic; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.MarshallerMappingWriter; +import org.apache.ignite.internal.NodeStoppingException; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.managers.communication.GridIoManager; +import org.apache.ignite.internal.managers.communication.GridMessageListener; +import org.apache.ignite.internal.managers.communication.TransmissionCancelledException; +import org.apache.ignite.internal.managers.communication.TransmissionHandler; +import org.apache.ignite.internal.managers.communication.TransmissionMeta; +import org.apache.ignite.internal.managers.communication.TransmissionPolicy; +import org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter; +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState; +import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; +import org.apache.ignite.internal.processors.cache.persistence.StorageException; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIO; +import org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreFactory; +import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; +import org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory; +import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings; +import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId; +import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; +import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; +import
[GitHub] [ignite] AMashenkov opened a new pull request #7398: GG-27320
AMashenkov opened a new pull request #7398: GG-27320 URL: https://github.com/apache/ignite/pull/7398 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [ignite] sk0x50 opened a new pull request #7399: IGNITE-12654 Some of rentingFutures in GridDhtPartitionTopologyImpl m…
sk0x50 opened a new pull request #7399: IGNITE-12654 Some of rentingFutures in GridDhtPartitionTopologyImpl m… URL: https://github.com/apache/ignite/pull/7399 …ay accumulate a huge number of eviction callbacks. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services