From 964577235818d4811912821e44c3ef8961a226c0 Mon Sep 17 00:00:00 2001 From: Prasad Kommoju Date: Wed, 12 May 2021 11:34:48 -0700 Subject: [PATCH 01/16] Documentation update Add document about transactional semantics for Alcor Caches in general and spefically about Ignite Caches. --- .../pages/db_services/alcor-transactions.adoc | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 docs/modules/ROOT/pages/db_services/alcor-transactions.adoc diff --git a/docs/modules/ROOT/pages/db_services/alcor-transactions.adoc b/docs/modules/ROOT/pages/db_services/alcor-transactions.adoc new file mode 100644 index 000000000..c96a7cf00 --- /dev/null +++ b/docs/modules/ROOT/pages/db_services/alcor-transactions.adoc @@ -0,0 +1,162 @@ +== Transactions in Alcor +Prasad Kommoju + +v.01, 2021-05-05 + +:toc: right + +== Overview + +This document explains the role of transactions in Alcor and provides a set of guidelines for new services and caches to follow so that they conform to the behavior required. + + +== Brief introduction to transactions + +A transaction is a term from database world. Where it refers to some work by the code which changes some persistent data. For the state of the program to be consistent, either all of it is done, or no part of it is done. This property of all or nothing of transactions is called atomicity. + +Another property of transactions is called isolation, which means, even when multiple processes and threads operate on a data item simultaneously, the end result should be as if they were done in a specific order and not in some arbitrarily interleaved order. Furthermore, at any point of time the execution of these changes the data remains in a consistent state. The concepts are the same in Alcor. + +In Alcor there are many data stores to store the state of the system. Currently the data store is Apache Ignite but the general concepts and techniques laid down by these guidelines apply to any data store. In this document, cache and store are used interchangeably where this is no ambiguity. + +Ignite supports three modes of transactions: + + 1) ATMOIC: In DBMS world, this is called AUTO COMMIT. If an individual data store operation succeeds, its effects are made permanent immediately. There is no way to ask the system to undo the changes. If it fails, the attempted changes are thrown away. Code itself will have to handle undoing the changes if some other condition warrants it. + + 2) TRANSACTIONAL: In DBMS world, this is called MANUAL COMMIT. The code will have to start a transaction, and if everything is good, it will have to issue a COMMIT to make the changes permanent. If for any reason, the changes already made need to be undone, then the code issues a ROLLBACK. If the code does not start a transaction, or explicitly ask for a COMMIT, all changes will be thrown away. + + 3) TRANSACTAIONAL_SNAPSHOT: Not applicable for K-V stores, which are what Alcor uses. It is Applicable to SQL objects only. + +== Transactions in Alcor + +The three main requirements of transactions in Alcor cane be summarized as follows: + +1) Single operations +2) Multicache operations +3) Multi microservice operations +4) Reading a snapshot view of cache(s). + +=== Single cache operations +When a cache is modified in some way and some other condition fails because of errors or exceptions, the cache operation will have to reverted to bring the cache to its original state. + +=== Multicache operations +Some operations may require modifying more than one cache at the same time and in atomic manner. If a later cache operation fails, all of the previously successful cache operations will have to be reverted. Ignite requires that all caches under a transaction have the same transactional mode, either all are ATOMIC, or all are TRANSACTIONAL. Trying to mix operations on multiple caches having multiple atomicity modes will result in an exception. + +=== Multi microservice operations +Each micro service has its own data store and works independently of others but in a coordinated manner. When an operation involves atomic modification of caches owned by more than microservice, one failed operation will have to revert previously successful cache operations. + +=== Reading a snapshot view of cache(s) +Even when an operation requires only reading of a cache, in order to avoid certain anomalous conditions a transaction will be required, specifically, a particular form of isolation property of transactions. + +Transactions and their atomicity and isolation properties ensure that the caches are always consistent, but they come at a cost - reduced concurrency and thus performance. + + +This document focuses on (1) and (2). (3) is now handled by handcrafted rollback mechanism, which is not correct or robust, and possibly expensive too. We will address this later by using the mechanisms supported by the underlying data store. + +Also, this document focuses on Ignite because that is what the current data store is. More or less the same approaches will be needed if another data store were to be used. + +== Enabling TRANSACTONAL Atomicity of Caches + +There are two ways add transactional semantics to Alcor code: + +1) Ignite configuration + +2) Basing the cache on a specific kind of base class + + +=== Ignite configuration +In the Ignite configuration file (Kubernetes/services/ignite_config.xml) used in K8S, or local ignite config file (config/ignite-config.xml) in the Alcor source root. + + a) Add a Bean under the property "cacheConfiguration" + + + + + + + + + + +CACHE_NAME should match the name passed to getCache() method of the cache factory. Usually, this is simply getCache(CacheClass.class) but it could be a hard coded one like getCache("dpm_node_info") when the same class is the type of the Value of entry in the cache. + +If CacheClass.class is passed as the name, then value property should be set to the canonical name of that class. For instance, creating a cache with getCache(PortEntity.class) will requires the value to be set to "com.futurewei.alcor.web.entity.port.PortEntity". + +If more than one cache is instantiated as in ICache and getCache called with VType.class, all of them will be known to Ignite by the same name and represent the same physical cache store. If this is not the desired behavior, then different caches of VType instantiations should use a different name in getCache(). + +=== Basing the cache on a specific kind of base class +This is not supported at the time at a finer granularity. The reason is that Ignite does not seem to allow changing the atomicity of a cache after it has been created. + +Regardless of which of the two methods is followed, if the given cache is housed in a class by it self, or along with one or more other caches, the following guidelines apply. In the first case, it is optional but in the second case it is strongly recommended. + +The class definition for the cache will have to + +* Declare a data member of type CacheFactory +* Assign to CacheFactory data member the parameter of type CacheFactoty passed into the constructor, +* Define a public method getTransaction() which returns cacheFactory.getTransaction(). + +This purpose of this guidelines is to minimize code changes outside the class housing the cache object if and when the manner of obtaining a transaction from the underlying data store changes. + +==== Illustration: +---- +public class MyCache { + private ICache myCache; + private CacheFactory cacheFactory; + + @Autowired + public MyCache(CacheFactory cacheFactory) { + this.cacheFactory = cacheFactory; + this.myCache = cacheFactory.getCache(Vtype.class); + } + + ... + + public Transaction getTransaction() { + return cacheFactory.getTransaction(); + } + + ... +} +---- + +== Working under TRANSACATIONAL atomicity + +Alcor code which interfaces to Ignite caches is structured in such a way that all caches opened or created by a specific "connection" to Ignite all share a common "Ignite client". All these caches have a getTransaction() method which ultimately resolves to the same transaction object. + + +Single cache operations should adhere to the following pattern: + +---- + ... + try { + Transaction txn = myCache.getTransaction().start(); + myCache.put(...); + myCache.remove(...); + ... + txn.commit(); + } + catch (...) { + // log a message and anything else required. + // No need to "Undo" the effects of put(), and remove() + } + ... +---- + +Multi cache operations should adhere to the following pattern: + +---- + ... + try { + Transaction txn = firstCache.getTransaction().start(); + firstCache.put(...); + secondCache.remove(...); + ... + txn.commit(); + } + catch (...) { + // log a message and anything else required. + // No need to "Undo" the effects of put(), and remove() + } + ... +---- + + That is, start a transaction on any one of the caches whose changes should be applied in all or nothing manner, do the operations on all of them and commit when conditions are appropriate. If a throw happens, there is no need to "undo" the cache changes. If some other error is detetected, inside the try block, it might be easier to log it and throw an exception so that the data store automatically rollback changes applied by earlier code. From 183c36a75d63562f99cd4b76b696903f41385cc6 Mon Sep 17 00:00:00 2001 From: Prasad Kommoju Date: Fri, 21 May 2021 17:44:56 -0700 Subject: [PATCH 02/16] Apply changes suggested in review --- .../pages/db_services/alcor-transactions.adoc | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/docs/modules/ROOT/pages/db_services/alcor-transactions.adoc b/docs/modules/ROOT/pages/db_services/alcor-transactions.adoc index c96a7cf00..4c6574053 100644 --- a/docs/modules/ROOT/pages/db_services/alcor-transactions.adoc +++ b/docs/modules/ROOT/pages/db_services/alcor-transactions.adoc @@ -1,8 +1,6 @@ -== Transactions in Alcor += Transactions in Alcor Prasad Kommoju - v.01, 2021-05-05 - :toc: right == Overview @@ -41,7 +39,7 @@ When a cache is modified in some way and some other condition fails because of e === Multicache operations Some operations may require modifying more than one cache at the same time and in atomic manner. If a later cache operation fails, all of the previously successful cache operations will have to be reverted. Ignite requires that all caches under a transaction have the same transactional mode, either all are ATOMIC, or all are TRANSACTIONAL. Trying to mix operations on multiple caches having multiple atomicity modes will result in an exception. -=== Multi microservice operations +=== Multi microservice operations Each micro service has its own data store and works independently of others but in a coordinated manner. When an operation involves atomic modification of caches owned by more than microservice, one failed operation will have to revert previously successful cache operations. === Reading a snapshot view of cache(s) @@ -81,10 +79,10 @@ CACHE_NAME should match the name passed to getCache() method of the cache factor If CacheClass.class is passed as the name, then value property should be set to the canonical name of that class. For instance, creating a cache with getCache(PortEntity.class) will requires the value to be set to "com.futurewei.alcor.web.entity.port.PortEntity". -If more than one cache is instantiated as in ICache and getCache called with VType.class, all of them will be known to Ignite by the same name and represent the same physical cache store. If this is not the desired behavior, then different caches of VType instantiations should use a different name in getCache(). +If more than one cache is instantiated as in ICache and getCache called with VType.class, all of them will be known to Ignite by the same name and represent the same physical cache store. If this is not the desired behavior, then different caches of VType instantiations should use a different name in getCache(). === Basing the cache on a specific kind of base class -This is not supported at the time at a finer granularity. The reason is that Ignite does not seem to allow changing the atomicity of a cache after it has been created. +This is not supported at the time at a finer granularity. The reason is that Ignite does not allow changing the atomicity of a cache after it has been created. Regardless of which of the two methods is followed, if the given cache is housed in a class by it self, or along with one or more other caches, the following guidelines apply. In the first case, it is optional but in the second case it is strongly recommended. @@ -99,22 +97,23 @@ This purpose of this guidelines is to minimize code changes outside the class ho ==== Illustration: ---- public class MyCache { - private ICache myCache; - private CacheFactory cacheFactory; - - @Autowired - public MyCache(CacheFactory cacheFactory) { - this.cacheFactory = cacheFactory; - this.myCache = cacheFactory.getCache(Vtype.class); - } - - ... + private ICache myCache; + private CacheFactory cacheFactory; + + @Autowired + public MyCache(CacheFactory cacheFactory) { + this.cacheFactory = cacheFactory; + this.myCache = cacheFactory.getCache(Vtype.class); +} + +... + +public Transaction getTransaction() { + return cacheFactory.getTransaction(); +} + +... - public Transaction getTransaction() { - return cacheFactory.getTransaction(); - } - - ... } ---- From e079a440a22442eba007b5eaabe2c6786e210c55 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Thu, 8 Jul 2021 23:58:03 -0700 Subject: [PATCH 03/16] Fix race condition in VPC Mgr delete subnet API --- .../subnet/controller/SubnetController.java | 24 ++++++------ ...t.java => HaveNonGatewayPortInSubnet.java} | 4 +- .../alcor/subnet/service/SubnetService.java | 2 +- .../service/implement/SubnetServiceImp.java | 23 +++++++----- .../vpcmanager/controller/VpcController.java | 37 ++++++------------- .../alcor/vpcmanager/dao/VpcRepository.java | 9 +++++ .../service/Impl/VpcDatabaseServiceImpl.java | 34 ++++++++++++++++- .../service/VpcDatabaseService.java | 1 + 8 files changed, 81 insertions(+), 53 deletions(-) rename services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/exception/{HavePortInSubnet.java => HaveNonGatewayPortInSubnet.java} (91%) diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java index 049269cb2..cd0ac7304 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java @@ -518,18 +518,10 @@ public ResponseId deleteSubnetState(@PathVariable String projectId, @PathVariabl } String rangeId = null; - String ipV4RangeId = subnetEntity.getIpV4RangeId(); - String ipV6RangeId = subnetEntity.getIpV6RangeId(); - if (ipV4RangeId != null) { - rangeId = ipV4RangeId; + if (subnetEntity.getIpVersion() == 6) { + rangeId = subnetEntity.getIpV6RangeId(); } else { - rangeId = ipV6RangeId; - } - - // TODO: check if there is any gateway / non-gateway port for the subnet, waiting for PM new API - Boolean checkIfAnyNoneGatewayPortInSubnet = this.subnetService.checkIfAnyPortInSubnet(projectId, subnetId); - if (checkIfAnyNoneGatewayPortInSubnet) { - throw new HavePortInSubnet(); + rangeId = subnetEntity.getIpV4RangeId(); } // check if subnet bind any router @@ -545,7 +537,13 @@ public ResponseId deleteSubnetState(@PathVariable String projectId, @PathVariabl logger.warn(e.getMessage()); } - // TODO: delete gateway port in port manager. Temporary solution, need PM fix issue + // check if there is any non-gateway port for the subnet + Boolean checkIfAnyNoneGatewayPortInSubnet = this.subnetService.checkIfAnyNonGatewayPortInSubnet(projectId, subnetEntity); + if (checkIfAnyNoneGatewayPortInSubnet) { + throw new HaveNonGatewayPortInSubnet(); + } + + // delete gateway port in port manager GatewayPortDetail gatewayPortDetail = subnetEntity.getGatewayPortDetail(); if (gatewayPortDetail != null) { this.subnetToPortManagerService.deleteGatewayPort(projectId, gatewayPortDetail.getGatewayPortId()); @@ -559,7 +557,7 @@ public ResponseId deleteSubnetState(@PathVariable String projectId, @PathVariabl this.subnetDatabaseService.deleteSubnet(subnetId); - } catch (ParameterNullOrEmptyException | HavePortInSubnet | SubnetBindRouter e) { + } catch (ParameterNullOrEmptyException | HaveNonGatewayPortInSubnet | SubnetBindRouter e) { logger.error(e.getMessage()); throw new Exception(e); } diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/exception/HavePortInSubnet.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/exception/HaveNonGatewayPortInSubnet.java similarity index 91% rename from services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/exception/HavePortInSubnet.java rename to services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/exception/HaveNonGatewayPortInSubnet.java index 7fe245e09..b1f37f369 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/exception/HavePortInSubnet.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/exception/HaveNonGatewayPortInSubnet.java @@ -18,6 +18,6 @@ free of charge, to any person obtaining a copy of this software and associated d import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; -@ResponseStatus(code= HttpStatus.CONFLICT, reason="There is some ports in the subnet, we can Not delete subnet") -public class HavePortInSubnet extends Exception { +@ResponseStatus(code= HttpStatus.CONFLICT, reason="There is some customer ports in the subnet, we can Not delete subnet") +public class HaveNonGatewayPortInSubnet extends Exception { } diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/SubnetService.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/SubnetService.java index 382880e8d..8d7c79639 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/SubnetService.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/SubnetService.java @@ -76,7 +76,7 @@ public void fallbackOperation (AtomicReference routeResponseAtomic public void deleteSubnetIdInVpc (String subnetId, String projectId, String vpcId) throws Exception; // check if there is any port in this subnet - public boolean checkIfAnyPortInSubnet (String projectId, String subnetId) throws SubnetIdIsNull; + public boolean checkIfAnyNonGatewayPortInSubnet(String projectId, SubnetEntity subnetEntity) throws SubnetIdIsNull; // check if subnet bind any routes public boolean checkIfSubnetBindAnyRouter(SubnetEntity subnetEntity); diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java index 85fa2f340..6088c18eb 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java @@ -40,6 +40,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.web.entity.route.*; import com.futurewei.alcor.web.entity.subnet.*; import com.futurewei.alcor.web.entity.vpc.VpcWebJson; +import io.netty.util.internal.StringUtil; import org.apache.commons.net.util.SubnetUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -388,13 +389,16 @@ public void deleteSubnetIdInVpc(String subnetId, String projectId, String vpcId) } @Override - public boolean checkIfAnyPortInSubnet(String projectId, String subnetId) throws SubnetIdIsNull { - if (subnetId == null) { + public boolean checkIfAnyNonGatewayPortInSubnet(String projectId, SubnetEntity subnetEntity) throws SubnetIdIsNull { + if (subnetEntity == null || StringUtil.isNullOrEmpty(subnetEntity.getId())) { throw new SubnetIdIsNull(); } - String portManagerServiceUrl = portUrl + "project/" + projectId + "/subnet-port-count/" + subnetId; - int portCount = restTemplate.getForObject(portManagerServiceUrl, Integer.class); - if (portCount == 0) { + + String portManagerServiceUrl = portUrl + "project/" + projectId + "/subnet-port-count/" + subnetEntity.getId(); + int portCount = restTemplate.getForObject(portManagerServiceUrl, Integer.class); + if (portCount == 0 && StringUtil.isNullOrEmpty(subnetEntity.getGatewayPortId())) { + return false; + } else if (portCount == 1 && !StringUtil.isNullOrEmpty(subnetEntity.getGatewayPortId())) { return false; } @@ -405,7 +409,7 @@ public boolean checkIfAnyPortInSubnet(String projectId, String subnetId) throws public boolean checkIfSubnetBindAnyRouter(SubnetEntity subnetEntity) { String attachedRouterId = subnetEntity.getAttachedRouterId(); - if (attachedRouterId == null || attachedRouterId.equals("")){ + if (attachedRouterId == null || attachedRouterId.equals("")) { return false; } @@ -414,7 +418,7 @@ public boolean checkIfSubnetBindAnyRouter(SubnetEntity subnetEntity) { @Override @DurationStatistics - public boolean checkIfCidrOverlap(String cidr,String projectId, String vpcId) throws FallbackException, ResourceNotFoundException, ResourcePersistenceException, CidrNotWithinNetworkCidr, CidrOverlapWithOtherSubnets { + public boolean checkIfCidrOverlap(String cidr, String projectId, String vpcId) throws FallbackException, ResourceNotFoundException, ResourcePersistenceException, CidrNotWithinNetworkCidr, CidrOverlapWithOtherSubnets { // get vpc and check with vpc cidr VpcWebJson vpcWebJson = verifyVpcId(projectId, vpcId); @@ -425,8 +429,7 @@ public boolean checkIfCidrOverlap(String cidr,String projectId, String vpcId) th throw new CidrNotWithinNetworkCidr(); } } - - + // get subnet list and check with subnets cidr List subnetIds = vpcWebJson.getNetwork().getSubnets(); for (String subnetId : subnetIds) { @@ -636,7 +639,7 @@ public void deleteIPRangeInPIM(String rangeId) { return; } - String ipManagerCreateRangeUrl = ipUrl + "range/"+ rangeId; + String ipManagerCreateRangeUrl = ipUrl + "range/" + rangeId; restTemplate.delete(ipManagerCreateRangeUrl); } diff --git a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java index 746d44731..a3d2c08de 100644 --- a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java +++ b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java @@ -68,7 +68,7 @@ public class VpcController { * @return vpc state * @throws Exception */ - @Rbac(resource ="vpc") + @Rbac(resource = "vpc") @FieldFilter(type = VpcEntity.class) @RequestMapping( method = GET, @@ -114,7 +114,7 @@ public VpcsWebJson createVpcStateBulk(@PathVariable String projectid, @RequestBo * @return vpc state * @throws Exception */ - @Rbac(resource ="vpc") + @Rbac(resource = "vpc") @RequestMapping( method = POST, value = {"/project/{projectid}/vpcs"}) @@ -194,7 +194,7 @@ public VpcWebJson createVpcState(@PathVariable String projectid, @RequestBody Vp * @return vpc state * @throws Exception */ - @Rbac(resource ="vpc") + @Rbac(resource = "vpc") @RequestMapping( method = PUT, value = {"/project/{projectid}/vpcs/{vpcid}"}) @@ -252,7 +252,7 @@ public VpcWebJson updateVpcStateByVpcId(@PathVariable String projectid, @PathVar * @return network id * @throws Exception */ - @Rbac(resource ="vpc") + @Rbac(resource = "vpc") @RequestMapping( method = DELETE, value = {"/project/{projectid}/vpcs/{vpcid}"}) @@ -290,7 +290,7 @@ public ResponseId deleteVpcStateByVpcId(@PathVariable String projectid, @PathVar * @return Map * @throws Exception */ - @Rbac(resource ="vpc") + @Rbac(resource = "vpc") @FieldFilter(type = VpcEntity.class) @RequestMapping( method = GET, @@ -298,8 +298,8 @@ public ResponseId deleteVpcStateByVpcId(@PathVariable String projectid, @PathVar @DurationStatistics public VpcsWebJson getVpcStatesByProjectId(@PathVariable String projectId) throws Exception { Map vpcStates = null; - Map requestParams = (Map)request.getAttribute(QUERY_ATTR_HEADER); - requestParams = requestParams == null ? request.getParameterMap():requestParams; + Map requestParams = (Map) request.getAttribute(QUERY_ATTR_HEADER); + requestParams = requestParams == null ? request.getParameterMap() : requestParams; Map queryParams = ControllerUtil.transformUrlPathParams(requestParams, VpcEntity.class); @@ -339,6 +339,7 @@ public Map getVpcCountAndAllVpcStates() throws CacheException { /** * Updates a network with subnet id + * * @param projectid * @param vpcid * @param subnetid @@ -381,11 +382,11 @@ public VpcWebJson addSubnetIdToVpcState(@PathVariable String projectid, @PathVar } return new VpcWebJson(inVpcState); - } /** * delete subnet id in a network + * * @param projectid * @param vpcid * @param subnetid @@ -398,35 +399,19 @@ public VpcWebJson addSubnetIdToVpcState(@PathVariable String projectid, @PathVar @DurationStatistics public VpcWebJson deleteSubnetIdInVpcState(@PathVariable String projectid, @PathVariable String vpcid, @PathVariable String subnetid) throws Exception { - VpcEntity inVpcState = new VpcEntity(); + VpcEntity inVpcState = null; try { RestPreconditionsUtil.verifyParameterNotNullorEmpty(projectid); RestPreconditionsUtil.verifyParameterNotNullorEmpty(vpcid); RestPreconditionsUtil.verifyParameterNotNullorEmpty(subnetid); - inVpcState = this.vpcDatabaseService.getByVpcId(vpcid); - if (inVpcState == null) { - throw new ResourceNotFoundException("Vpc not found : " + vpcid); - } - - List subnets = inVpcState.getSubnets(); - if (subnets == null || !subnets.contains(subnetid)) { - return new VpcWebJson(inVpcState); - } - subnets.remove(subnetid); - - inVpcState.setSubnets(subnets); - - this.vpcDatabaseService.addVpc(inVpcState); - - inVpcState = this.vpcDatabaseService.getByVpcId(vpcid); + inVpcState = this.vpcDatabaseService.deleteSubnetIdInVpc(vpcid, subnetid); } catch (ParameterNullOrEmptyException e) { throw new Exception(e); } return new VpcWebJson(inVpcState); - } } \ No newline at end of file diff --git a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/dao/VpcRepository.java b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/dao/VpcRepository.java index d02bc480e..b15491599 100644 --- a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/dao/VpcRepository.java +++ b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/dao/VpcRepository.java @@ -18,6 +18,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.CacheException; import com.futurewei.alcor.common.db.CacheFactory; import com.futurewei.alcor.common.db.ICache; +import com.futurewei.alcor.common.db.Transaction; import com.futurewei.alcor.common.db.repo.ICacheRepository; import com.futurewei.alcor.common.logging.Logger; import com.futurewei.alcor.common.logging.LoggerFactory; @@ -43,6 +44,14 @@ public ICache getCache() { private ICache cache; + public Transaction startTransaction() throws CacheException { + return cache.getTransaction().start(); + } + + public void commitTransaction() throws CacheException { + cache.getTransaction().commit(); + } + @Autowired public VpcRepository(CacheFactory cacheFactory) { cache = cacheFactory.getCache(VpcEntity.class); diff --git a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java index 207188377..8368e7bca 100644 --- a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java +++ b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java @@ -18,15 +18,18 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.CacheException; import com.futurewei.alcor.common.db.ICache; import com.futurewei.alcor.common.exception.DatabasePersistenceException; +import com.futurewei.alcor.common.exception.ResourceNotFoundException; import com.futurewei.alcor.common.stats.DurationStatistics; import com.futurewei.alcor.vpcmanager.dao.VpcRepository; import com.futurewei.alcor.vpcmanager.service.VpcDatabaseService; import com.futurewei.alcor.web.entity.vpc.VpcEntity; +import com.futurewei.alcor.web.entity.vpc.VpcWebJson; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; @Service @@ -42,7 +45,7 @@ public class VpcDatabaseServiceImpl implements VpcDatabaseService { public VpcEntity getByVpcId(String vpcId) { try { return this.vpcRepository.findItem(vpcId); - }catch (Exception e) { + } catch (Exception e) { return null; } } @@ -75,6 +78,35 @@ public void deleteVpc(String id) throws CacheException { this.vpcRepository.deleteItem(id); } + @Override + public VpcEntity deleteSubnetIdInVpc(String vpcId, String subnetId) throws ResourceNotFoundException, DatabasePersistenceException, CacheException { + + VpcEntity currentVpcState = null; + + try { + this.vpcRepository.startTransaction(); + currentVpcState = getByVpcId(vpcId); + if (currentVpcState == null) { + throw new ResourceNotFoundException("Vpc not found : " + vpcId); + } + + List subnets = currentVpcState.getSubnets(); + if (subnets == null || !subnets.contains(subnetId)) { + return currentVpcState; + } + + subnets.remove(subnetId); + currentVpcState.setSubnets(subnets); + addVpc(currentVpcState); + } catch (ResourceNotFoundException | DatabasePersistenceException | CacheException e) { + throw e; + } finally { + this.vpcRepository.commitTransaction(); + } + + return currentVpcState; + } + @Override @DurationStatistics public ICache getCache() { diff --git a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java index 894b7dc4e..dba4a4a0c 100644 --- a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java +++ b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java @@ -31,6 +31,7 @@ public interface VpcDatabaseService { public Map getAllVpcs (Map queryParams) throws CacheException; public void addVpc (VpcEntity vpcState) throws DatabasePersistenceException; public void deleteVpc (String id) throws CacheException; + public VpcEntity deleteSubnetIdInVpc(String vpcId, String subnetId) throws ResourceNotFoundException, DatabasePersistenceException, CacheException; public ICache getCache (); } From 4831ad652004d1ae6777dd03003afabb76867ab4 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Fri, 9 Jul 2021 00:15:56 -0700 Subject: [PATCH 04/16] Set subnset ip version as IPv4 --- .../java/com/futurewei/alcor/web/entity/subnet/SubnetEntity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/main/java/com/futurewei/alcor/web/entity/subnet/SubnetEntity.java b/web/src/main/java/com/futurewei/alcor/web/entity/subnet/SubnetEntity.java index 783db0a6f..75c99af2a 100644 --- a/web/src/main/java/com/futurewei/alcor/web/entity/subnet/SubnetEntity.java +++ b/web/src/main/java/com/futurewei/alcor/web/entity/subnet/SubnetEntity.java @@ -150,6 +150,7 @@ public SubnetEntity(String projectId, String vpcId, String id, String name, Stri super(projectId, id, name, null); this.vpcId = vpcId; this.cidr = cidr; + this.ipVersion = 4; } public SubnetEntity(String projectId, String id, String name, String description, String vpcId, From 4cb934ebb8f1cb5c7d7e3bb0ebf760212f2b5c80 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Fri, 9 Jul 2021 08:42:52 -0700 Subject: [PATCH 05/16] Fix varible type --- .../com/futurewei/alcor/subnet/controller/SubnetController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java index 9571a6f98..a7e3aa1d8 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java @@ -487,7 +487,7 @@ public ResponseId deleteSubnetState(@PathVariable String projectId, @PathVariabl } // check if there is any non-gateway port for the subnet - Boolean checkIfAnyNoneGatewayPortInSubnet = this.subnetService.checkIfAnyNonGatewayPortInSubnet(projectId, subnetEntity); + boolean checkIfAnyNoneGatewayPortInSubnet = this.subnetService.checkIfAnyNonGatewayPortInSubnet(projectId, subnetEntity); if (checkIfAnyNoneGatewayPortInSubnet) { throw new HaveNonGatewayPortInSubnet(); } From ad62ef0dc3222fe47bb22f75e24b3c2dd49693f1 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Fri, 9 Jul 2021 11:22:57 -0700 Subject: [PATCH 06/16] Add some logs --- .../alcor/subnet/service/implement/SubnetServiceImp.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java index 71fa6cb61..334248620 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java @@ -313,8 +313,10 @@ public boolean checkIfAnyNonGatewayPortInSubnet(String projectId, SubnetEntity s String portManagerServiceUrl = portUrl + "project/" + projectId + "/subnet-port-count/" + subnetEntity.getId(); int portCount = restTemplate.getForObject(portManagerServiceUrl, Integer.class); if (portCount == 0 && StringUtil.isNullOrEmpty(subnetEntity.getGatewayPortId())) { + logger.info("portCount == 0 && subnetEntity.getGatewayPortId() = " + subnetEntity.getGatewayPortId()); return false; } else if (portCount == 1 && !StringUtil.isNullOrEmpty(subnetEntity.getGatewayPortId())) { + logger.info("portCount == 1 && subnetEntity.getGatewayPortId() = " + subnetEntity.getGatewayPortId()); return false; } From f756eef3c53afbf27ba2d5703a48d59a877ddf92 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Fri, 9 Jul 2021 11:25:44 -0700 Subject: [PATCH 07/16] Add more logs --- .../alcor/subnet/service/implement/SubnetServiceImp.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java index 334248620..b0e318bd5 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java @@ -320,6 +320,7 @@ public boolean checkIfAnyNonGatewayPortInSubnet(String projectId, SubnetEntity s return false; } + logger.info("portCount == " + portCount + " && subnetEntity.getGatewayPortId() = " + subnetEntity.getGatewayPortId()); return true; } From 8160d4a3ac12351990ab3db392faf8c52c239723 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Fri, 9 Jul 2021 12:10:44 -0700 Subject: [PATCH 08/16] Revert the wrong fix to the non-gateway port count check --- .../alcor/subnet/service/implement/SubnetServiceImp.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java index b0e318bd5..1d1eae341 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/service/implement/SubnetServiceImp.java @@ -312,15 +312,12 @@ public boolean checkIfAnyNonGatewayPortInSubnet(String projectId, SubnetEntity s String portManagerServiceUrl = portUrl + "project/" + projectId + "/subnet-port-count/" + subnetEntity.getId(); int portCount = restTemplate.getForObject(portManagerServiceUrl, Integer.class); - if (portCount == 0 && StringUtil.isNullOrEmpty(subnetEntity.getGatewayPortId())) { - logger.info("portCount == 0 && subnetEntity.getGatewayPortId() = " + subnetEntity.getGatewayPortId()); - return false; - } else if (portCount == 1 && !StringUtil.isNullOrEmpty(subnetEntity.getGatewayPortId())) { - logger.info("portCount == 1 && subnetEntity.getGatewayPortId() = " + subnetEntity.getGatewayPortId()); + + logger.info("[checkIfAnyNonGatewayPortInSubnet]: portCount == " + portCount + " && subnetEntity.getGatewayPortId() = " + subnetEntity.getGatewayPortId()); + if (portCount == 0) { return false; } - logger.info("portCount == " + portCount + " && subnetEntity.getGatewayPortId() = " + subnetEntity.getGatewayPortId()); return true; } From 639a0cd1c5dc32a943ad99c7b1c488615769b092 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Fri, 9 Jul 2021 16:10:30 -0700 Subject: [PATCH 09/16] Fix commit transaction from different thread issue --- .../alcor/vpcmanager/controller/VpcController.java | 2 +- .../service/Impl/VpcDatabaseServiceImpl.java | 14 +++++++++----- .../vpcmanager/service/VpcDatabaseService.java | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java index a3d2c08de..9e9541df5 100644 --- a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java +++ b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/VpcController.java @@ -408,7 +408,7 @@ public VpcWebJson deleteSubnetIdInVpcState(@PathVariable String projectid, @Path inVpcState = this.vpcDatabaseService.deleteSubnetIdInVpc(vpcid, subnetid); - } catch (ParameterNullOrEmptyException e) { + } catch (Exception e) { throw new Exception(e); } diff --git a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java index 8368e7bca..17a89b713 100644 --- a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java +++ b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/Impl/VpcDatabaseServiceImpl.java @@ -17,6 +17,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.CacheException; import com.futurewei.alcor.common.db.ICache; +import com.futurewei.alcor.common.db.Transaction; import com.futurewei.alcor.common.exception.DatabasePersistenceException; import com.futurewei.alcor.common.exception.ResourceNotFoundException; import com.futurewei.alcor.common.stats.DurationStatistics; @@ -79,12 +80,12 @@ public void deleteVpc(String id) throws CacheException { } @Override - public VpcEntity deleteSubnetIdInVpc(String vpcId, String subnetId) throws ResourceNotFoundException, DatabasePersistenceException, CacheException { + public VpcEntity deleteSubnetIdInVpc(String vpcId, String subnetId) throws Exception { VpcEntity currentVpcState = null; - try { - this.vpcRepository.startTransaction(); + try (Transaction tx = this.vpcRepository.startTransaction()) { + currentVpcState = getByVpcId(vpcId); if (currentVpcState == null) { throw new ResourceNotFoundException("Vpc not found : " + vpcId); @@ -98,10 +99,13 @@ public VpcEntity deleteSubnetIdInVpc(String vpcId, String subnetId) throws Resou subnets.remove(subnetId); currentVpcState.setSubnets(subnets); addVpc(currentVpcState); + + tx.commit(); } catch (ResourceNotFoundException | DatabasePersistenceException | CacheException e) { throw e; - } finally { - this.vpcRepository.commitTransaction(); + } catch (Exception e) { + e.printStackTrace(); + throw e; } return currentVpcState; diff --git a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java index dba4a4a0c..f3c67de75 100644 --- a/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java +++ b/services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/service/VpcDatabaseService.java @@ -31,7 +31,7 @@ public interface VpcDatabaseService { public Map getAllVpcs (Map queryParams) throws CacheException; public void addVpc (VpcEntity vpcState) throws DatabasePersistenceException; public void deleteVpc (String id) throws CacheException; - public VpcEntity deleteSubnetIdInVpc(String vpcId, String subnetId) throws ResourceNotFoundException, DatabasePersistenceException, CacheException; + public VpcEntity deleteSubnetIdInVpc(String vpcId, String subnetId) throws Exception; public ICache getCache (); } From 85de8fbade8b33a4d70c5992431184b4f9bb84a8 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Fri, 9 Jul 2021 16:40:26 -0700 Subject: [PATCH 10/16] Update ignite config xml to support transaction in VpcRepository --- kubernetes/services/ignite_config.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kubernetes/services/ignite_config.xml b/kubernetes/services/ignite_config.xml index fb232be42..f89c32366 100644 --- a/kubernetes/services/ignite_config.xml +++ b/kubernetes/services/ignite_config.xml @@ -45,6 +45,15 @@ Copyright(c) 2020 Futurewei Cloud + + + + + + + + + From d6ed075881657ed5b4987e7a3bcaf4ebbfa4bab5 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Tue, 13 Jul 2021 12:00:09 -0700 Subject: [PATCH 11/16] Fix Ip mgr ignite misconfiguration --- kubernetes/services/ignite_ip_config.xml | 33 +++++++++++++++++++ .../subnet/controller/SubnetController.java | 10 ++++-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/kubernetes/services/ignite_ip_config.xml b/kubernetes/services/ignite_ip_config.xml index 6e66078cd..7d8ea3230 100644 --- a/kubernetes/services/ignite_ip_config.xml +++ b/kubernetes/services/ignite_ip_config.xml @@ -38,9 +38,42 @@ Copyright(c) 2020 Futurewei Cloud + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java index a7e3aa1d8..8e932ad79 100644 --- a/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java +++ b/services/subnet_manager/src/main/java/com/futurewei/alcor/subnet/controller/SubnetController.java @@ -243,8 +243,12 @@ public SubnetWebJson createSubnetState(@PathVariable String projectId, @RequestB // Synchronous blocking CompletableFuture allFuture = CompletableFuture.allOf(vpcFuture, ipFuture); allFuture.join(); + VpcWebJson vpcResponse = vpcFuture.join(); + String ipRangeId = ipFuture.join(); - logger.info("Total processing time:" + (System.currentTimeMillis() - start) + "ms"); + logger.info("[createSubnetState] Verified VPC id:" + vpcResponse.toString()); + logger.info("[createSubnetState] Allocated ip range:" + ipRangeId); + logger.info("[createSubnetState] Time to verify VPC id and allocate ip range:" + (System.currentTimeMillis() - start) + "ms"); this.subnetDatabaseService.addSubnet(inSubnetEntity); @@ -270,10 +274,10 @@ public SubnetWebJson createSubnetState(@PathVariable String projectId, @RequestB } if (Ipv4AddrUtil.formatCheck(gatewayIp)) { - inSubnetEntity.setIpV4RangeId(ipFuture.join()); + inSubnetEntity.setIpV4RangeId(ipRangeId); inSubnetEntity.setIpVersion(4); } else { - inSubnetEntity.setIpV6RangeId(ipFuture.join()); + inSubnetEntity.setIpV6RangeId(ipRangeId); inSubnetEntity.setIpVersion(6); } From 1b63054e7a24aaf4e9700658a396d213581aa66e Mon Sep 17 00:00:00 2001 From: Prasad Kommoju Date: Wed, 21 Jul 2021 09:58:58 -0700 Subject: [PATCH 12/16] Add missing file --- .../performance/Method-list--CPU-ncm.csv | 648 ++++++++++++++++++ 1 file changed, 648 insertions(+) create mode 100644 docs/modules/ROOT/pages/performance/Method-list--CPU-ncm.csv diff --git a/docs/modules/ROOT/pages/performance/Method-list--CPU-ncm.csv b/docs/modules/ROOT/pages/performance/Method-list--CPU-ncm.csv new file mode 100644 index 000000000..f047210e9 --- /dev/null +++ b/docs/modules/ROOT/pages/performance/Method-list--CPU-ncm.csv @@ -0,0 +1,648 @@ +"Method","Time (ms)","Own Time (ms)" +"java.lang.Thread.run() Thread.java","566130","26" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.run() EpollEventLoop.java","334252","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run() FastThreadLocalRunnable.java","334252","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run() SingleThreadEventExecutor.java","334252","0" +"io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run() ThreadExecutorMap.java","334252","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.epollWait() EpollEventLoop.java","332969","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.Native.epollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int) Native.java","332969","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.Native.epollWait0(int, long, int, int, int, int) Native.java (native)","332969","332969" +"java.lang.Thread.sleep(long) Thread.java (native)","202885","202885" +"org.apache.ignite.internal.client.thin.TcpClientChannel.lambda$initReceiverThread$0() TcpClientChannel.java","197902","10" +"org.apache.ignite.internal.client.thin.TcpClientChannel$$Lambda$632.run()","197902","0" +"org.apache.ignite.internal.client.thin.TcpClientChannel.processNextMessage() TcpClientChannel.java","197892","0" +"java.lang.ref.Reference$ReferenceHandler.run() Reference.java","197880","197880" +"org.apache.catalina.core.StandardServer.await() StandardServer.java","197880","0" +"org.springframework.boot.web.embedded.tomcat.TomcatWebServer$1.run() TomcatWebServer.java","197880","0" +"org.apache.ignite.internal.client.thin.TcpClientChannel$ByteCountingDataInput.read(byte[], int) TcpClientChannel.java","197168","10" +"java.net.SocketInputStream.read(byte[], int, int) SocketInputStream.java","197157","197157" +"org.apache.ignite.internal.client.thin.TcpClientChannel$ByteCountingDataInput.readInt() TcpClientChannel.java","171678","0" +"java.util.concurrent.ThreadPoolExecutor$Worker.run() ThreadPoolExecutor.java","33928","20" +"io.grpc.internal.ContextRunnable.run() ContextRunnable.java","33907","0" +"io.grpc.internal.SerializingExecutor.run() SerializingExecutor.java","33907","0" +"com.futurewei.alcor.netwconfigmanager.server.grpc.GoalStateProvisionerServer$GoalStateProvisionerImpl$1.onCompleted() GoalStateProvisionerServer.java","32150","0" +"io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed() ServerCallImpl.java","32150","0" +"io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext() ServerImpl.java","32150","0" +"io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onHalfClose() ServerCalls.java","32150","0" +"com.futurewei.alcor.netwconfigmanager.service.impl.GoalStatePersistenceServiceImpl.getVniInLoop(int) GoalStatePersistenceServiceImpl.java","32129","0" +"org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(Object, Method, Object[], MethodProxy) CglibAopProxy.java","27585","64" +"org.apache.ignite.internal.client.thin.TcpClientCache.cacheSingleKeyOperation(Object, ClientOperation, Consumer, Function) TcpClientCache.java","27509","10" +"org.apache.ignite.internal.client.thin.ReliableChannel.service(ClientOperation, Consumer, Function) ReliableChannel.java","27486","0" +"org.apache.ignite.internal.client.thin.TcpClientChannel.service(ClientOperation, Consumer, Function) TcpClientChannel.java","27486","0" +"com.futurewei.alcor.netwconfigmanager.cache.VpcResourceCache$$FastClassBySpringCGLIB$$8dfcc42a.invoke(int, Object, Object[]) ","27133","0" +"com.futurewei.alcor.netwconfigmanager.cache.VpcResourceCache$$EnhancerBySpringCGLIB$$829e3684.getResourceMeta(String) ","26855","0" +"com.futurewei.alcor.common.db.ignite.IgniteClientDbCache.get(Object) IgniteClientDbCache.java","26824","0" +"com.futurewei.alcor.netwconfigmanager.cache.VpcResourceCache.getResourceMeta(String) VpcResourceCache.java","26824","0" +"org.apache.ignite.internal.client.thin.TcpClientCache.get(Object) TcpClientCache.java","26824","0" +"org.apache.ignite.internal.client.thin.TcpClientChannel.receive(long, Function) TcpClientChannel.java","26821","0" +"org.apache.ignite.internal.client.thin.ClientUtils.readObject(BinaryInputStream, boolean) ClientUtils.java","26800","0" +"org.apache.ignite.internal.client.thin.TcpClientCache.readObject(PayloadInputChannel) TcpClientCache.java","26800","0" +"org.apache.ignite.internal.client.thin.TcpClientCache.readObject(BinaryInputStream) TcpClientCache.java","26800","0" +"org.apache.ignite.internal.client.thin.TcpClientCache$$Lambda$676.apply(Object)","26800","0" +"org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(BinaryInputStream, ClassLoader, BinaryReaderHandles) GridBinaryMarshaller.java","26800","0" +"org.apache.ignite.internal.client.thin.ClientBinaryMarshaller.deserialize(BinaryInputStream, BinaryReaderHandles) ClientBinaryMarshaller.java","26800","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize() BinaryReaderExImpl.java","26790","546" +"org.apache.ignite.internal.client.thin.ReliableChannel.affinityService(int, Object, ClientOperation, Consumer, Function) ReliableChannel.java","26724","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0() BinaryReaderExImpl.java","26470","2476" +"org.apache.ignite.internal.binary.BinaryClassDescriptor.read(BinaryReaderExImpl) BinaryClassDescriptor.java","25870","149" +"org.apache.ignite.internal.binary.BinaryFieldAccessor.read(Object, BinaryReaderExImpl) BinaryFieldAccessor.java","25870","0" +"org.apache.ignite.internal.binary.BinaryFieldAccessor$DefaultFinalClassAccessor.read0(Object, BinaryReaderExImpl) BinaryFieldAccessor.java","25870","10" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.readField(int) BinaryReaderExImpl.java","25870","22" +"org.apache.ignite.internal.binary.BinaryUtils.doReadMap(BinaryInputStream, BinaryContext, ClassLoader, BinaryReaderHandlesHolder, boolean, boolean, BinaryMapFactory) BinaryUtils.java","25870","331" +"org.apache.ignite.internal.client.thin.ClientUtils.unwrapBinary(Object, BinaryReaderHandles) ClientUtils.java","25870","0" +"org.apache.ignite.internal.client.thin.TcpClientChannel$ByteCountingDataInput.read(int) TcpClientChannel.java","25814","693" +"org.apache.ignite.internal.binary.BinaryUtils.deserializeOrUnmarshal(BinaryInputStream, BinaryContext, ClassLoader, BinaryReaderHandlesHolder, boolean, boolean) BinaryUtils.java","25310","0" +"org.apache.ignite.internal.binary.BinaryUtils.doReadObject(BinaryInputStream, BinaryContext, ClassLoader, BinaryReaderHandlesHolder) BinaryUtils.java","25310","32" +"org.apache.ignite.internal.binary.BinaryUtils.doReadCollection(BinaryInputStream, BinaryContext, ClassLoader, BinaryReaderHandlesHolder, boolean, boolean, BinaryCollectionFactory) BinaryUtils.java","14337","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.setHandle(Object, int) BinaryReaderExImpl.java","11356","0" +"org.apache.ignite.internal.binary.BinaryReaderHandles.put(int, Object) BinaryReaderHandles.java","11356","2657" +"java.util.HashMap.put(Object, Object) HashMap.java","10515","10515" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.(BinaryContext, BinaryInputStream, ClassLoader, BinaryReaderHandles, boolean) BinaryReaderExImpl.java","5623","4948" +"java.util.HashSet.add(Object) HashSet.java","1942","1942" +"java.lang.reflect.Field.set(Object, Object) Field.java","1747","1747" +"io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(StreamListener$MessageProducer) ServerCallImpl.java","1734","0" +"io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailableInternal(StreamListener$MessageProducer) ServerCallImpl.java","1734","0" +"io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext() ServerImpl.java","1734","0" +"java.lang.ClassLoader.loadClass(String) ClassLoader.java","1528","1745" +"com.futurewei.alcor.netwconfigmanager.server.grpc.GoalStateProvisionerServer$GoalStateProvisionerImpl$1.onNext(Object) GoalStateProvisionerServer.java","1475","0" +"com.futurewei.alcor.netwconfigmanager.server.grpc.GoalStateProvisionerServer$GoalStateProvisionerImpl$1.onNext(Goalstate$GoalStateV2) GoalStateProvisionerServer.java","1475","0" +"io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(Object) ServerCalls.java","1475","0" +"java.util.concurrent.ConcurrentHashMap.get(Object) ConcurrentHashMap.java","1169","1169" +"com.futurewei.alcor.netwconfigmanager.service.impl.GoalStatePersistenceServiceImpl.updateGoalState(String, HostGoalState) GoalStatePersistenceServiceImpl.java","1145","0" +"org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(boolean, int, ClassLoader, boolean) BinaryContext.java","1134","0" +"org.apache.ignite.internal.client.thin.TcpIgniteClient$ClientMarshallerContext.getClass(int, ClassLoader) TcpIgniteClient.java","1069","0" +"org.apache.ignite.internal.util.IgniteUtils.forName(String, ClassLoader, IgnitePredicate) IgniteUtils.java","1069","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(long) SingleThreadEventExecutor.java","939","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.setHandle(Object) BinaryReaderExImpl.java","932","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(Runnable) AbstractEventExecutor.java","918","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServer$1.initChannel(Channel) NettyServer.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AbstractUnsafe.register0(ChannelPromise) AbstractChannel.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AbstractUnsafe$1.run() AbstractChannel.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded() AbstractChannelHandlerContext.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelInitializer.handlerAdded(ChannelHandlerContext) ChannelInitializer.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelInitializer.initChannel(ChannelHandlerContext) ChannelInitializer.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(AbstractChannelHandlerContext) DefaultChannelPipeline.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers() DefaultChannelPipeline.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded() DefaultChannelPipeline.java","851","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute() DefaultChannelPipeline.java","851","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerTransport.start(ServerTransportListener) NettyServerTransport.java","730","0" +"com.futurewei.alcor.netwconfigmanager.service.impl.GoalStatePersistenceServiceImpl.populateVpcResourceCache(HostGoalState, Map) GoalStatePersistenceServiceImpl.java","701","0" +"com.futurewei.alcor.common.db.ignite.IgniteClientDbCache.put(Object, Object) IgniteClientDbCache.java","684","0" +"org.apache.ignite.internal.client.thin.TcpClientCache.put(Object, Object) TcpClientCache.java","684","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.(BinaryContext, BinaryInputStream, ClassLoader, BinaryReaderHandles, boolean, boolean) BinaryReaderExImpl.java","674","652" +"org.apache.ignite.internal.client.thin.TcpClientChannel.send(ClientOperation, Consumer) TcpClientChannel.java","665","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerTransport.createHandler(ServerTransportListener, ChannelPromise) NettyServerTransport.java","616","0" +"org.apache.ignite.internal.binary.BinaryUtils.doReadBinaryObject(BinaryInputStream, BinaryContext, boolean) BinaryUtils.java","599","10" +"org.apache.ignite.internal.binary.BinaryUtils.doReadByteArray(BinaryInputStream) BinaryUtils.java","588","0" +"org.apache.ignite.internal.binary.streams.BinaryAbstractInputStream.readByteArray(int) BinaryAbstractInputStream.java","588","588" +"org.apache.ignite.internal.binary.BinaryFieldAccessor$DefaultFinalClassAccessor.readFixedType(BinaryReaderExImpl) BinaryFieldAccessor.java","568","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.readString(int) BinaryReaderExImpl.java","568","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.readString() BinaryReaderExImpl.java","568","556" +"com.futurewei.alcor.common.logging.Logger.log(Level, String) Logger.java","524","0" +"java.util.logging.Logger.log(Level, String) Logger.java","524","514" +"io.jaegertracing.internal.reporters.RemoteReporter.flush() RemoteReporter.java","425","10" +"io.jaegertracing.internal.reporters.RemoteReporter$1.run() RemoteReporter.java","425","0" +"java.util.TimerThread.run() Timer.java","425","0" +"java.util.concurrent.ArrayBlockingQueue.offer(Object) ArrayBlockingQueue.java","415","415" +"com.futurewei.alcor.netwconfigmanager.cache.ResourceStateCache$$EnhancerBySpringCGLIB$$ee189f20.addResourceState(String, Object) ","365","0" +"com.futurewei.alcor.netwconfigmanager.cache.ResourceStateCache.addResourceState(String, Object) ResourceStateCache.java","354","0" +"com.futurewei.alcor.netwconfigmanager.cache.ResourceStateCache$$FastClassBySpringCGLIB$$d3c76de.invoke(int, Object, Object[]) ","354","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventArray, int) EpollEventLoop.java","344","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler.newHandler(ServerTransportListener, ChannelPromise, List, TransportTracer, int, int, int, int, long, long, long, long, long, boolean, long) NettyServerHandler.java","342","0" +"org.apache.ignite.internal.client.thin.TcpClientChannel$ByteCountingDataInput.readLong() TcpClientChannel.java","327","0" +"java.net.SocketOutputStream.write(byte[], int, int) SocketOutputStream.java","324","324" +"org.apache.ignite.internal.client.thin.TcpClientChannel.write(byte[], int) TcpClientChannel.java","324","0" +"org.apache.ignite.internal.client.thin.TcpClientCache.lambda$cacheSingleKeyOperation$26(Object, Consumer, PayloadOutputChannel) TcpClientCache.java","318","0" +"org.apache.ignite.internal.client.thin.TcpClientCache$$Lambda$677.accept(Object)","318","0" +"org.apache.ignite.internal.client.thin.ClientUtils.writeObject(BinaryOutputStream, Object) ClientUtils.java","318","0" +"org.apache.ignite.internal.client.thin.TcpClientCache.writeObject(PayloadOutputChannel, Object) TcpClientCache.java","318","0" +"com.google.protobuf.AbstractMessage.toString() AbstractMessage.java","318","0" +"com.futurewei.alcor.netwconfigmanager.cache.VpcResourceCache.addResourceMeta(VpcResourceMeta) VpcResourceCache.java","308","0" +"com.futurewei.alcor.netwconfigmanager.cache.VpcResourceCache$$EnhancerBySpringCGLIB$$829e3684.addResourceMeta(VpcResourceMeta) ","308","0" +"org.apache.ignite.internal.client.thin.TcpClientCache.lambda$put$0(Object, PayloadOutputChannel) TcpClientCache.java","308","0" +"org.apache.ignite.internal.client.thin.TcpClientCache$$Lambda$678.accept(Object)","308","0" +"org.apache.ignite.internal.binary.GridBinaryMarshaller.marshal(Object, boolean) GridBinaryMarshaller.java","306","0" +"org.apache.ignite.internal.client.thin.ClientBinaryMarshaller.marshal(Object) ClientBinaryMarshaller.java","306","0" +"com.google.protobuf.TextFormat.print(MessageOrBuilder, Appendable) TextFormat.java","306","0" +"com.google.protobuf.TextFormat.printToString(MessageOrBuilder) TextFormat.java","306","0" +"com.google.protobuf.TextFormat$Printer.print(MessageOrBuilder, TextFormat$TextGenerator) TextFormat.java","306","10" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.marshal(Object, boolean) BinaryWriterExImpl.java","296","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.marshal(Object) BinaryWriterExImpl.java","296","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.marshal0(Object, boolean) BinaryWriterExImpl.java","296","0" +"com.google.protobuf.GeneratedMessageV3.getAllFields() GeneratedMessageV3.java","262","0" +"com.google.protobuf.GeneratedMessageV3.getAllFieldsMutable(boolean) GeneratedMessageV3.java","262","0" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) Goalstate.java","258","0" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) Goalstate.java","258","0" +"com.google.protobuf.AbstractParser.parseFrom(CodedInputStream, ExtensionRegistryLite) AbstractParser.java","258","0" +"com.google.protobuf.AbstractParser.parseFrom(CodedInputStream, ExtensionRegistryLite) AbstractParser.java","258","0" +"io.grpc.MethodDescriptor.parseRequest(InputStream) MethodDescriptor.java","258","0" +"io.grpc.protobuf.lite.ProtoLiteUtils$MessageMarshaller.parse(InputStream) ProtoLiteUtils.java","258","0" +"io.grpc.protobuf.lite.ProtoLiteUtils$MessageMarshaller.parse(InputStream) ProtoLiteUtils.java","258","0" +"io.grpc.protobuf.lite.ProtoLiteUtils$MessageMarshaller.parseFrom(CodedInputStream) ProtoLiteUtils.java","258","0" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2.(CodedInputStream, ExtensionRegistryLite) Goalstate.java","247","0" +"com.google.protobuf.TextFormat$Printer.printField(Descriptors$FieldDescriptor, Object, TextFormat$TextGenerator) TextFormat.java","245","0" +"com.google.protobuf.TextFormat$Printer.printFieldValue(Descriptors$FieldDescriptor, Object, TextFormat$TextGenerator) TextFormat.java","245","0" +"com.google.protobuf.TextFormat$Printer.printSingleField(Descriptors$FieldDescriptor, Object, TextFormat$TextGenerator) TextFormat.java","245","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext, Object) AbstractChannelHandlerContext.java","228","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(Object) DefaultChannelPipeline.java","228","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Object) AbstractChannelHandlerContext.java","217","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Object) AbstractChannelHandlerContext.java","217","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(ChannelHandlerContext, Object) DefaultChannelPipeline.java","217","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady() AbstractEpollStreamChannel.java","205","0" +"io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ChannelHandlerContext, Object) ByteToMessageDecoder.java","205","0" +"org.apache.ignite.internal.binary.BinaryClassDescriptor.write(Object, BinaryWriterExImpl) BinaryClassDescriptor.java","200","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable.ensureFieldAccessorsInitialized(Class, Class) GeneratedMessageV3.java","191","12" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2$HostResourcesDefaultEntryHolder.() Goalstate.java","190","0" +"org.apache.ignite.internal.binary.BinaryFieldAccessor.write(Object, BinaryWriterExImpl) BinaryFieldAccessor.java","190","22" +"org.apache.ignite.internal.binary.BinaryFieldAccessor$DefaultFinalClassAccessor.write0(Object, BinaryWriterExImpl) BinaryFieldAccessor.java","190","0" +"com.futurewei.alcor.netwconfigmanager.service.impl.GoalStatePersistenceServiceImpl.processPortStates(HostGoalState) GoalStatePersistenceServiceImpl.java","186","0" +"io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ChannelHandlerContext, ByteBuf, List) ByteToMessageDecoder.java","183","0" +"io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ChannelHandlerContext, ByteBuf, List) ByteToMessageDecoder.java","183","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.decodeFrame(ChannelHandlerContext, ByteBuf, List) DefaultHttp2ConnectionDecoder.java","183","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.processPayloadState(ChannelHandlerContext, ByteBuf, Http2FrameListener) DefaultHttp2FrameReader.java","183","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readFrame(ChannelHandlerContext, ByteBuf, Http2FrameListener) DefaultHttp2FrameReader.java","183","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.decode(ChannelHandlerContext, ByteBuf, List) Http2ConnectionHandler.java","183","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$FrameDecoder.decode(ChannelHandlerContext, ByteBuf, List) Http2ConnectionHandler.java","183","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2InboundFrameLogger.readFrame(ChannelHandlerContext, ByteBuf, Http2FrameListener) Http2InboundFrameLogger.java","183","0" +"com.futurewei.alcor.schema.Goalstate.() Goalstate.java","178","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.() Http2ConnectionHandler.java","170","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.doWriteMap(Map) BinaryWriterExImpl.java","169","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.writeMapField(Map) BinaryWriterExImpl.java","169","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.doWriteObject(Object) BinaryWriterExImpl.java","169","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readHeadersFrame(ChannelHandlerContext, ByteBuf, int, Http2FrameListener) DefaultHttp2FrameReader.java","160","0" +"com.futurewei.alcor.netwconfigmanager.service.impl.GoalStatePersistenceServiceImpl.processNeighborStates(HostGoalState) GoalStatePersistenceServiceImpl.java","155","0" +"java.lang.Class.getMethod(String, Class[]) Class.java","155","155" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader$1.processFragment(boolean, ByteBuf, int, Http2FrameListener) DefaultHttp2FrameReader.java","150","0" +"com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom(String[], Descriptors$FileDescriptor[], Descriptors$FileDescriptor$InternalDescriptorAssigner) Descriptors.java","145","0" +"com.google.protobuf.GeneratedMessageV3.getMethodOrDie(Class, String, Class[]) GeneratedMessageV3.java","145","0" +"java.lang.reflect.Method.invoke(Object, Object[]) Method.java","140","45" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onHeadersRead(ChannelHandlerContext, int, Http2Headers, int, short, boolean, int, boolean) DefaultHttp2ConnectionDecoder.java","139","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2InboundFrameLogger$1.onHeadersRead(ChannelHandlerContext, int, Http2Headers, int, short, boolean, int, boolean) Http2InboundFrameLogger.java","139","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler.newHandler(ChannelPromise, Http2FrameReader, Http2FrameWriter, ServerTransportListener, List, TransportTracer, int, int, int, int, long, long, long, long, long, boolean, long) NettyServerHandler.java","138","24" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollServerChannel$EpollServerSocketUnsafe.epollInReady() AbstractEpollServerChannel.java","138","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler.onHeadersRead(ChannelHandlerContext, int, Http2Headers) NettyServerHandler.java","127","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler$FrameListener.onHeadersRead(ChannelHandlerContext, int, Http2Headers, int, short, boolean, int, boolean) NettyServerHandler.java","127","0" +"io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$1$1PlaintextHandler.handlerAdded(ChannelHandlerContext) ProtocolNegotiators.java","113","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.addLast(EventExecutorGroup, ChannelHandler[]) DefaultChannelPipeline.java","113","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.addLast(ChannelHandler[]) DefaultChannelPipeline.java","113","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.addLast(EventExecutorGroup, String, ChannelHandler) DefaultChannelPipeline.java","113","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.replace(AbstractChannelHandlerContext, String, ChannelHandler) DefaultChannelPipeline.java","113","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.replace(ChannelHandler, String, ChannelHandler) DefaultChannelPipeline.java","113","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularFieldAccessor.(Descriptors$FieldDescriptor, String, Class, Class, String) GeneratedMessageV3.java","110","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler.handlerAdded(ChannelHandlerContext) NettyServerHandler.java","102","0" +"com.futurewei.alcor.schema.Common.() Common.java","101","0" +"com.google.protobuf.AbstractMessageLite.toByteArray() AbstractMessageLite.java","95","0" +"com.google.protobuf.GeneratedMessageLite$SerializedForm.(MessageLite) GeneratedMessageLite.java","95","0" +"com.google.protobuf.GeneratedMessageV3.writeReplace() GeneratedMessageV3.java","95","0" +"org.apache.ignite.internal.binary.BinaryClassDescriptor.writeReplace(Object) BinaryClassDescriptor.java","95","0" +"org.apache.ignite.internal.binary.BinaryMethodWriteReplacer.replace(Object) BinaryMethodWriteReplacer.java","95","0" +"com.google.protobuf.AbstractParser.parseFrom(byte[], ExtensionRegistryLite) AbstractParser.java","90","0" +"com.google.protobuf.AbstractParser.parseFrom(byte[]) AbstractParser.java","90","0" +"com.google.protobuf.AbstractParser.parseFrom(byte[], int, int, ExtensionRegistryLite) AbstractParser.java","90","0" +"com.google.protobuf.AbstractParser.parseFrom(byte[]) AbstractParser.java","90","0" +"com.google.protobuf.AbstractParser.parsePartialFrom(byte[], int, int, ExtensionRegistryLite) AbstractParser.java","90","0" +"com.google.protobuf.DescriptorProtos$FileDescriptorProto.(CodedInputStream, ExtensionRegistryLite, DescriptorProtos$1) DescriptorProtos.java","90","0" +"com.google.protobuf.DescriptorProtos$FileDescriptorProto.(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","90","0" +"com.google.protobuf.DescriptorProtos$FileDescriptorProto.parseFrom(byte[]) DescriptorProtos.java","90","0" +"com.google.protobuf.DescriptorProtos$FileDescriptorProto$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","90","0" +"com.google.protobuf.DescriptorProtos$FileDescriptorProto$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","90","0" +"com.futurewei.alcor.netwconfigmanager.entity.VpcResourceMeta.getResourceMeta(String) VpcResourceMeta.java","89","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.newEpollHandle(RecvByteBufAllocator$ExtendedHandle) AbstractEpollChannel.java","79","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.recvBufAllocHandle() AbstractEpollChannel.java","79","0" +"com.google.protobuf.CodedInputStream$ArrayDecoder.readMessage(Parser, ExtensionRegistryLite) CodedInputStream.java","79","0" +"io.grpc.netty.shaded.io.grpc.netty.AbstractNettyHandler.handlerAdded(ChannelHandlerContext) AbstractNettyHandler.java","78","0" +"com.google.protobuf.CodedOutputStream.computeMessageSize(int, MessageLite) CodedOutputStream.java","74","0" +"com.google.protobuf.CodedOutputStream.computeMessageSizeNoTag(MessageLite) CodedOutputStream.java","74","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator.directBuffer(int, int) AbstractByteBufAllocator.java","70","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator.directBuffer(int) AbstractByteBufAllocator.java","70","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DecoratingHttp2FrameWriter.writeSettings(ChannelHandlerContext, Http2Settings, ChannelPromise) DecoratingHttp2FrameWriter.java","68","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.writeSettings(ChannelHandlerContext, Http2Settings, ChannelPromise) DefaultHttp2ConnectionEncoder.java","68","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.handlerAdded(ChannelHandlerContext) Http2ConnectionHandler.java","68","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.(Http2ConnectionHandler, ChannelHandlerContext) Http2ConnectionHandler.java","68","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.sendPreface(ChannelHandlerContext) Http2ConnectionHandler.java","68","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2OutboundFrameLogger.writeSettings(ChannelHandlerContext, Http2Settings, ChannelPromise) Http2OutboundFrameLogger.java","68","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.doWriteCollection(Collection) BinaryWriterExImpl.java","67","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.writeCollectionField(Collection) BinaryWriterExImpl.java","67","0" +"java.lang.invoke.MethodHandleNatives.linkCallSite(Object, int, Object, Object, Object, Object, Object[]) MethodHandleNatives.java","65","65" +"io.grpc.netty.shaded.io.grpc.netty.GrpcHttp2HeadersUtils$GrpcHttp2ServerHeadersDecoder.(long) GrpcHttp2HeadersUtils.java","62","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2HeadersDecoder.(boolean, long, int) DefaultHttp2HeadersDecoder.java","62","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2HeadersDecoder.(boolean, long) DefaultHttp2HeadersDecoder.java","62","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameWriter.() DefaultHttp2FrameWriter.java","61","0" +"com.google.protobuf.GeneratedMessageV3.getField(Descriptors$FieldDescriptor) GeneratedMessageV3.java","58","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerTransport.() NettyServerTransport.java","57","10" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator.buffer(int) AbstractByteBufAllocator.java","57","0" +"io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(int, int) PooledByteBufAllocator.java","57","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeSettings(ChannelHandlerContext, Http2Settings, ChannelPromise) DefaultHttp2FrameWriter.java","57","0" +"com.futurewei.alcor.schema.Gateway.() Gateway.java","55","0" +"com.futurewei.alcor.schema.Vpc.() Vpc.java","55","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularEnumFieldAccessor.(Descriptors$FieldDescriptor, String, Class, Class, String) GeneratedMessageV3.java","52","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder.() DefaultHttp2HeadersEncoder.java","50","0" +"io.grpc.netty.shaded.io.netty.buffer.Unpooled.wrappedBuffer(byte[]) Unpooled.java","50","0" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2.internalGetFieldAccessorTable() Goalstate.java","48","0" +"java.util.IdentityHashMap.put(Object, Object) IdentityHashMap.java","48","48" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.tryWriteAsHandle(Object) BinaryWriterExImpl.java","48","0" +"org.apache.ignite.internal.binary.BinaryWriterHandles.put(Object, int) BinaryWriterHandles.java","48","0" +"com.google.protobuf.MapEntry.(MapEntry$Metadata, CodedInputStream, ExtensionRegistryLite) MapEntry.java","46","12" +"com.google.protobuf.MapEntry.(MapEntry$Metadata, CodedInputStream, ExtensionRegistryLite, MapEntry$1) MapEntry.java","46","0" +"com.google.protobuf.MapEntry$Metadata$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) MapEntry.java","46","0" +"com.google.protobuf.MapEntry$Metadata$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) MapEntry.java","46","0" +"com.google.protobuf.GeneratedMessageV3.invokeOrDie(Method, Object, Object[]) GeneratedMessageV3.java","45","0" +"io.grpc.internal.StatsTraceContext.newServerContext(List, String, Metadata) StatsTraceContext.java","45","0" +"com.google.protobuf.Descriptors$FileDescriptor.buildFrom(DescriptorProtos$FileDescriptorProto, Descriptors$FileDescriptor[], boolean) Descriptors.java","43","0" +"com.futurewei.alcor.schema.Port$PortConfiguration.getSerializedSize() Port.java","41","0" +"com.futurewei.alcor.schema.Port$PortState.getSerializedSize() Port.java","41","0" +"org.apache.ignite.internal.client.thin.TcpClientChannel$ByteCountingDataInput.readShort() TcpClientChannel.java","41","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolArena.allocate(PoolThreadCache, int, int) PoolArena.java","35","0" +"com.futurewei.alcor.netwconfigmanager.cache.HostResourceMetadataCache$$EnhancerBySpringCGLIB$$521f3dc0.getTransaction() ","34","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Headers$PseudoHeaderName.() Http2Headers.java","34","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.ReadOnlyHttp2Headers.serverHeaders(boolean, AsciiString, AsciiString[]) ReadOnlyHttp2Headers.java","34","0" +"java.lang.invoke.LambdaForm$MH.182988318.linkToTargetMethod(Object, int, long, Object) LambdaForm$MH","34","34" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollRecvByteAllocatorHandle.(RecvByteBufAllocator$ExtendedHandle) EpollRecvByteAllocatorHandle.java","34","0" +"io.grpc.internal.AbstractStream$TransportState.requestMessagesFromDeframer(int) AbstractStream.java","33","0" +"io.grpc.internal.MessageDeframer.deliver() MessageDeframer.java","33","0" +"io.grpc.internal.MessageDeframer.request(int) MessageDeframer.java","33","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerStream$Sink$1.run() NettyServerStream.java","33","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularFieldAccessor.get(GeneratedMessageV3) GeneratedMessageV3.java","33","0" +"io.grpc.internal.CensusStatsModule$ServerTracerFactory.newServerStreamTracer(String, Metadata) CensusStatsModule.java","33","0" +"com.futurewei.alcor.netwconfigmanager.service.impl.GoalStatePersistenceServiceImpl.processVpcStates(HostGoalState) GoalStatePersistenceServiceImpl.java","32","0" +"com.futurewei.alcor.netwconfigmanager.cache.HostResourceMetadataCache$$FastClassBySpringCGLIB$$fc3227be.invoke(int, Object, Object[]) ","32","0" +"java.lang.Integer.valueOf(int) Integer.java","32","32" +"java.lang.String.getBytes(Charset) String.java","32","32" +"io.grpc.netty.shaded.io.grpc.netty.WriteQueue.flush() WriteQueue.java","32","0" +"io.grpc.netty.shaded.io.grpc.netty.WriteQueue$1.run() WriteQueue.java","32","0" +"java.util.concurrent.locks.LockSupport.unpark(Thread) LockSupport.java","30","30" +"org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(Object, Throwable, boolean) GridFutureAdapter.java","30","0" +"org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(Object, Throwable) GridFutureAdapter.java","30","0" +"org.apache.ignite.internal.util.future.GridFutureAdapter.unblock(Object) GridFutureAdapter.java","30","0" +"org.apache.ignite.internal.util.future.GridFutureAdapter.unblockAll(GridFutureAdapter$Node) GridFutureAdapter.java","30","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2HeadersDecoder.(boolean, HpackDecoder) DefaultHttp2HeadersDecoder.java","29","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2CodecUtil.() Http2CodecUtil.java","29","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2HeadersEncoder.() Http2HeadersEncoder.java","26","0" +"jdk.internal.misc.InnocuousThread.run() InnocuousThread.java","26","26" +"com.futurewei.alcor.schema.Port$PortConfiguration.internalGetFieldAccessorTable() Port.java","25","0" +"io.grpc.internal.AbstractServerStream$TransportState.(int, StatsTraceContext, TransportTracer) AbstractServerStream.java","24","0" +"io.grpc.internal.AbstractStream$TransportState.(int, StatsTraceContext, TransportTracer) AbstractStream.java","24","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerStream$TransportState.(NettyServerHandler, EventLoop, Http2Stream, int, StatsTraceContext, TransportTracer, String) NettyServerStream.java","24","0" +"com.futurewei.alcor.schema.Goalstate$ResourceIdType.internalGetFieldAccessorTable() Goalstate.java","24","0" +"com.futurewei.alcor.schema.Subnet$SubnetState.internalGetFieldAccessorTable() Subnet.java","24","0" +"io.grpc.internal.ServerImpl$ServerListenerImpl.transportCreated(ServerTransport) ServerImpl.java","24","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolArena.allocate(PoolThreadCache, PooledByteBuf, int) PoolArena.java","24","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolArena.allocateNormal(PooledByteBuf, int, int) PoolArena.java","24","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolArena$DirectArena.newChunk(int, int, int, int) PoolArena.java","24","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollStreamChannel.(Channel, LinuxSocket, SocketAddress) AbstractEpollStreamChannel.java","24","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollServerSocketChannel.newChildChannel(int, byte[], int, int) EpollServerSocketChannel.java","24","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollSocketChannel.(Channel, LinuxSocket, InetSocketAddress) EpollSocketChannel.java","24","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder.(Http2HeadersEncoder$SensitivityDetector) DefaultHttp2HeadersEncoder.java","24","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.WeightedFairQueueByteDistributor.(Http2Connection, int) WeightedFairQueueByteDistributor.java","24","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.WeightedFairQueueByteDistributor.(Http2Connection) WeightedFairQueueByteDistributor.java","24","0" +"java.lang.ThreadLocal.get() ThreadLocal.java","24","24" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBuf.() AbstractByteBuf.java","23","10" +"io.grpc.netty.shaded.io.netty.buffer.Unpooled.() Unpooled.java","22","0" +"com.google.protobuf.DescriptorProtos$DescriptorProto.(CodedInputStream, ExtensionRegistryLite, DescriptorProtos$1) DescriptorProtos.java","22","0" +"com.google.protobuf.DescriptorProtos$DescriptorProto.(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","22","0" +"com.google.protobuf.DescriptorProtos$DescriptorProto$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","22","0" +"com.google.protobuf.DescriptorProtos$DescriptorProto$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","22","0" +"io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator$PoolThreadLocalCache.initialValue() PooledByteBufAllocator.java","22","0" +"io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator$PoolThreadLocalCache.initialValue() PooledByteBufAllocator.java","22","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolThreadCache.(PoolArena, PoolArena, int, int, int, int, int) PoolThreadCache.java","22","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocal.get() FastThreadLocal.java","22","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocal.initialize(InternalThreadLocalMap) FastThreadLocal.java","22","0" +"com.futurewei.alcor.schema.Neighbor$NeighborState.internalGetFieldAccessorTable() Neighbor.java","22","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularMessageFieldAccessor.(Descriptors$FieldDescriptor, String, Class, Class, String) GeneratedMessageV3.java","22","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractReferenceCountedByteBuf.handleRelease(boolean) AbstractReferenceCountedByteBuf.java","22","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractReferenceCountedByteBuf.release() AbstractReferenceCountedByteBuf.java","22","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolArena.free(PoolChunk, ByteBuffer, long, int, PoolThreadCache) PoolArena.java","22","12" +"io.grpc.netty.shaded.io.netty.buffer.PooledByteBuf.deallocate() PooledByteBuf.java","22","0" +"io.grpc.internal.ServerImpl$ServerTransportListenerImpl.streamCreated(ServerStream, String, Metadata) ServerImpl.java","22","0" +"io.grpc.internal.ServerImpl$ServerTransportListenerImpl.streamCreatedInternal(ServerStream, String, Metadata, Tag) ServerImpl.java","22","0" +"io.grpc.internal.ServerImpl$ServerTransportListenerImpl.startCall(ServerStream, String, ServerMethodDefinition, Metadata, Context$CancellableContext, StatsTraceContext, Tag) ServerImpl.java","22","0" +"io.grpc.internal.ServerImpl$ServerTransportListenerImpl.startWrappedCall(String, ServerMethodDefinition, ServerStream, Metadata, Context$CancellableContext, Tag) ServerImpl.java","22","0" +"io.grpc.internal.ServerImpl$ServerTransportListenerImpl$1StreamCreated.runInContext() ServerImpl.java","22","0" +"io.grpc.internal.ServerImpl$ServerTransportListenerImpl$1StreamCreated.runInternal() ServerImpl.java","22","0" +"com.futurewei.alcor.schema.Vpc$VpcState.getSerializedSize() Vpc.java","22","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.doWriteString(String) BinaryWriterExImpl.java","22","0" +"org.apache.ignite.internal.binary.streams.BinaryAbstractOutputStream.writeByteArray(byte[]) BinaryAbstractOutputStream.java","22","10" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection.(boolean) DefaultHttp2Connection.java","22","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection.(boolean, int) DefaultHttp2Connection.java","22","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler.sendResponseHeaders(ChannelHandlerContext, SendResponseHeadersCommand, ChannelPromise) NettyServerHandler.java","22","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler.write(ChannelHandlerContext, Object, ChannelPromise) NettyServerHandler.java","22","0" +"io.grpc.netty.shaded.io.grpc.netty.WriteQueue$AbstractQueuedCommand.run(Channel) WriteQueue.java","22","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel.write(Object, ChannelPromise) AbstractChannel.java","22","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeWrite(Object, ChannelPromise) AbstractChannelHandlerContext.java","22","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(Object, ChannelPromise) AbstractChannelHandlerContext.java","22","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.write(Object, boolean, ChannelPromise) AbstractChannelHandlerContext.java","22","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.write(Object, ChannelPromise) AbstractChannelHandlerContext.java","22","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.write(Object, ChannelPromise) DefaultChannelPipeline.java","22","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DecoratingHttp2FrameWriter.writeHeaders(ChannelHandlerContext, int, Http2Headers, int, boolean, ChannelPromise) DecoratingHttp2FrameWriter.java","22","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.writeHeaders(ChannelHandlerContext, int, Http2Headers, int, boolean, ChannelPromise) DefaultHttp2ConnectionEncoder.java","22","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.writeHeaders(ChannelHandlerContext, int, Http2Headers, int, short, boolean, int, boolean, ChannelPromise) DefaultHttp2ConnectionEncoder.java","22","0" +"com.google.protobuf.Descriptors$FileDescriptor.(DescriptorProtos$FileDescriptorProto, Descriptors$FileDescriptor[], Descriptors$DescriptorPool, boolean) Descriptors.java","22","12" +"org.apache.ignite.internal.binary.BinaryFieldAccessor$DefaultFinalClassAccessor.mode(Object) BinaryFieldAccessor.java","22","22" +"org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream.(int, BinaryMemoryAllocatorChunk) BinaryHeapOutputStream.java","22","22" +"java.lang.reflect.Field.get(Object) Field.java","22","22" +"org.apache.ignite.internal.binary.BinaryUtils.doReadString(BinaryInputStream) BinaryUtils.java","22","12" +"com.google.protobuf.MapEntryLite.parseEntry(CodedInputStream, MapEntryLite$Metadata, ExtensionRegistryLite) MapEntryLite.java","22","0" +"com.google.protobuf.MapEntryLite.parseField(CodedInputStream, ExtensionRegistryLite, WireFormat$FieldType, Object) MapEntryLite.java","22","0" +"com.yourkit.probes.builtin.Databases$Connection_or_Statement_close_Probe.onEnter(Object) a","21","21" +"java.util.LinkedHashMap.get(Object) LinkedHashMap.java","21","21" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AbstractUnsafe.flush() AbstractChannel.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AbstractUnsafe.flush0() AbstractChannel.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.flush() AbstractChannelHandlerContext.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeFlush() AbstractChannelHandlerContext.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeFlush0() AbstractChannelHandlerContext.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelOutboundBuffer.remove() ChannelOutboundBuffer.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelOutboundBuffer.removeBytes(long) ChannelOutboundBuffer.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.flush(ChannelHandlerContext) DefaultChannelPipeline.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.flush0() AbstractEpollChannel.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollStreamChannel.doWrite(ChannelOutboundBuffer) AbstractEpollStreamChannel.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteMultiple(ChannelOutboundBuffer) AbstractEpollStreamChannel.java","21","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollStreamChannel.writeBytesMultiple(ChannelOutboundBuffer, IovArray) AbstractEpollStreamChannel.java","21","0" +"io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted() ServerCalls.java","20","10" +"com.futurewei.alcor.netwconfigmanager.cache.HostResourceMetadataCache.addResourceMeta(ResourceMeta) HostResourceMetadataCache.java","20","0" +"com.futurewei.alcor.netwconfigmanager.cache.HostResourceMetadataCache$$EnhancerBySpringCGLIB$$521f3dc0.addResourceMeta(ResourceMeta) ","20","0" +"com.google.protobuf.ByteString.copyFromUtf8(String) ByteString.java","20","0" +"org.apache.ignite.internal.util.IgniteUtils.newHashSet(int) IgniteUtils.java","20","10" +"com.futurewei.alcor.schema.Neighbor$NeighborConfiguration.getSerializedSize() Neighbor.java","20","10" +"com.futurewei.alcor.schema.Neighbor$NeighborState.getSerializedSize() Neighbor.java","20","0" +"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run() TaskThread.java","20","0" +"io.jaegertracing.internal.reporters.RemoteReporter$QueueProcessor.run() RemoteReporter.java","20","0" +"java.util.concurrent.ConcurrentHashMap.remove(Object) ConcurrentHashMap.java","20","20" +"com.futurewei.alcor.schema.Port$PortState.internalGetFieldAccessorTable() Port.java","16","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBuf.writeBytes(byte[], int, int) AbstractByteBuf.java","16","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBuf.writeBytes(byte[]) AbstractByteBuf.java","16","0" +"io.grpc.netty.shaded.io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(int, byte[], int, int) UnpooledUnsafeDirectByteBuf.java","16","0" +"io.grpc.netty.shaded.io.netty.buffer.Unpooled.directBuffer(int) Unpooled.java","13","0" +"io.grpc.netty.shaded.io.netty.buffer.UnpooledByteBufAllocator.newDirectBuffer(int, int) UnpooledByteBufAllocator.java","13","13" +"io.grpc.netty.shaded.io.netty.util.ResourceLeakDetectorFactory.() ResourceLeakDetectorFactory.java","12","0" +"io.grpc.netty.shaded.io.netty.util.ResourceLeakDetectorFactory$DefaultResourceLeakDetectorFactory.() ResourceLeakDetectorFactory.java","12","0" +"io.grpc.netty.shaded.io.netty.util.ResourceLeakDetectorFactory$DefaultResourceLeakDetectorFactory$1.(ResourceLeakDetectorFactory$DefaultResourceLeakDetectorFactory) ResourceLeakDetectorFactory.java","12","12" +"com.futurewei.alcor.common.db.ignite.IgniteClientTransaction.start() IgniteClientTransaction.java","12","0" +"com.futurewei.alcor.common.utils.CommonUtil.() CommonUtil.java","12","0" +"com.futurewei.alcor.netwconfigmanager.cache.HostResourceMetadataCache.getTransaction() HostResourceMetadataCache.java","12","0" +"com.futurewei.alcor.netwconfigmanager.entity.ResourceMeta.addPortId(String) ResourceMeta.java","12","0" +"com.futurewei.alcor.netwconfigmanager.util.NetworkConfigManagerUtil.splitClusterToHostGoalState(Goalstate$GoalStateV2) NetworkConfigManagerUtil.java","12","0" +"com.futurewei.alcor.netwconfigmanager.util.NetworkConfigManagerUtil$1.() NetworkConfigManagerUtil.java","12","0" +"com.futurewei.alcor.schema.Common$ResourceType.() Common.java","12","0" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2.internalGetMapField(int) Goalstate.java","12","0" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2.internalGetSecurityGroupStates() Goalstate.java","12","0" +"com.futurewei.alcor.schema.Goalstate$GoalStateV2$SecurityGroupStatesDefaultEntryHolder.() Goalstate.java","12","0" +"com.futurewei.alcor.schema.Goalstate$HostResources.toBuilder() Goalstate.java","12","0" +"com.futurewei.alcor.schema.Goalstate$HostResources.toBuilder() Goalstate.java","12","0" +"com.futurewei.alcor.schema.Neighbor$NeighborConfiguration.internalGetFieldAccessorTable() Neighbor.java","12","0" +"com.futurewei.alcor.schema.SecurityGroup$SecurityGroupState.() SecurityGroup.java","12","0" +"com.futurewei.alcor.schema.Vpc$VpcConfiguration.getSerializedSize() Vpc.java","12","0" +"com.futurewei.alcor.schema.Vpc$VpcState.internalGetFieldAccessorTable() Vpc.java","12","0" +"com.google.common.base.Stopwatch.() Stopwatch.java","12","0" +"com.google.common.base.Stopwatch.createUnstarted() Stopwatch.java","12","0" +"com.google.common.collect.Lists.computeArrayListCapacity(int) Lists.java","12","0" +"com.google.common.collect.Lists.newArrayList(Object[]) Lists.java","12","0" +"com.google.protobuf.DescriptorProtos$FileOptions.() DescriptorProtos.java","12","0" +"com.google.protobuf.DescriptorProtos$FileOptions.() DescriptorProtos.java","12","0" +"com.google.protobuf.GeneratedMessageV3$ExtendableMessage.() GeneratedMessageV3.java","12","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$MapFieldAccessor.(Descriptors$FieldDescriptor, String, Class, Class) GeneratedMessageV3.java","12","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$MapFieldAccessor.get(GeneratedMessageV3) GeneratedMessageV3.java","12","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$MapFieldAccessor.getMapField(GeneratedMessageV3) GeneratedMessageV3.java","12","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$MapFieldAccessor.getRepeatedCount(GeneratedMessageV3) GeneratedMessageV3.java","12","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$RepeatedFieldAccessor.get(GeneratedMessageV3) GeneratedMessageV3.java","12","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$RepeatedMessageFieldAccessor.(Descriptors$FieldDescriptor, String, Class, Class) GeneratedMessageV3.java","12","0" +"com.google.protobuf.MapEntry.newBuilderForType() MapEntry.java","12","0" +"com.google.protobuf.MapField.convertKeyAndValueToMessage(Object, Object) MapField.java","12","0" +"com.google.protobuf.MapField.convertMapToList(MapField$MutatabilityAwareMap) MapField.java","12","0" +"com.google.protobuf.MapField.getList() MapField.java","12","0" +"com.google.protobuf.MapField$ImmutableMessageConverter.convertKeyAndValueToMessage(Object, Object) MapField.java","12","0" +"com.google.protobuf.TextFormat.() TextFormat.java","12","0" +"com.google.protobuf.TextFormat$TextGenerator.eol() TextFormat.java","12","12" +"com.google.protobuf.UnknownFieldSet.getSerializedSize() UnknownFieldSet.java","12","12" +"io.grpc.internal.AbstractServerStream.(WritableBufferAllocator, StatsTraceContext) AbstractServerStream.java","12","0" +"io.grpc.internal.AbstractStream$TransportState.messagesAvailable(StreamListener$MessageProducer) AbstractStream.java","12","0" +"io.grpc.internal.CensusStatsModule$ServerTracer.(CensusStatsModule, TagContext) CensusStatsModule.java","12","0" +"io.grpc.internal.CensusTracingModule$ServerTracerFactory.newServerStreamTracer(String, Metadata) CensusTracingModule.java","12","0" +"io.grpc.internal.KeepAliveManager.(KeepAliveManager$KeepAlivePinger, ScheduledExecutorService, long, long, boolean) KeepAliveManager.java","12","0" +"io.grpc.internal.MessageDeframer.processBody() MessageDeframer.java","12","0" +"io.grpc.internal.ServerCallImpl.newServerStreamListener(ServerCall$Listener) ServerCallImpl.java","12","0" +"io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.(ServerCallImpl, ServerCall$Listener, Context$CancellableContext) ServerCallImpl.java","12","0" +"io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.messagesAvailable(StreamListener$MessageProducer) ServerImpl.java","12","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler.(ChannelPromise, Http2Connection, ServerTransportListener, List, TransportTracer, Http2ConnectionDecoder, Http2ConnectionEncoder, Http2Settings, int, long, long, long, long, long, KeepAliveEnforcer) NettyServerHandler.java","12","12" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerStream.(Channel, NettyServerStream$TransportState, Attributes, String, StatsTraceContext, TransportTracer) NettyServerStream.java","12","0" +"io.grpc.netty.shaded.io.netty.bootstrap.ServerBootstrap$ServerBootstrapAcceptor.channelRead(ChannelHandlerContext, Object) ServerBootstrap.java","12","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator.heapBuffer(int, int) AbstractByteBufAllocator.java","12","0" +"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator.heapBuffer() AbstractByteBufAllocator.java","12","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolChunk.(PoolArena, Object, int, int, int, int, int) PoolChunk.java","12","12" +"io.grpc.netty.shaded.io.netty.buffer.Unpooled.buffer() Unpooled.java","12","0" +"io.grpc.netty.shaded.io.netty.buffer.UnpooledByteBufAllocator.newHeapBuffer(int, int) UnpooledByteBufAllocator.java","12","12" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel.(Channel) AbstractChannel.java","12","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel.(Channel, LinuxSocket, SocketAddress) AbstractEpollChannel.java","12","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollSocketChannel.newUnsafe() EpollSocketChannel.java","12","0" +"io.grpc.netty.shaded.io.netty.channel.epoll.EpollSocketChannel.newUnsafe() EpollSocketChannel.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder$1.cumulate(ByteBufAllocator, ByteBuf, ByteBuf) ByteToMessageDecoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.DefaultHeaders.(HashingStrategy, ValueConverter) DefaultHeaders.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.DefaultHeaders$NameValidator.() DefaultHeaders.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http.HttpResponseStatus.() HttpResponseStatus.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http.HttpResponseStatus.(int, String, boolean) HttpResponseStatus.java","12","12" +"io.grpc.netty.shaded.io.netty.handler.codec.http.HttpResponseStatus.newStatus(int, String) HttpResponseStatus.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.CharSequenceMap.() CharSequenceMap.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.CharSequenceMap.(boolean) CharSequenceMap.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.CharSequenceMap.(boolean, ValueConverter) CharSequenceMap.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DecoratingHttp2ConnectionEncoder.remoteSettings(Http2Settings) DecoratingHttp2ConnectionEncoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection$ConnectionStream.(DefaultHttp2Connection) DefaultHttp2Connection.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultEndpoint.addStream(DefaultHttp2Connection$DefaultStream) DefaultHttp2Connection.java","12","12" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultEndpoint.createStream(int, boolean) DefaultHttp2Connection.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultEndpoint.createStream(int, boolean) DefaultHttp2Connection.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultStream.(DefaultHttp2Connection, int, Http2Stream$State) DefaultHttp2Connection.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onSettingsRead(ChannelHandlerContext, Http2Settings) DefaultHttp2ConnectionDecoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$PrefaceFrameListener.onSettingsRead(ChannelHandlerContext, Http2Settings) DefaultHttp2ConnectionDecoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.remoteSettings(Http2Settings) DefaultHttp2ConnectionEncoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readSettingsFrame(ChannelHandlerContext, ByteBuf, Http2FrameListener) DefaultHttp2FrameReader.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2HeadersEncoder.(Http2HeadersEncoder$SensitivityDetector, HpackEncoder) DefaultHttp2HeadersEncoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController.initialWindowSize(int) DefaultHttp2RemoteFlowController.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$WritabilityMonitor.initialWindowSize(int) DefaultHttp2RemoteFlowController.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackDecoder.(long, int) HpackDecoder.java","12","12" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackDecoder.(long) HpackDecoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackEncoder.(boolean, int, int) HpackEncoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackEncoder.(boolean) HpackEncoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackEncoder.() HpackEncoder.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.closeStream(Http2Stream, ChannelFuture) Http2ConnectionHandler.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.closeStreamLocal(Http2Stream, ChannelFuture) Http2ConnectionHandler.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(ChannelHandlerContext, ByteBuf, List) Http2ConnectionHandler.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2InboundFrameLogger$1.onSettingsRead(ChannelHandlerContext, Http2Settings) Http2InboundFrameLogger.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.WeightedFairQueueByteDistributor$State.(WeightedFairQueueByteDistributor, int, Http2Stream, int) WeightedFairQueueByteDistributor.java","12","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.WeightedFairQueueByteDistributor$State.(WeightedFairQueueByteDistributor, Http2Stream, int) WeightedFairQueueByteDistributor.java","12","0" +"io.opencensus.stats.NoopStats.newNoopMeasureMap() NoopStats.java","12","0" +"io.opencensus.stats.NoopStats$NoopStatsRecorder.newMeasureMap() NoopStats.java","12","0" +"io.opencensus.trace.SpanContext.() SpanContext.java","12","0" +"java.lang.ClassLoader.checkPackageAccess(Class, ProtectionDomain) ClassLoader.java","12","12" +"java.lang.invoke.LambdaForm$MH.979943848.linkToTargetMethod(Object, long, Object) LambdaForm$MH","12","12" +"java.util.Collections$UnmodifiableCollection$1.next() Collections.java","12","12" +"org.apache.ignite.internal.binary.BinaryClassDescriptor.preWrite(BinaryWriterExImpl, Object) BinaryClassDescriptor.java","12","0" +"org.apache.ignite.internal.binary.BinaryReaderExImpl.streamPosition(int) BinaryReaderExImpl.java","12","12" +"org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream.(int) BinaryHeapOutputStream.java","12","0" +"org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream.ensureCapacity(int) BinaryHeapOutputStream.java","12","0" +"org.apache.ignite.internal.binary.streams.BinaryMemoryAllocatorChunk.reallocate(byte[], int) BinaryMemoryAllocatorChunk.java","12","12" +"org.apache.ignite.internal.client.thin.PayloadOutputChannel.(ClientChannel) PayloadOutputChannel.java","12","0" +"org.apache.ignite.internal.client.thin.TcpClientTransactions.tx() TcpClientTransactions.java","12","0" +"org.apache.ignite.internal.client.thin.TcpClientTransactions.txStart(TransactionConcurrency, TransactionIsolation) TcpClientTransactions.java","12","0" +"org.apache.ignite.internal.client.thin.TcpClientTransactions.txStart0(TransactionConcurrency, TransactionIsolation, Long, String) TcpClientTransactions.java","12","12" +"io.grpc.netty.shaded.io.netty.channel.unix.Socket.accept(byte[]) Socket.java","11","0" +"io.grpc.internal.CompositeReadableBuffer.addBuffer(ReadableBuffer) CompositeReadableBuffer.java","11","0" +"io.grpc.internal.CompositeReadableBuffer.close() CompositeReadableBuffer.java","11","0" +"io.grpc.internal.MessageDeframer.readRequiredBytes() MessageDeframer.java","11","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolArena$DirectArena.newByteBuf(int) PoolArena.java","11","0" +"io.grpc.internal.MessageDeframer.(MessageDeframer$Listener, Decompressor, int, StatsTraceContext, TransportTracer) MessageDeframer.java","11","0" +"io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.() ByteToMessageDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackDecoder.() HpackDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.CodecOutputList.() CodecOutputList.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.touch(Object, AbstractChannelHandlerContext) DefaultChannelPipeline.java","10","0" +"io.grpc.internal.AbstractReadableBuffer.readInt() AbstractReadableBuffer.java","10","0" +"io.grpc.internal.CompositeReadableBuffer.advanceBufferIfNecessary() CompositeReadableBuffer.java","10","0" +"io.grpc.internal.CompositeReadableBuffer.execute(CompositeReadableBuffer$ReadOperation, int) CompositeReadableBuffer.java","10","0" +"io.grpc.internal.CompositeReadableBuffer.readUnsignedByte() CompositeReadableBuffer.java","10","0" +"io.grpc.internal.MessageDeframer.processHeader() MessageDeframer.java","10","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyReadableBuffer.close() NettyReadableBuffer.java","10","0" +"com.google.protobuf.DescriptorProtos$FieldDescriptorProto.() DescriptorProtos.java","10","0" +"org.apache.ignite.internal.binary.streams.BinaryAbstractInputStream.readByte() BinaryAbstractInputStream.java","10","10" +"io.grpc.netty.shaded.io.netty.buffer.PoolThreadCache.createSubPageCaches(int, int, PoolArena$SizeClass) PoolThreadCache.java","10","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolThreadCache$MemoryRegionCache.() PoolThreadCache.java","10","0" +"org.apache.ignite.internal.binary.streams.BinaryAbstractOutputStream.unsafeEnsure(int) BinaryAbstractOutputStream.java","10","10" +"io.grpc.netty.shaded.io.grpc.netty.AbstractNettyHandler.sendInitialConnectionWindow() AbstractNettyHandler.java","10","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolThreadCache.add(PoolArena, PoolChunk, ByteBuffer, long, int, PoolArena$SizeClass) PoolThreadCache.java","10","0" +"io.grpc.netty.shaded.io.netty.buffer.PoolThreadCache.cache(PoolArena, int, PoolArena$SizeClass) PoolThreadCache.java","10","0" +"io.grpc.netty.shaded.io.netty.util.ReferenceCountUtil.release(Object) ReferenceCountUtil.java","10","0" +"io.grpc.netty.shaded.io.netty.util.ReferenceCountUtil.safeRelease(Object) ReferenceCountUtil.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader$HeadersBlockBuilder.headers() DefaultHttp2FrameReader.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2HeadersDecoder.decodeHeaders(int, ByteBuf) DefaultHttp2HeadersDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackDecoder.decode(int, ByteBuf, Http2Headers, boolean) HpackDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackDecoder.decode(ByteBuf, HpackDecoder$Sink) HpackDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.HpackDecoder.readName(int) HpackDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader$1.(DefaultHttp2FrameReader, int, ChannelHandlerContext, int, short, boolean, int, Http2Flags) DefaultHttp2FrameReader.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader$HeadersContinuation.(DefaultHttp2FrameReader, DefaultHttp2FrameReader$1) DefaultHttp2FrameReader.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader$HeadersContinuation.(DefaultHttp2FrameReader) DefaultHttp2FrameReader.java","10","0" +"io.grpc.internal.AbstractServerStream.close(Status, Metadata) AbstractServerStream.java","10","0" +"io.grpc.internal.ServerCallImpl.close(Status, Metadata) ServerCallImpl.java","10","0" +"io.grpc.internal.ServerCallImpl.closeInternal(Status, Metadata) ServerCallImpl.java","10","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerStream$Sink.writeTrailers(Metadata, boolean, Status) NettyServerStream.java","10","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.writeStringField(String) BinaryWriterExImpl.java","10","10" +"io.opencensus.tags.TagValue.create(String) TagValue.java","10","0" +"io.opencensus.tags.TagValue.isValid(String) TagValue.java","10","0" +"io.grpc.internal.DeprecatedCensusConstants.() DeprecatedCensusConstants.java","10","0" +"io.opencensus.contrib.grpc.metrics.RpcMeasureConstants.() RpcMeasureConstants.java","10","0" +"com.futurewei.alcor.netwconfigmanager.server.grpc.IpInterceptor.interceptCall(ServerCall, Metadata, ServerCallHandler) IpInterceptor.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.(DefaultChannelPipeline, EventExecutor, String, Class) AbstractChannelHandlerContext.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelHandlerMask.isSkippable(Class, String, Class[]) ChannelHandlerMask.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelHandlerMask.mask(Class) ChannelHandlerMask.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelHandlerMask.mask0(Class) ChannelHandlerMask.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelHandlerMask$2.run() ChannelHandlerMask.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelHandlerMask$2.run() ChannelHandlerMask.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelHandlerContext.(DefaultChannelPipeline, EventExecutor, String, ChannelHandler) DefaultChannelHandlerContext.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.newContext(EventExecutorGroup, String, ChannelHandler) DefaultChannelPipeline.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection.verifyKey(Http2Connection$PropertyKey) DefaultHttp2Connection.java","10","10" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultStream.getProperty(Http2Connection$PropertyKey) DefaultHttp2Connection.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.unconsumedBytes(Http2Stream) DefaultHttp2ConnectionDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onDataRead(ChannelHandlerContext, int, ByteBuf, int, boolean) DefaultHttp2ConnectionDecoder.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readDataFrame(ChannelHandlerContext, ByteBuf, int, Http2FrameListener) DefaultHttp2FrameReader.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2LocalFlowController.state(Http2Stream) DefaultHttp2LocalFlowController.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2LocalFlowController.unconsumedBytes(Http2Stream) DefaultHttp2LocalFlowController.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2InboundFrameLogger$1.onDataRead(ChannelHandlerContext, int, ByteBuf, int, boolean) Http2InboundFrameLogger.java","10","0" +"io.grpc.ServerInterceptors$InterceptCallHandler.startCall(ServerCall, Metadata) ServerInterceptors.java","10","0" +"java.security.AccessController.doPrivileged(PrivilegedExceptionAction) AccessController.java (native)","10","0" +"org.apache.ignite.internal.binary.BinaryClassDescriptor.postWrite(BinaryWriterExImpl) BinaryClassDescriptor.java","10","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.postWrite(boolean, boolean) BinaryWriterExImpl.java","10","0" +"org.apache.ignite.internal.binary.BinaryWriterSchemaHolder.write(BinaryOutputStream, int, boolean) BinaryWriterSchemaHolder.java","10","10" +"java.util.HashMap$EntryIterator.next() HashMap.java","10","10" +"io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil.hexDump(byte[], int, int) ByteBufUtil.java","10","0" +"io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil$HexUtil.() ByteBufUtil.java","10","10" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel.toString() AbstractChannel.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelId.asShortText() DefaultChannelId.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2FrameLogger.logSettings(Http2FrameLogger$Direction, ChannelHandlerContext, Http2Settings) Http2FrameLogger.java","10","0" +"io.grpc.netty.shaded.io.netty.util.internal.logging.AbstractInternalLogger.log(InternalLogLevel, String, Object[]) AbstractInternalLogger.java","10","0" +"io.grpc.netty.shaded.io.netty.util.internal.logging.LocationAwareSlf4JLogger.debug(String, Object[]) LocationAwareSlf4JLogger.java","10","0" +"org.slf4j.helpers.MessageFormatter.arrayFormat(String, Object[]) MessageFormatter.java","10","0" +"com.google.protobuf.CodedInputStream$ArrayDecoder.readRawVarint32() CodedInputStream.java","10","10" +"com.google.protobuf.DescriptorProtos$EnumDescriptorProto.(CodedInputStream, ExtensionRegistryLite, DescriptorProtos$1) DescriptorProtos.java","10","0" +"com.google.protobuf.DescriptorProtos$EnumDescriptorProto.(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","10","0" +"com.google.protobuf.DescriptorProtos$EnumDescriptorProto$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","10","0" +"com.google.protobuf.DescriptorProtos$EnumDescriptorProto$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) DescriptorProtos.java","10","0" +"org.apache.ignite.internal.binary.BinaryContext.updateMetadata(int, BinaryMetadata, boolean) BinaryContext.java","10","0" +"org.apache.ignite.internal.client.thin.TcpIgniteClient$ClientBinaryMetadataHandler.addMeta(int, BinaryType, boolean) TcpIgniteClient.java","10","0" +"com.futurewei.alcor.schema.Subnet$SubnetConfiguration.internalGetFieldAccessorTable() Subnet.java","10","0" +"com.google.protobuf.CodedInputStream$ArrayDecoder.readBytes() CodedInputStream.java","10","0" +"com.futurewei.alcor.schema.Port$PortConfiguration.getDeviceIdBytes() Port.java","10","0" +"com.google.protobuf.GeneratedMessageV3.hasField(Descriptors$FieldDescriptor) GeneratedMessageV3.java","10","0" +"com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularFieldAccessor.has(GeneratedMessageV3) GeneratedMessageV3.java","10","0" +"com.futurewei.alcor.common.utils.CommonUtil.isNullOrEmpty(String) CommonUtil.java","10","0" +"java.lang.String.trim() String.java","10","10" +"java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1.hasNext() Collections.java","10","10" +"com.futurewei.alcor.schema.Subnet.() Subnet.java","10","0" +"com.google.protobuf.Descriptors$Descriptor.getFields() Descriptors.java","10","0" +"com.google.protobuf.MapEntry.getAllFields() MapEntry.java","10","0" +"java.util.Collections.unmodifiableList(List) Collections.java","10","10" +"com.google.protobuf.Descriptors$Descriptor.crossLink() Descriptors.java","10","0" +"com.google.protobuf.Descriptors$FieldDescriptor.crossLink() Descriptors.java","10","0" +"com.google.protobuf.Descriptors$FileDescriptor.crossLink() Descriptors.java","10","0" +"io.micrometer.core.instrument.binder.logging.MetricsTurboFilter.decide(Marker, Logger, Level, String, Object[], Throwable) LogbackMetrics.java","10","0" +"io.micrometer.core.instrument.Counter.increment() Counter.java","10","0" +"io.micrometer.core.instrument.cumulative.CumulativeCounter.increment(double) CumulativeCounter.java","10","10" +"com.futurewei.alcor.schema.DHCP.() DHCP.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.validateHeadersSentState(Http2Stream, Http2Headers, boolean, boolean) DefaultHttp2ConnectionEncoder.java","10","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.handles() BinaryWriterExImpl.java","10","10" +"java.util.HashSet.(int) HashSet.java","10","10" +"com.futurewei.alcor.schema.Neighbor$NeighborConfiguration$FixedIp.getSerializedSize() Neighbor.java","10","0" +"com.futurewei.alcor.schema.Neighbor$NeighborType.() Neighbor.java","10","0" +"com.google.protobuf.Descriptors$Descriptor.(DescriptorProtos$DescriptorProto, Descriptors$FileDescriptor, Descriptors$Descriptor, int) Descriptors.java","10","0" +"com.google.protobuf.Descriptors$Descriptor.(DescriptorProtos$DescriptorProto, Descriptors$FileDescriptor, Descriptors$Descriptor, int, Descriptors$1) Descriptors.java","10","0" +"com.google.protobuf.Descriptors$FieldDescriptor.() Descriptors.java","10","0" +"com.google.protobuf.WireFormat$FieldType.() WireFormat.java","10","0" +"io.grpc.internal.AbstractServerStream$TransportState.closeListener(Status) AbstractServerStream.java","10","0" +"io.grpc.internal.AbstractServerStream$TransportState.complete() AbstractServerStream.java","10","0" +"io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closed(Status) ServerImpl.java","10","0" +"io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener.closedInternal(Status) ServerImpl.java","10","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler$6.operationComplete(Future) NettyServerHandler.java","10","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerHandler$6.operationComplete(ChannelFuture) NettyServerHandler.java","10","0" +"io.grpc.netty.shaded.io.grpc.netty.NettyServerStream$TransportState.complete() NettyServerStream.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.AbstractChannel.flush() AbstractChannel.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.ChannelOutboundBuffer.safeSuccess(ChannelPromise) ChannelOutboundBuffer.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.flush() DefaultChannelPipeline.java","10","0" +"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPromise.trySuccess() DefaultChannelPromise.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2CodecUtil$SimpleChannelPromiseAggregator.tryPromise() Http2CodecUtil.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2CodecUtil$SimpleChannelPromiseAggregator.trySuccess(Void) Http2CodecUtil.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2CodecUtil$SimpleChannelPromiseAggregator.trySuccess(Object) Http2CodecUtil.java","10","0" +"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.flush(ChannelHandlerContext) Http2ConnectionHandler.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.DefaultPromise.notifyListener0(Future, GenericFutureListener) DefaultPromise.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.DefaultPromise.notifyListeners() DefaultPromise.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.DefaultPromise.notifyListenersNow() DefaultPromise.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.DefaultPromise.setSuccess0(Object) DefaultPromise.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.DefaultPromise.setValue0(Object) DefaultPromise.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.DefaultPromise.trySuccess(Object) DefaultPromise.java","10","0" +"io.grpc.netty.shaded.io.netty.util.internal.PromiseNotificationUtil.trySuccess(Promise, Object, InternalLogger) PromiseNotificationUtil.java","10","0" +"io.jaegertracing.internal.reporters.RemoteReporter$FlushCommand.execute() RemoteReporter.java","10","0" +"com.futurewei.alcor.schema.Goalstate$HostResources.internalGetFieldAccessorTable() Goalstate.java","10","0" +"com.futurewei.alcor.schema.Port$PortConfiguration.getMacAddressBytes() Port.java","10","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.(BinaryContext) BinaryWriterExImpl.java","10","0" +"org.apache.ignite.internal.binary.BinaryWriterExImpl.(BinaryContext, BinaryThreadLocalContext) BinaryWriterExImpl.java","10","0" +"com.google.protobuf.CodedOutputStream.computeTagSize(int) CodedOutputStream.java","10","10" +"com.google.protobuf.CodedOutputStream.computeUInt32Size(int, int) CodedOutputStream.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.AbstractScheduledEventExecutor.pollScheduledTask(long) AbstractScheduledEventExecutor.java","10","10" +"io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.fetchFromScheduledTaskQueue() SingleThreadEventExecutor.java","10","0" +"java.lang.String.(byte[], int, int, Charset) String.java","10","10" +"java.util.concurrent.ConcurrentHashMap.put(Object, Object) ConcurrentHashMap.java","10","10" +"com.futurewei.alcor.schema.Port$PortConfiguration.(CodedInputStream, ExtensionRegistryLite) Port.java","10","10" +"com.futurewei.alcor.schema.Port$PortConfiguration$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) Port.java","10","0" +"com.futurewei.alcor.schema.Port$PortConfiguration$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) Port.java","10","0" +"com.futurewei.alcor.schema.Port$PortState.(CodedInputStream, ExtensionRegistryLite) Port.java","10","0" +"com.futurewei.alcor.schema.Port$PortState$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) Port.java","10","0" +"com.futurewei.alcor.schema.Port$PortState$1.parsePartialFrom(CodedInputStream, ExtensionRegistryLite) Port.java","10","0" +"com.futurewei.alcor.schema.Port$PortState$Builder.mergeFrom(CodedInputStream, ExtensionRegistryLite) Port.java","10","0" +"com.futurewei.alcor.schema.Port$PortState$Builder.mergeFrom(CodedInputStream, ExtensionRegistryLite) Port.java","10","0" +"com.google.protobuf.CodedInputStream$ArrayDecoder.readMessage(MessageLite$Builder, ExtensionRegistryLite) CodedInputStream.java","10","0" +"com.google.protobuf.MapField$MutatabilityAwareMap.get(Object) MapField.java","10","0" +"java.util.Collections$UnmodifiableMap.get(Object) Collections.java","10","0" +"com.google.protobuf.ByteString.isEmpty() ByteString.java","10","10" +"com.futurewei.alcor.schema.Port$PortConfiguration.writeTo(CodedOutputStream) Port.java","10","0" +"com.futurewei.alcor.schema.Port$PortState.writeTo(CodedOutputStream) Port.java","10","0" +"com.google.protobuf.CodedOutputStream$ArrayEncoder.writeMessage(int, MessageLite) CodedOutputStream.java","10","0" +"com.google.protobuf.CodedOutputStream$ArrayEncoder.writeMessageNoTag(MessageLite) CodedOutputStream.java","10","0" +"java.util.Collections$UnmodifiableList.get(int) Collections.java","10","10" +"io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.pollTask() SingleThreadEventExecutor.java","10","0" +"io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.pollTaskFrom(Queue) SingleThreadEventExecutor.java","10","10" +"java.util.concurrent.ArrayBlockingQueue.take() ArrayBlockingQueue.java","10","10" +"java.lang.ThreadLocal.set(Object) ThreadLocal.java","10","10" +"org.apache.ignite.internal.util.IgniteUtils.restoreOldIgniteName(String, String) IgniteUtils.java","10","0" From 016aaf5d9de7b0115c79718e238a1ca4ce0cedf3 Mon Sep 17 00:00:00 2001 From: Liguang Xie Date: Wed, 21 Jul 2021 22:36:58 -0700 Subject: [PATCH 13/16] Add create ignite client with cache config and support in ip mgr --- .../common/config/IgniteConfiguration.java | 84 ----------------- .../alcor/common/db/CacheFactory.java | 5 ++ .../alcor/common/db/ICacheFactory.java | 8 ++ .../common/db/ignite/IgniteCacheFactory.java | 6 +- .../db/ignite/IgniteClientCacheFactory.java | 7 +- .../common/db/ignite/IgniteClientDbCache.java | 18 ++++ .../common/db/ignite/IgniteConfiguration.java | 9 +- .../alcor/common/db/ignite/IgniteDbCache.java | 39 +++++--- .../common/db/redis/RedisCacheFactory.java | 9 +- .../common/db/redis/RedisConfiguration.java | 4 - .../repo/IpAddrRangeRepo.java | 90 ++++++++++++++----- 11 files changed, 147 insertions(+), 132 deletions(-) delete mode 100644 lib/src/main/java/com/futurewei/alcor/common/config/IgniteConfiguration.java diff --git a/lib/src/main/java/com/futurewei/alcor/common/config/IgniteConfiguration.java b/lib/src/main/java/com/futurewei/alcor/common/config/IgniteConfiguration.java deleted file mode 100644 index 42bea39ab..000000000 --- a/lib/src/main/java/com/futurewei/alcor/common/config/IgniteConfiguration.java +++ /dev/null @@ -1,84 +0,0 @@ -/* -MIT License -Copyright(c) 2020 Futurewei Cloud - - Permission is hereby granted, - free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -package com.futurewei.alcor.common.config; - -import com.futurewei.alcor.common.logging.Logger; -import com.futurewei.alcor.common.logging.LoggerFactory; -import org.apache.ignite.Ignition; -import org.apache.ignite.client.ClientException; -import org.apache.ignite.client.IgniteClient; -import org.apache.ignite.configuration.ClientConfiguration; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.util.Assert; - -import java.util.logging.Level; - -//@Configuration -//@ComponentScan("com.futurewei.common.service") -//@EntityScan("com.futurewei.common.entity") -//@ConditionalOnProperty(prefix = "ignite", name = "host") -@Deprecated -public class IgniteConfiguration { - private static final Logger logger = LoggerFactory.getLogger(); - - @Value("${ignite.host}") - private String host; - - @Value("${ignite.port}") - private Integer port; - - @Value("${ignite.key-store-path:#{null}}") - private String keyStorePath; - - @Value("${ignite.key-store-password:#{null}}") - private String keyStorePassword; - - @Value("${ignite.trust-store-path:#{null}}") - private String trustStorePath; - - @Value("${ignite.trust-store-password:#{null}}") - private String trustStorePassword; - - @Bean - public IgniteClient igniteClientInstance() { - ClientConfiguration cfg = new ClientConfiguration() - .setAddresses(host + ":" + port); - - if (keyStorePath != null && keyStorePassword != null && - trustStorePath != null && trustStorePassword != null) { - cfg.setSslClientCertificateKeyStorePath(keyStorePath) - .setSslClientCertificateKeyStorePassword(keyStorePassword) - .setSslTrustCertificateKeyStorePath(trustStorePath) - .setSslTrustCertificateKeyStorePassword(trustStorePassword); - } - - IgniteClient igniteClient = null; - - try { - igniteClient = Ignition.startClient(cfg); - } catch (ClientException e) { - logger.log(Level.WARNING, "Start client failed:" + e.getMessage()); - } catch (Exception e) { - logger.log(Level.WARNING, "Unexpected failure:" + e.getMessage()); - } - - Assert.notNull(igniteClient, "IgniteClient is null"); - - return igniteClient; - } -} diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java index b546177b3..5008b7433 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java @@ -21,6 +21,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.redis.RedisCacheFactory; import org.apache.ignite.Ignite; import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.configuration.CacheConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; @@ -43,6 +44,10 @@ public ICache getCache(Class v, String cacheName) { return iCacheFactory.getCache(v, cacheName); } + public ICache getCache(Class v, CacheConfiguration cacheConfig) { + return iCacheFactory.getCache(v, cacheConfig); + } + public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit){ return iCacheFactory.getExpireCache(v, timeout, timeUnit); } diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java index 5140d8aec..e5fb71505 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java @@ -16,6 +16,8 @@ free of charge, to any person obtaining a copy of this software and associated d package com.futurewei.alcor.common.db; +import org.apache.ignite.configuration.CacheConfiguration; + import java.util.concurrent.TimeUnit; public interface ICacheFactory { @@ -34,6 +36,12 @@ public interface ICacheFactory { */ ICache getCache(Class v, String cacheName); + /** + * get a cache with cache name and configuration + * @return + */ + ICache getCache(Class v, CacheConfiguration cacheConfig); + /** * get a cache with auto set expire time * @return diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java index d12c9d6f6..fda95f97e 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java @@ -21,12 +21,12 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.IDistributedLock; import com.futurewei.alcor.common.db.Transaction; import org.apache.ignite.Ignite; +import org.apache.ignite.configuration.CacheConfiguration; import javax.cache.expiry.CreatedExpiryPolicy; import javax.cache.expiry.Duration; import javax.cache.expiry.ExpiryPolicy; import java.util.concurrent.TimeUnit; -import java.util.concurrent.locks.Lock; public class IgniteCacheFactory implements ICacheFactory { @@ -50,6 +50,10 @@ public ICache getCache(Class v, String cacheName) { return new IgniteDbCache<>(ignite, cacheName); } + @Override + public ICache + getCache(Class v, CacheConfiguration cacheConfig) { return new IgniteDbCache<>(ignite, cacheConfig); } + @Override public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit) { ExpiryPolicy ep = CreatedExpiryPolicy.factoryOf(new Duration(timeUnit, timeout)).create(); diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java index fa77ec7eb..f184aef55 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java @@ -21,7 +21,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.IDistributedLock; import com.futurewei.alcor.common.db.Transaction; import org.apache.ignite.client.IgniteClient; -import org.apache.ignite.configuration.ClientConfiguration; +import org.apache.ignite.configuration.CacheConfiguration; import javax.cache.expiry.CreatedExpiryPolicy; import javax.cache.expiry.Duration; @@ -54,6 +54,11 @@ public ICache getCache(Class v, String cacheName) { return new IgniteClientDbCache<>(igniteClient, cacheName); } + @Override + public ICache getCache(Class v, CacheConfiguration cacheConfig) { + return new IgniteClientDbCache<>(igniteClient, cacheConfig); + } + @Override public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit) { ExpiryPolicy ep = CreatedExpiryPolicy.factoryOf(new Duration(timeUnit, timeout)).create(); diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java index 52b160572..ac0b95508 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java @@ -28,8 +28,10 @@ free of charge, to any person obtaining a copy of this software and associated d import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.ScanQuery; import org.apache.ignite.client.ClientCache; +import org.apache.ignite.client.ClientCacheConfiguration; import org.apache.ignite.client.ClientException; import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.lang.IgniteBiPredicate; import org.springframework.util.Assert; @@ -61,6 +63,22 @@ public IgniteClientDbCache(IgniteClient igniteClient, String name) { this.transaction = new IgniteClientTransaction(igniteClient); } + public IgniteClientDbCache(IgniteClient igniteClient, CacheConfiguration cacheConfig) { + try { + ClientCacheConfiguration clientCacheConfig = new ClientCacheConfiguration(); + clientCacheConfig.setName(cacheConfig.getName()); + clientCacheConfig.setAtomicityMode(cacheConfig.getAtomicityMode()); + logger.log(Level.INFO, "Getting or creating cache " + clientCacheConfig.getName() + " AtomicityMode is " + clientCacheConfig.getAtomicityMode()); + this.cache = igniteClient.getOrCreateCache(clientCacheConfig); + logger.log(Level.INFO, "Retrieved cache " + this.cache.getConfiguration().getName() + " AtomicityMode is " + this.cache.getConfiguration().getAtomicityMode()); + } catch (ClientException e) { + logger.log(Level.WARNING, "Create cache for client " + cacheConfig.getName() + " failed:" + e.getMessage()); + } + + Assert.notNull(this.cache, "Create cache for client " + cacheConfig.getName() + "failed"); + this.transaction = new IgniteClientTransaction(igniteClient); + } + public IgniteClientDbCache(IgniteClient igniteClient, String name, ExpiryPolicy ep) { try { this.cache = igniteClient.getOrCreateCache(name).withExpirePolicy(ep); diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteConfiguration.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteConfiguration.java index 8d5dd3d0e..17fa9bd53 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteConfiguration.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteConfiguration.java @@ -17,7 +17,6 @@ free of charge, to any person obtaining a copy of this software and associated d package com.futurewei.alcor.common.db.ignite; import com.futurewei.alcor.common.db.ICacheFactory; -import com.futurewei.alcor.common.db.IDistributedLockFactory; import com.futurewei.alcor.common.logging.Logger; import com.futurewei.alcor.common.logging.LoggerFactory; import org.apache.ignite.Ignite; @@ -81,8 +80,8 @@ public class IgniteConfiguration { @Bean @Primary - public ICacheFactory igniteClientFactoryInstance(){ - if(thinClientEnable){ + public ICacheFactory igniteClientFactoryInstance() { + if (thinClientEnable) { return new IgniteClientCacheFactory(this.getThinIgniteClient(), this.tryLockInterval, this.expireTime); @@ -145,10 +144,10 @@ private Ignite getIgniteClient(String instanceName) { SslContextFactory factory = new SslContextFactory(); factory.setKeyStoreFilePath(keyStorePath); factory.setKeyStorePassword(keyStorePassword.toCharArray()); - if(trustStorePath != null && trustStorePassword != null) { + if (trustStorePath != null && trustStorePassword != null) { factory.setTrustStoreFilePath(trustStorePath); factory.setTrustStorePassword(trustStorePassword.toCharArray()); - }else{ + } else { factory.setTrustManagers(SslContextFactory.getDisabledTrustManager()); } diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java index b62820281..f7b7aa5a7 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java @@ -17,7 +17,6 @@ free of charge, to any person obtaining a copy of this software and associated d package com.futurewei.alcor.common.db.ignite; import com.futurewei.alcor.common.db.CacheException; -import com.futurewei.alcor.common.db.ICache; import com.futurewei.alcor.common.db.Transaction; import com.futurewei.alcor.common.db.ignite.query.ScanQueryBuilder; import com.futurewei.alcor.common.db.ignite.query.MapPredicate; @@ -31,6 +30,7 @@ free of charge, to any person obtaining a copy of this software and associated d import org.apache.ignite.cache.query.Query; import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.ScanQuery; +import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.transactions.TransactionException; import org.springframework.util.Assert; @@ -67,6 +67,21 @@ public IgniteDbCache(Ignite ignite, String name) { this.transaction = new IgniteTransaction(ignite); } + public IgniteDbCache(Ignite ignite, CacheConfiguration cfg) { + + try { + this.cache = ignite.getOrCreateCache(cfg); + } catch (javax.cache.CacheException e) { + this.cache = ignite.getOrCreateCache(cfg); + logger.log(Level.WARNING, "Create cache for client " + cfg + " failed:" + e.getMessage()); + } catch (Exception e) { + logger.log(Level.WARNING, "Unexpected failure:" + e.getMessage()); + } + + Assert.notNull(cache, "Create cache for client " + cfg + "failed"); + this.transaction = new IgniteTransaction(ignite); + } + public IgniteDbCache(Ignite client, String name, ExpiryPolicy ep) { try { @@ -162,19 +177,19 @@ public V get(IgniteBiPredicate igniteBiPredicate) throws CacheE QueryCursor> cursor = cache.withKeepBinary().query(ScanQueryBuilder.newScanQuery(igniteBiPredicate)); List> result = cursor.getAll(); - if(result.size() > 1){ + if (result.size() > 1) { throw new CacheException("more than one rows found!"); } - if(result.isEmpty()){ + if (result.isEmpty()) { return null; } E2 obj = result.get(0).getValue(); - if (obj instanceof BinaryObject){ - BinaryObject binaryObject = (BinaryObject)obj; + if (obj instanceof BinaryObject) { + BinaryObject binaryObject = (BinaryObject) obj; return binaryObject.deserialize(); - }else{ + } else { throw new CacheException("no support for object type:" + obj.getClass().getName()); } } @@ -190,16 +205,16 @@ public Map getAll(IgniteBiPredicate igniteBiPredicate) th QueryCursor> cursor = cache.withKeepBinary().query(ScanQueryBuilder.newScanQuery(igniteBiPredicate)); List> result = cursor.getAll(); - if(result.size() >= RESULT_THRESHOLD_SIZE){ + if (result.size() >= RESULT_THRESHOLD_SIZE) { throw new CacheException("too many rows found!"); } Map values = new HashMap<>(result.size()); - for(Cache.Entry entry: result){ + for (Cache.Entry entry : result) { E2 obj = entry.getValue(); - if (obj instanceof BinaryObject){ - BinaryObject binaryObject = (BinaryObject)obj; - values.put((K)entry.getKey(), binaryObject.deserialize()); - }else{ + if (obj instanceof BinaryObject) { + BinaryObject binaryObject = (BinaryObject) obj; + values.put((K) entry.getKey(), binaryObject.deserialize()); + } else { throw new CacheException("no support for object type:" + obj.getClass().getName()); } } diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java index 9ae4b842c..5881e67a9 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java @@ -20,7 +20,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.ICacheFactory; import com.futurewei.alcor.common.db.IDistributedLock; import com.futurewei.alcor.common.db.Transaction; -import com.futurewei.alcor.common.entity.TokenEntity; +import org.apache.ignite.configuration.CacheConfiguration; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate; @@ -53,13 +53,18 @@ public ICache getCache(Class v, String cacheName) { return new RedisCache<>(template, cacheName); } + @Override + public ICache getCache(Class v, CacheConfiguration cacheConfig) { + return null; + } + @Override public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit) { RedisTemplate template = getRedisTemplate(v); return new RedisExpireCache<>(template, timeout, timeUnit); } - private RedisTemplate getRedisTemplate(Class v){ + private RedisTemplate getRedisTemplate(Class v) { RedisTemplate template = new RedisTemplate<>(); template.setConnectionFactory(lettuceConnectionFactory); diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisConfiguration.java b/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisConfiguration.java index f24a56b1b..32d8e126e 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisConfiguration.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisConfiguration.java @@ -18,18 +18,14 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.ICacheFactory; -import com.futurewei.alcor.common.db.IDistributedLock; -import com.futurewei.alcor.common.db.IDistributedLockFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.core.annotation.Order; import org.springframework.data.redis.connection.RedisStandaloneConfiguration; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; -import org.springframework.data.redis.core.StringRedisTemplate; @Configuration @ComponentScan("com.futurewei.alcor.common.db") diff --git a/services/private_ip_manager/src/main/java/com/futurewei/alcor/privateipmanager/repo/IpAddrRangeRepo.java b/services/private_ip_manager/src/main/java/com/futurewei/alcor/privateipmanager/repo/IpAddrRangeRepo.java index f6938bd5f..84e2f47de 100644 --- a/services/private_ip_manager/src/main/java/com/futurewei/alcor/privateipmanager/repo/IpAddrRangeRepo.java +++ b/services/private_ip_manager/src/main/java/com/futurewei/alcor/privateipmanager/repo/IpAddrRangeRepo.java @@ -29,6 +29,8 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.web.entity.ip.IpAddrRequest; import com.futurewei.alcor.web.entity.ip.IpAddrUpdateRequest; import com.futurewei.alcor.web.entity.ip.IpVersion; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.configuration.CacheConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -149,7 +151,7 @@ private IpAddrAlloc doAllocateIpAddr(String vpcId, int ipVersion, String ipAddr) } IpAddrAlloc ipAddrAlloc = null; - for (String rangeId: vpcIpRange.getRanges()) { + for (String rangeId : vpcIpRange.getRanges()) { if (ipAddrAlloc != null) { break; } @@ -164,8 +166,12 @@ private IpAddrAlloc doAllocateIpAddr(String vpcId, int ipVersion, String ipAddr) } try { + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(rangeId)); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(rangeId)); + cacheFactory.getCache(IpAddrAlloc.class, cfg); ipAddrAlloc = ipAddrRange.allocate(ipAddrCache, ipAddr); } catch (Exception e) { LOG.warn("Allocate ip address from {} failed", ipAddrRange.getId()); @@ -184,6 +190,7 @@ private IpAddrAlloc doAllocateIpAddr(String vpcId, int ipVersion, String ipAddr) /** * Allocate a ip address from IpAddrRange repository + * * @param request Assign ip address request * @return Ip address assigned from ip range * @throws Exception Db operation or ip address assignment exception @@ -199,6 +206,7 @@ public synchronized IpAddrAlloc allocateIpAddr(IpAddrRequest request) throws Exc /** * Assign multiple ip addresses from IpAddrRange repository + * * @param requests The number of ip addresses that will be assigned from each ip range * @return Number of ip addresses assigned each ip range * @throws Exception Db operation or ip address assignment exception @@ -209,14 +217,18 @@ public synchronized Map> allocateIpAddrBulk(Map> result = new HashMap<>(); try (Transaction tx = ipAddrRangeCache.getTransaction().start()) { - for (Map.Entry entry: requests.entrySet()) { + for (Map.Entry entry : requests.entrySet()) { IpAddrRange ipAddrRange = ipAddrRangeCache.get(entry.getKey()); if (ipAddrRange == null) { throw new IpRangeNotFoundException(); } + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(ipAddrRange.getId())); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(ipAddrRange.getId())); + cacheFactory.getCache(IpAddrAlloc.class, cfg); List ipAddrAllocs = ipAddrRange.allocateBulk(ipAddrCache, entry.getValue()); ipAddrRangeCache.put(ipAddrRange.getId(), ipAddrRange); @@ -236,8 +248,12 @@ private List doAllocateIpAddr(String rangeId, List i throw new IpRangeNotFoundException(); } + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(rangeId)); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(rangeId)); + cacheFactory.getCache(IpAddrAlloc.class, cfg); List ips = ipRequests.stream() .map(IpAddrRequest::getIp) @@ -258,7 +274,7 @@ private List doAllocateIpAddr(String vpcId, int ipVersion, List requestIps = ips.subList(0, ips.size()); - for (String rangeId: vpcIpRange.getRanges()) { + for (String rangeId : vpcIpRange.getRanges()) { if (result.size() == ips.size()) { break; } @@ -272,9 +288,12 @@ private List doAllocateIpAddr(String vpcId, int ipVersion, List ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(rangeId)); + cacheFactory.getCache(IpAddrAlloc.class, cfg); List ipAddrAllocs = ipAddrRange.allocateBulk(ipAddrCache, requestIps); @@ -298,7 +317,7 @@ public synchronized List allocateIpAddrBulk(Map> vpcIpv6Requests) throws Exception { List result = new ArrayList<>(); try (Transaction tx = ipAddrRangeCache.getTransaction().start()) { - allocateIpAddrBulkMethod(rangeRequests,vpcIpv4Requests,vpcIpv6Requests,result); + allocateIpAddrBulkMethod(rangeRequests, vpcIpv4Requests, vpcIpv6Requests, result); tx.commit(); } @@ -313,8 +332,12 @@ public synchronized void modifyIpAddrState(String rangeId, String ipAddr, String throw new IpRangeNotFoundException(); } + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(rangeId)); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(ipAddrRange.getId())); + cacheFactory.getCache(IpAddrAlloc.class, cfg); ipAddrRange.modifyIpAddrState(ipAddrCache, ipAddr, state); ipAddrRangeCache.put(ipAddrRange.getId(), ipAddrRange); @@ -326,7 +349,7 @@ public synchronized void modifyIpAddrState(String rangeId, String ipAddr, String @DurationStatistics public synchronized void releaseIpAddr(String rangeId, String ipAddr) throws Exception { try (Transaction tx = ipAddrRangeCache.getTransaction().start()) { - releaseIpAddrMethod(rangeId,ipAddr); + releaseIpAddrMethod(rangeId, ipAddr); tx.commit(); } } @@ -346,8 +369,12 @@ public synchronized IpAddrAlloc getIpAddr(String rangeId, String ipAddr) throws throw new IpRangeNotFoundException(); } + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(rangeId)); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(ipAddrRange.getId())); + cacheFactory.getCache(IpAddrAlloc.class, cfg); return ipAddrRange.getIpAddr(ipAddrCache, ipAddr); } @@ -359,8 +386,12 @@ public synchronized Collection getIpAddrBulk(String rangeId) throws throw new IpRangeNotFoundException(); } + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(rangeId)); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(ipAddrRange.getId())); + cacheFactory.getCache(IpAddrAlloc.class, cfg); return ipAddrRange.getIpAddrBulk(ipAddrCache); } @@ -437,8 +468,8 @@ public synchronized IpAddrRange getIpAddrRange(String rangeId) throws Exception } @DurationStatistics - public synchronized List updateIpAddr(IpAddrUpdateRequest request,Map> rangeToIpAddrList,Map> rangeRequests, - Map> vpcIpv4Requests,Map> vpcIpv6Requests) throws Exception { + public synchronized List updateIpAddr(IpAddrUpdateRequest request, Map> rangeToIpAddrList, Map> rangeRequests, + Map> vpcIpv4Requests, Map> vpcIpv6Requests) throws Exception { List result = null; try (Transaction tx = ipAddrRangeCache.getTransaction().start()) { @@ -452,7 +483,7 @@ public synchronized List updateIpAddr(IpAddrUpdateRequest request,M if (request.getNewIpAddrRequests().size() > 0) { result = new ArrayList<>(); if (request.getNewIpAddrRequests().size() > 1) { - allocateIpAddrBulkMethod(rangeRequests, vpcIpv4Requests, vpcIpv6Requests,result); + allocateIpAddrBulkMethod(rangeRequests, vpcIpv4Requests, vpcIpv6Requests, result); } else { IpAddrAlloc ipAddrAlloc = allocateIpAddrMethod(request.getNewIpAddrRequests().get(0)); result.add(ipAddrAlloc); @@ -463,15 +494,19 @@ public synchronized List updateIpAddr(IpAddrUpdateRequest request,M return result; } - private void releaseIpAddrBulkMethod(Map> requests) throws Exception{ - for (Map.Entry> entry: requests.entrySet()) { + private void releaseIpAddrBulkMethod(Map> requests) throws Exception { + for (Map.Entry> entry : requests.entrySet()) { IpAddrRange ipAddrRange = ipAddrRangeCache.get(entry.getKey()); if (ipAddrRange == null) { throw new IpRangeNotFoundException(); } + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(ipAddrRange.getId())); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(ipAddrRange.getId())); + cacheFactory.getCache(IpAddrAlloc.class, cfg); ipAddrRange.releaseBulk(ipAddrCache, entry.getValue()); ipAddrRangeCache.put(ipAddrRange.getId(), ipAddrRange); @@ -484,8 +519,12 @@ private void releaseIpAddrMethod(String rangeId, String ipAddr) throws Exception throw new IpRangeNotFoundException(); } + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(rangeId)); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(ipAddrRange.getId())); + cacheFactory.getCache(IpAddrAlloc.class, cfg); ipAddrRange.release(ipAddrCache, ipAddr); ipAddrRangeCache.put(ipAddrRange.getId(), ipAddrRange); @@ -494,11 +533,11 @@ private void releaseIpAddrMethod(String rangeId, String ipAddr) throws Exception private void allocateIpAddrBulkMethod(Map> rangeRequests, Map> vpcIpv4Requests, Map> vpcIpv6Requests, List result) throws Exception { - for (Map.Entry> entry: rangeRequests.entrySet()) { + for (Map.Entry> entry : rangeRequests.entrySet()) { result.addAll(doAllocateIpAddr(entry.getKey(), entry.getValue())); } - for (Map.Entry> entry: vpcIpv4Requests.entrySet()) { + for (Map.Entry> entry : vpcIpv4Requests.entrySet()) { result.addAll(doAllocateIpAddr(entry.getKey(), IpVersion.IPV4.getVersion(), entry.getValue().stream() @@ -506,7 +545,7 @@ private void allocateIpAddrBulkMethod(Map> rangeRequ .collect(Collectors.toList()))); } - for (Map.Entry> entry: vpcIpv6Requests.entrySet()) { + for (Map.Entry> entry : vpcIpv6Requests.entrySet()) { result.addAll(doAllocateIpAddr(entry.getKey(), IpVersion.IPV6.getVersion(), entry.getValue().stream() @@ -525,8 +564,13 @@ private IpAddrAlloc allocateIpAddrMethod(IpAddrRequest request) throws Exception if (ipAddrRange == null) { throw new IpRangeNotFoundException(); } + + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getIpAddrCacheName(ipAddrRange.getId())); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache ipAddrCache = - cacheFactory.getCache(IpAddrAlloc.class, getIpAddrCacheName(request.getRangeId())); + cacheFactory.getCache(IpAddrAlloc.class, cfg); ipAddrAlloc = ipAddrRange.allocate(ipAddrCache, request.getIp()); ipAddrRangeCache.put(ipAddrRange.getId(), ipAddrRange); From 257ef7161d8e289609d4589e447cc20859c8e827 Mon Sep 17 00:00:00 2001 From: Prasad Kommoju Date: Thu, 26 Aug 2021 14:06:37 -0700 Subject: [PATCH 14/16] Make all currently used caches transactional --- lib/pr663-config.xml | 84 +++++++++++++++++++ .../alcor/common/db/CacheFactory.java | 7 +- .../alcor/common/db/ICacheFactory.java | 6 +- .../common/db/ignite/IgniteCacheFactory.java | 7 +- .../db/ignite/IgniteClientCacheFactory.java | 8 +- .../common/db/ignite/IgniteClientDbCache.java | 18 ++++ .../alcor/common/db/ignite/IgniteDbCache.java | 16 ++++ .../common/db/redis/RedisCacheFactory.java | 8 +- .../portmanager/repo/NeighborRepository.java | 27 ++++-- 9 files changed, 170 insertions(+), 11 deletions(-) create mode 100644 lib/pr663-config.xml diff --git a/lib/pr663-config.xml b/lib/pr663-config.xml new file mode 100644 index 000000000..db7a55be5 --- /dev/null +++ b/lib/pr663-config.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 127.0.0.1:47500 + 127.0.0.1:47501 + 127.0.0.1:47502 + 127.0.0.1:47503 + 127.0.0.1:47504 + 127.0.0.1:47505 + 127.0.0.1:47506 + 127.0.0.1:47507 + 127.0.0.1:47508 + 127.0.0.1:47509 + + + + + + + + diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java index 338938f57..4b55af778 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/CacheFactory.java @@ -21,6 +21,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.redis.RedisCacheFactory; import org.apache.ignite.Ignite; import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.configuration.CacheConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; @@ -42,7 +43,11 @@ public ICache getCache(Class v, String cacheName) { return iCacheFactory.getCache(v, cacheName); } + public ICache getCache(Class v, CacheConfiguration cacheConfig) { + return iCacheFactory.getCache(v, cacheConfig); + } + public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit){ return iCacheFactory.getExpireCache(v, timeout, timeUnit); } -} +} \ No newline at end of file diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java index 5140d8aec..b23b3b7f5 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ICacheFactory.java @@ -16,6 +16,8 @@ free of charge, to any person obtaining a copy of this software and associated d package com.futurewei.alcor.common.db; +import org.apache.ignite.configuration.CacheConfiguration; + import java.util.concurrent.TimeUnit; public interface ICacheFactory { @@ -34,6 +36,8 @@ public interface ICacheFactory { */ ICache getCache(Class v, String cacheName); + ICache getCache(Class v, CacheConfiguration cacheConfig); + /** * get a cache with auto set expire time * @return @@ -48,4 +52,4 @@ public interface ICacheFactory { IDistributedLock getDistributedLock(Class t); Transaction getTransaction(); -} +} \ No newline at end of file diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java index d12c9d6f6..097d9b4f1 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteCacheFactory.java @@ -21,6 +21,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.IDistributedLock; import com.futurewei.alcor.common.db.Transaction; import org.apache.ignite.Ignite; +import org.apache.ignite.configuration.CacheConfiguration; import javax.cache.expiry.CreatedExpiryPolicy; import javax.cache.expiry.Duration; @@ -50,6 +51,10 @@ public ICache getCache(Class v, String cacheName) { return new IgniteDbCache<>(ignite, cacheName); } + @Override + public ICache + getCache(Class v, CacheConfiguration cacheConfig) { return new IgniteDbCache<>(ignite, cacheConfig); } + @Override public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit) { ExpiryPolicy ep = CreatedExpiryPolicy.factoryOf(new Duration(timeUnit, timeout)).create(); @@ -66,4 +71,4 @@ public Transaction getTransaction() { return new IgniteTransaction(ignite); } -} +} \ No newline at end of file diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java index fa77ec7eb..7eb876a2c 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientCacheFactory.java @@ -21,6 +21,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.IDistributedLock; import com.futurewei.alcor.common.db.Transaction; import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.ClientConfiguration; import javax.cache.expiry.CreatedExpiryPolicy; @@ -54,6 +55,11 @@ public ICache getCache(Class v, String cacheName) { return new IgniteClientDbCache<>(igniteClient, cacheName); } + @Override + public ICache getCache(Class v, CacheConfiguration cacheConfig) { + return new IgniteClientDbCache<>(igniteClient, cacheConfig); + } + @Override public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit) { ExpiryPolicy ep = CreatedExpiryPolicy.factoryOf(new Duration(timeUnit, timeout)).create(); @@ -69,4 +75,4 @@ public IDistributedLock getDistributedLock(Class t) { public Transaction getTransaction() { return new IgniteClientTransaction(igniteClient); } -} +} \ No newline at end of file diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java index 52b160572..ac0b95508 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java @@ -28,8 +28,10 @@ free of charge, to any person obtaining a copy of this software and associated d import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.ScanQuery; import org.apache.ignite.client.ClientCache; +import org.apache.ignite.client.ClientCacheConfiguration; import org.apache.ignite.client.ClientException; import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.lang.IgniteBiPredicate; import org.springframework.util.Assert; @@ -61,6 +63,22 @@ public IgniteClientDbCache(IgniteClient igniteClient, String name) { this.transaction = new IgniteClientTransaction(igniteClient); } + public IgniteClientDbCache(IgniteClient igniteClient, CacheConfiguration cacheConfig) { + try { + ClientCacheConfiguration clientCacheConfig = new ClientCacheConfiguration(); + clientCacheConfig.setName(cacheConfig.getName()); + clientCacheConfig.setAtomicityMode(cacheConfig.getAtomicityMode()); + logger.log(Level.INFO, "Getting or creating cache " + clientCacheConfig.getName() + " AtomicityMode is " + clientCacheConfig.getAtomicityMode()); + this.cache = igniteClient.getOrCreateCache(clientCacheConfig); + logger.log(Level.INFO, "Retrieved cache " + this.cache.getConfiguration().getName() + " AtomicityMode is " + this.cache.getConfiguration().getAtomicityMode()); + } catch (ClientException e) { + logger.log(Level.WARNING, "Create cache for client " + cacheConfig.getName() + " failed:" + e.getMessage()); + } + + Assert.notNull(this.cache, "Create cache for client " + cacheConfig.getName() + "failed"); + this.transaction = new IgniteClientTransaction(igniteClient); + } + public IgniteClientDbCache(IgniteClient igniteClient, String name, ExpiryPolicy ep) { try { this.cache = igniteClient.getOrCreateCache(name).withExpirePolicy(ep); diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java index b62820281..f478198cb 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteDbCache.java @@ -31,6 +31,7 @@ free of charge, to any person obtaining a copy of this software and associated d import org.apache.ignite.cache.query.Query; import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.ScanQuery; +import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.transactions.TransactionException; import org.springframework.util.Assert; @@ -67,6 +68,21 @@ public IgniteDbCache(Ignite ignite, String name) { this.transaction = new IgniteTransaction(ignite); } + public IgniteDbCache(Ignite ignite, CacheConfiguration cfg) { + + try { + this.cache = ignite.getOrCreateCache(cfg); + } catch (javax.cache.CacheException e) { + this.cache = ignite.getOrCreateCache(cfg); + logger.log(Level.WARNING, "Create cache for client " + cfg + " failed:" + e.getMessage()); + } catch (Exception e) { + logger.log(Level.WARNING, "Unexpected failure:" + e.getMessage()); + } + + Assert.notNull(cache, "Create cache for client " + cfg + "failed"); + this.transaction = new IgniteTransaction(ignite); + } + public IgniteDbCache(Ignite client, String name, ExpiryPolicy ep) { try { diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java b/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java index 9ae4b842c..499d9a080 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/redis/RedisCacheFactory.java @@ -21,6 +21,7 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.common.db.IDistributedLock; import com.futurewei.alcor.common.db.Transaction; import com.futurewei.alcor.common.entity.TokenEntity; +import org.apache.ignite.configuration.CacheConfiguration; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate; @@ -53,6 +54,11 @@ public ICache getCache(Class v, String cacheName) { return new RedisCache<>(template, cacheName); } + @Override + public ICache getCache(Class v, CacheConfiguration cacheConfig) { + return null; + } + @Override public ICache getExpireCache(Class v, long timeout, TimeUnit timeUnit) { RedisTemplate template = getRedisTemplate(v); @@ -86,4 +92,4 @@ public Transaction getTransaction() { template.setConnectionFactory(lettuceConnectionFactory); return new RedisTransaction(template); } -} +} \ No newline at end of file diff --git a/services/port_manager/src/main/java/com/futurewei/alcor/portmanager/repo/NeighborRepository.java b/services/port_manager/src/main/java/com/futurewei/alcor/portmanager/repo/NeighborRepository.java index f9650464b..7162dfbc7 100644 --- a/services/port_manager/src/main/java/com/futurewei/alcor/portmanager/repo/NeighborRepository.java +++ b/services/port_manager/src/main/java/com/futurewei/alcor/portmanager/repo/NeighborRepository.java @@ -22,8 +22,11 @@ free of charge, to any person obtaining a copy of this software and associated d import com.futurewei.alcor.portmanager.entity.PortNeighbors; import com.futurewei.alcor.web.entity.dataplane.NeighborInfo; import com.futurewei.alcor.web.entity.port.PortEntity; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.configuration.CacheConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import java.util.List; import java.util.Map; @@ -37,6 +40,7 @@ public class NeighborRepository { private ICache neighborCache; private CacheFactory cacheFactory; + @Autowired public NeighborRepository(CacheFactory cacheFactory) { this.cacheFactory = cacheFactory; this.neighborCache= cacheFactory.getCache(PortNeighbors.class); @@ -53,16 +57,21 @@ public void createNeighbors(Map> neighbors) throws Ex .stream() .collect(Collectors.toMap(NeighborInfo::getPortIp, Function.identity())); - ICache neighborCache = this.cacheFactory.getCache( - NeighborInfo.class, getNeighborCacheName(entry.getKey())); + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getNeighborCacheName(entry.getKey())); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + ICache neighborCache = cacheFactory.getCache(NeighborInfo.class, cfg); neighborCache.putAll(neighborMap); } } } public void updateNeighbors(PortEntity oldPortEntity, List newNeighbors) throws Exception { + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getNeighborCacheName(oldPortEntity.getVpcId())); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); ICache neighborCache = this.cacheFactory.getCache( - NeighborInfo.class, getNeighborCacheName(oldPortEntity.getVpcId())); + NeighborInfo.class, cfg); //Delete old neighborInfos if (oldPortEntity.getFixedIps() != null) { @@ -90,8 +99,11 @@ public void deleteNeighbors(PortEntity portEntity) throws Exception { .map(PortEntity.FixedIp::getIpAddress) .collect(Collectors.toList()); + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getNeighborCacheName(portEntity.getVpcId())); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); ICache neighborCache = this.cacheFactory.getCache( - NeighborInfo.class, getNeighborCacheName(portEntity.getVpcId())); + NeighborInfo.class, cfg); //Delete old neighborInfos for (String oldPortIp: oldPortIps) { @@ -102,8 +114,11 @@ public void deleteNeighbors(PortEntity portEntity) throws Exception { @DurationStatistics public Map getNeighbors(String vpcId) throws CacheException { + CacheConfiguration cfg = new CacheConfiguration(); + cfg.setName(getNeighborCacheName(vpcId)); + cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); ICache neighborCache = this.cacheFactory.getCache( - NeighborInfo.class, getNeighborCacheName(vpcId)); + NeighborInfo.class, cfg); return neighborCache.getAll(); } -} +} \ No newline at end of file From c7809b30f40c9684b3f4173dd513438b7aad6740 Mon Sep 17 00:00:00 2001 From: Prasad Kommoju Date: Thu, 26 Aug 2021 16:57:56 -0700 Subject: [PATCH 15/16] Make more caches to Transactional atomicity to fix subnet deletion problem --- kubernetes/services/ignite_port_config.xml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/kubernetes/services/ignite_port_config.xml b/kubernetes/services/ignite_port_config.xml index 40ee021bd..5110d5218 100644 --- a/kubernetes/services/ignite_port_config.xml +++ b/kubernetes/services/ignite_port_config.xml @@ -41,6 +41,45 @@ Copyright(c) 2020 Futurewei Cloud + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 70e92516263593a42cc1e387f3968b17c9531169 Mon Sep 17 00:00:00 2001 From: Prasad Kommoju Date: Fri, 27 Aug 2021 13:58:38 -0700 Subject: [PATCH 16/16] Address code review comments --- .../alcor/common/db/ignite/IgniteClientDbCache.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java index ac0b95508..a07caf7bd 100644 --- a/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java +++ b/lib/src/main/java/com/futurewei/alcor/common/db/ignite/IgniteClientDbCache.java @@ -72,7 +72,7 @@ public IgniteClientDbCache(IgniteClient igniteClient, CacheConfiguration cacheCo this.cache = igniteClient.getOrCreateCache(clientCacheConfig); logger.log(Level.INFO, "Retrieved cache " + this.cache.getConfiguration().getName() + " AtomicityMode is " + this.cache.getConfiguration().getAtomicityMode()); } catch (ClientException e) { - logger.log(Level.WARNING, "Create cache for client " + cacheConfig.getName() + " failed:" + e.getMessage()); + logger.log(Level.ERROR, "Create cache for client " + cacheConfig.getName() + " failed:" + e.getMessage()); } Assert.notNull(this.cache, "Create cache for client " + cacheConfig.getName() + "failed"); @@ -84,7 +84,7 @@ public IgniteClientDbCache(IgniteClient igniteClient, String name, ExpiryPolicy this.cache = igniteClient.getOrCreateCache(name).withExpirePolicy(ep); logger.log(Level.INFO, "Cache " + name + " AtomicityMode is " + this.cache.getConfiguration().getAtomicityMode()); } catch (ClientException e) { - logger.log(Level.WARNING, "Create cache for client " + name + " failed:" + e.getMessage()); + logger.log(Level.ERROR, "Create cache for client " + name + " failed:" + e.getMessage()); } Assert.notNull(this.cache, "Create cache for client " + name + "failed"); @@ -223,4 +223,4 @@ public long size() { public Transaction getTransaction() { return transaction; } -} \ No newline at end of file +}