Re: [support] ignite tuning help

2024-06-20 Thread f cad
here is a screenshot example
[image: image.png]

f cad  于2024年6月21日周五 11:45写道:

> Hello, community:
>
> I have a cluster ,with three nodes.
> I have two cache, that AtomicityMode is TRANSACTIONAL and Backups number is 
> two and WriteSynchronizationMode is PRIMARY_SYNC
>
>
> I use IgniteClientSpringTransactionManagerwith OPTIMISTIC transaction and 
> SERIALIZABLE concurrency mode.
>
> pseudocode like below
> ignite.transactions().txStart
> if(acahce.get(key)==null) {
>  aCahce.put(key,value)
>  bCahce.put(key,value)
> }
> tx.commit()
>
> Sometimes I find aCahce.get(key) costs 80ms ,Sometimes that costs only 5ms.
> and three ignite nodes usage of cpu and io and memory all not high.
> and client node usage of cpu and io and memory all not high.
> but I use tcpdump to find that Between nodes, there are over 40 TCP 
> retransmissions per second.
> So is this a network issue?
>
>


[support] ignite tuning help

2024-06-20 Thread f cad
Hello, community:

I have a cluster ,with three nodes.
I have two cache, that AtomicityMode is TRANSACTIONAL and Backups
number is two and WriteSynchronizationMode is PRIMARY_SYNC


I use IgniteClientSpringTransactionManagerwith OPTIMISTIC transaction
and SERIALIZABLE concurrency mode.

pseudocode like below
ignite.transactions().txStart
if(acahce.get(key)==null) {
 aCahce.put(key,value)
 bCahce.put(key,value)
}
tx.commit()

Sometimes I find aCahce.get(key) costs 80ms ,Sometimes that costs only 5ms.
and three ignite nodes usage of cpu and io and memory all not high.
and client node usage of cpu and io and memory all not high.
but I use tcpdump to find that Between nodes, there are over 40 TCP
retransmissions per second.
So is this a network issue?


Re: i meet java.lang.OutOfMemoryError: Direct buffer memory

2023-08-18 Thread f cad
Thanks for your suggestion
we set  MaxDirectMemorySize to 8g,it still has exception.
we use spark to read ignite.and use ThinIgniteClientOnK8s api to read.
we find that if multiple spark applications read ignite, then ignite will
hit the direct buffer memory oom.
can you give me some suggestions about how  can i confirm that it is a
network problem?
Best Regards.

Jeremy McMillan  于2023年8月18日周五 20:39写道:

> This is most likely to happen when Ignite is fast and the network is slow.
> It's unclear what's happening when you experience this error, so how to fix
> it is also ambiguous.
>
> You could try increasing direct buffer memory in Java options. If that's
> not sufficient share more about your infrastructure and workload and maybe
> we can suggest something else.
>
> On Fri, Aug 18, 2023, 04:28 f cad  wrote:
>
>> hello,
>> in my ignite cluster.i meet error below:
>> JVM will be halted immediately due to the failure:
>> [failureCtx=FailureContext [type=CRITICAL_ERROR,
>> err=java.lang.OutOfMemoryError: Direct buffer memory]].
>> how can i fix.
>> ignite version is 2.14
>>
>


i meet java.lang.OutOfMemoryError: Direct buffer memory

2023-08-18 Thread f cad
hello,
in my ignite cluster.i meet error below:
JVM will be halted immediately due to the failure:
[failureCtx=FailureContext [type=CRITICAL_ERROR,
err=java.lang.OutOfMemoryError: Direct buffer memory]].
how can i fix.
ignite version is 2.14


Re: Spring (Boot) version

2023-04-13 Thread f cad
we used with springboot 2.6.7. it works fine

Humphrey Lopez  于2023年4月7日周五 14:47写道:

> Currently we are running Ignite with spring boot 2.x version. Is any
> version of Spring (Boot) supported? Can we for example want to upgrade to
> spring boot 3.x ?
>
> Humphrey
>


java thin client idle like 1 hour , ignite server close client port

2023-04-04 Thread f cad
in this case, java thin client need set setHeartbeatEnabled(true)?


ClientConnectionException: Channel is closed

2023-03-30 Thread f cad
Hello,
*I am using ignite in Kubernetes environment.*

*One day ago,IgniteClient can not do query and throw an Exception*.

org.apache.ignite.client.ClientConnectionException: Channel is closed
at
org.apache.ignite.internal.client.thin.TcpClientChannel.convertException(TcpClientChannel.java:366)
at
org.apache.ignite.internal.client.thin.TcpClientChannel.receive(TcpClientChannel.java:319)
at
org.apache.ignite.internal.client.thin.TcpClientChannel.service(TcpClientChannel.java:237)
at
org.apache.ignite.internal.client.thin.ReliableChannel.lambda$service$1(ReliableChannel.java:168)
at
org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:800)
at
org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:766)
at
org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:168)
at
org.apache.ignite.internal.client.thin.ReliableChannel.request(ReliableChannel.java:290)
at
org.apache.ignite.internal.client.thin.TcpIgniteClient.getOrCreateCache(TcpIgniteClient.java:198)

but after i restart ignite client ,it can work normally.

*so what could cause Channel is closed*

*version using : 2.14.0*
--
*Regards,*
*wkhapy123*


Re: Need to plug custom equals method for object in ignite.

2022-06-21 Thread f cad
i face similar case,i  implement key like below,and put jar contains
contactKey class into ignite lib .then i can get result

public class ContactKey implements Externalizable {
private Long id;

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ContactKey that = (ContactKey) o;
return Objects.equal(id, that.id);
}

@Override
public int hashCode() {
return Objects.hashCode(id);
}

@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeLong(id);
}

@Override
public void readExternal(ObjectInput in) throws IOException {
this.id = in.readLong();
}


Saurabh Satardekar  于2022年6月17日周五 23:57写道:

> Respected Sir/Madam,
>
> We have following use case where we have Book class as follows :
>
> public class Book {
>
> private int price;
>
> private String bookName;
>
> private String authorName;
>
> public Book( String bookName, String authorName, int price ) {
>
> this.bookName = bookName;
>
> this.authorName = authorName;
>
> this.price = price;
>
> }
>
> @Override
>
> public boolean equals(Object o) {
>
> if( this == o ) return true;
>
> if( o == null || getClass() != o.getClass() ) return false;
>
> Book that = (Book) o;
>
> return bookName.equals(that.bookName) &&
> authorName.equals(that.authorName);
>
> }
>
> @Override
>
> public int hashCode() {
>
> return Objects.hash(bookName,authorName);
>
> }
>
> }
>
> For the above class we need to compare books by using book name and its
> author name only. We don't want to include price while comparing books but
> we can't even store that information anywhere else.
> So if I have two objects as follows :
>
> Book book_1 = new Book("Book_1","ABC",100);
> Book book_2 = new Book("Book_1","ABC",200);
>
> For above objects, if I use book_1 object as my cache key and put some
> value against it into cache, I am not able to retrieve that value using my
> another object book_2 as ignite is not honoring equals method provided on
> Book class.
>
> We have tried implementing Externalizable interface and also by providing
> custom implementation of BinaryIdentityResolver interface. Still we are not
> getting desired output.
>
>
> Note : This is a sample class which we have used to describe a problem, in
> reality we are using other classes and we have a valid use case where we
> don't want to use all attributes of the class while comparing them for
> equality ( in equals and hashCode method ).
>
>
> Thank you,
> Saurabh Satardekar.
>


ignite client can not reconnect to ignite Kubernetes cluster,after pod restart

2022-06-21 Thread f cad
below if client code config
KubernetesConnectionConfiguration kcfg = new
KubernetesConnectionConfiguration();

kcfg.setNamespace(igniteK8sNameSpace);kcfg.setServiceName(igniteK8sServiceName);cfg.setAddressesFinder(new
ThinClientKubernetesAddressFinder(kcfg));cfg.setRetryPolicy(new
ClientRetryAllPolicy());


after ignite pod restart

client throw Exceptionorg.apache.ignite.client.ClientConnectionException:
Connection timed out
at 
org.apache.ignite.internal.client.thin.io.gridnioserver.GridNioClientConnectionMultiplexer.open(GridNioClientConnectionMultiplexer.java:144)
at 
org.apache.ignite.internal.client.thin.TcpClientChannel.(TcpClientChannel.java:178)
at 
org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.getOrCreateChannel(ReliableChannel.java:917)
at 
org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.getOrCreateChannel(ReliableChannel.java:898)
at 
org.apache.ignite.internal.client.thin.ReliableChannel$ClientChannelHolder.access$200(ReliableChannel.java:847)
at 
org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:759)
at 
org.apache.ignite.internal.client.thin.ReliableChannel.applyOnDefaultChannel(ReliableChannel.java:731)
at 
org.apache.ignite.internal.client.thin.ReliableChannel.service(ReliableChannel.java:167)
at 
org.apache.ignite.internal.client.thin.ReliableChannel.request(ReliableChannel.java:288)
at 
org.apache.ignite.internal.client.thin.TcpIgniteClient.getOrCreateCache(TcpIgniteClient.java:185)

and i use retry to reconnect and print
clientConfiguration.getAddressesFinder().getAddresses() and it address is
pod address,but client not reconnect

while (retryTimeTmp < retryTimes) {
  try {
return igniteClient.getOrCreateCache(new
ClientCacheConfiguration()
.setName(cacheName)
.setAtomicityMode(TRANSACTIONAL)
.setCacheMode(PARTITIONED)
.setBackups(2)
.setWriteSynchronizationMode(PRIMARY_SYNC));
 }catch (Exception e) {
LOGGER.error("get cache [{}] not success", cacheName, e);
LOGGER.error("get address info [{}], ipfinder [{}]",
clientConfiguration.getAddresses(),
clientConfiguration.getAddressesFinder().getAddresses());

retrySleep();
} finally {
retryTimeTmp++;
}


restful api get not work,but scan can work

2022-05-19 Thread f cad
Hi,I am new to ignite
I have a question.
anybody kown why restful api scan has data
http://127.0.0.1:8080/ignite?cmd=qryscanexe=5=vest_contact_1
result
{
"successStatus": 0,
"error": null,
"sessionToken": null,
"response": {
"items": [
{
"key": {
"id": 703896957108224
},
"value": {
"mergedId": null,
"priority": 0,
"identities": [
{
"id": "7",
"type": "idCard",
"dateCreated": 1652932875433,
"lastUpdated": 1652932875433
}
],
"followerIds": [],
"contactType": "LEADER",
"dateCreated": 1652932875433,
"lastUpdated": 1652932875433
}
}
],
"last": true,
"queryId": 2,
"fieldsMetadata": [
{
"schemaName": null,
"typeName": null,
"fieldName": "key",
"fieldTypeName": null
},
{
"schemaName": null,
"typeName": null,
"fieldName": "value",
"fieldTypeName": null
}
]
}
}but get command no result
http://127.0.0.1:8080/ignite?cacheName=vest_contact_1=get=io.naza.vest.domain.contact.ContactKey={
"id":703896957108224}result
{
"successStatus": 0,
"affinityNodeId": "ee5e4d0d-5c91-4b9d-b68f-5dfac2f45908",
"error": null,
"sessionToken": null,
"response": null
}