Re: Problems with Apache Ignite and PHP PDO

2020-09-08 Thread manueltg89
Ok, I will be careful to this bug,  thank you very much!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Problems with Apache Ignite and PHP PDO

2020-09-04 Thread manueltg89
Hi Igor!

My Apache Ignite version is 2.8.1 and the PHP version is 7.3.21. I've
attached the PHP code.

Thanks! apache-ignite-pdo-code.txt

  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Problems with Apache Ignite and PHP PDO

2020-09-03 Thread manueltg89
Hi!
I have problems with my Apache Ignite app, the problem is the next:

I have a field price with decimal precision, when I update from my PHP APP
with PDO and bindParam function, Apache Ignite store other value, It 
doesn't happen always, only with any values, for example with: 1.85 or 1.86
... Apache Ignite store -0.57, -0.58 etc, but It doesn't happen for example
with 2.85.

I've checked with: 
$res->bindParam(':price', $price,PDO::PARAM_STR); and 
$res->bindParam(':price', $price); 
with same results.

If I update with raw SQL without bindParam It works perfectly. 

Any suggestion?

Thnaks un advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Select clause is quite more slow than same Select on MySQL

2020-08-27 Thread manueltg89
Hi Mike, thanks for information. I will try that.

Thanks.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Select clause is quite more slow than same Select on MySQL

2020-08-27 Thread manueltg89
Hi!, 

I have a table with 4 millions of registers, with only 1 node in Apache
Ignite. I make a simple query to get all registers:

select * from items;

I make the query in Apache Ignite and this takes 83 seconds and same query
in MySQL takes 33 seconds.

Is it normal?

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Log file not found with Ignite 2.8.1

2020-07-30 Thread manueltg89
Hi all!

I have a Ignite app with version 2.8.1, I've followed this steps
https://apacheignite.readme.io/docs/logging for Log4j, but my app is not
created the log file. I attach my log4j.xml file.

Any suggestion?
Thanks in advance. log4j.xml
  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: WriteBehind enabled problem FK constraint

2020-06-29 Thread manueltg89
Hello!

With writeBehind enabled I get many more errors that with writeBehind
disabled. What write state do you recommended with writes to external
database?

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Non Distributed Join between tables

2020-06-27 Thread manueltg89
Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


WriteBehind enabled problem FK constraint

2020-06-27 Thread manueltg89
Hello.

In my app I have writeBehind to true, when I start to write in my Apache
Ignite instance sometimes throw an error with FK, is there anyway to
maintain order with writes to external database?

Thanks.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Non Distributed Join between tables

2020-06-25 Thread manueltg89
With the following structure, and partitioned cache in the three tables:

tbl_a  tbl_b   tbl_c
---   -
 aff_a aff_b

When I make: select * from tbl_a INNER JOIN tbl_b ON tbl_b.id = tbl_a.fk_id
INNER JOIN tbl_c.fk_id = tbl_b.id 

Should it work and return results always?

The question is: If tbl_c is collocated with tbl_b and tbl_b is collocated
with tbl_a, should it be collocated tbl_a with tbl_c?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Problem with writeBehind Apache Ignite 2.8.1

2020-06-19 Thread manueltg89
Ok, I will be aware to the new changes.

Thank you very much!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Non Distributed Join between tables

2020-06-19 Thread manueltg89
I attach required file SQL.  dbaffinity.sql
  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Problem with writeBehind Apache Ignite 2.8.1

2020-06-19 Thread manueltg89
You need to have MySQL Server with schema "bugdb.sql" imported, config your
mysql database in "secret.properties", run "ServerNodeCodeStartup" and
execute PHP file with inserts to Apache Ignite. 

Sorry, there was a problem to attach PHP file. I've attached also PHP file
now.

bug.php   
 





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Problem with writeBehind Apache Ignite 2.8.1

2020-06-19 Thread manueltg89
Hi. I attach example project. I explain a bit more. Details:

- MySQL Server with max connections form example: 151
- Insert with PHP PDO from PHP 7.2: 



It seems that Apache Ignite with writeBehind enabled open one connection by
insert and keeps open every connection over time, this  bug-project.rar
  
that MySQL Server throws "Too many connections" error.

In attached file you have "bugdb.sql" file with database schema for MySQL.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Problem with writeBehind Apache Ignite 2.8.1

2020-06-17 Thread manueltg89
Hello, I use Apache Ignite with MariaDB (RDBMS Integration), all works
properly except "writeBehind", if I activate "writeBehind" and I insert for
example 200 instances with PHP PDO I receive a exception on console of
Ignite, the exception is the following: 

jun 17, 2020 4:03:45 PM org.apache.ignite.logger.java.JavaLogger error
GRAVE: Failed to execute SQL query [reqId=0, req=OdbcQueryExecuteRequest
[schema=PUBLIC, sqlQry=INSERT INTO scrapy_brand(id, name, keyname) VALUES
(brandId(), ?, ?), autoCommit=true, timeout=0, args=Object[] [manuela4939,
manuela4939]]]
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed
to execute DML statement [stmt=INSERT INTO scrapy_brand(id, name, keyname)
VALUES (brandId(), ?, ?), params=[manuela4939, manuela4939]]
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeDml(IgniteH2Indexing.java:1247)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1144)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$3.applyx(GridQueryProcessor.java:2406)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$3.applyx(GridQueryProcessor.java:2402)
at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2919)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$1(GridQueryProcessor.java:2422)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2460)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2396)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2323)
at
org.apache.ignite.internal.processors.odbc.odbc.OdbcRequestHandler.executeQuery(OdbcRequestHandler.java:403)
at
org.apache.ignite.internal.processors.odbc.odbc.OdbcRequestHandler.doHandle(OdbcRequestHandler.java:233)
at
org.apache.ignite.internal.processors.odbc.odbc.OdbcRequestHandler.handle(OdbcRequestHandler.java:196)
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:195)
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:49)
at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: class
org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException:
Transaction has been rolled back:
a186692c271--0c27-0020--0001
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.syncOp(GridCacheAdapter.java:4365)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.put0(GridCacheAdapter.java:2599)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.put(GridCacheAdapter.java:2580)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.putIfAbsent(GridCacheAdapter.java:3007)
at
org.apache.ignite.internal.processors.query.h2.dml.DmlUtils.dmlDoInsert(DmlUtils.java:197)
at
org.apache.ignite.internal.processors.query.h2.dml.DmlUtils.processSelectResult(DmlUtils.java:168)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeUpdateNonTransactional(IgniteH2Indexing.java:2920)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeUpdate(IgniteH2Indexing.java:2774)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeUpdateDistributed(IgniteH2Indexing.java:2704)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeDml(IgniteH2Indexing.java:1218)
... 22 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to load
object [table=scrapybd.scrapy_brand, key=12689]
at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.loadFromStore(GridCacheStoreManagerAdapter.java:335)
at

Re: Non Distributed Join between tables

2020-06-12 Thread manueltg89
I'm going to explain a bit more. I use Apache Ignite as front cache to my
RDBMS, I've done automatic RDBMS integration. Table A, Table B, Table C is 
a example simplified for my real schema. My schema is much more complex. 

I answer the questions:

1. True.

2. True

3. I use thin client with sql queries and DISTRIBUTED_JOINS=false.

I want to know if tbl_a <- tbl_b <- tbl_c, if I have collocated table_a with
table_b and table_b with table_c, then, 
Could I make a query with three tables?

I understand that it is necessary to put affinity key from table_c to
table_a, so table_b and table_c have same affinity key. It is unique
solution
or put table_a as replicated and only table_c with affinity key to table_b.
It is true?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Non Distributed Join between tables

2020-06-11 Thread manueltg89
Yes, table c is child of table b. But, It is redundant in my RDBMS, Would
have other solution whitout changing my schema?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Non Distributed Join between tables

2020-06-11 Thread manueltg89
Sorry Ilya, in my first post had an error. My structure is the following:

tbl_a  tbl_b   tbl_c
---   -
 aff_a aff_b

When I make: select * from tbl_a INNER JOIN tbl_b ON tbl_b.id = tbl_a.fk_id
INNER JOIN tbl_c.fk_id = tbl_b.id -> Return empty results.

Could I to have three partitioned caches here? 

Is there any way to make this with join collocated and whitout replicated
cache?

Thanks un advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Non Distributed Join between tables

2020-06-10 Thread manueltg89
I had to set baseline topology to all nodes. Now this works perfectly,
thanks.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Non Distributed Join between tables

2020-06-08 Thread manueltg89
Hello Ilya!,

Thanks for your response. I've created a new project and seems that now It
works correctly, I must have a problem. But I have another doubt with
REPLICATED cache. I think that all nodes must have same data in this mode,
Is It true?, with online tool of Apache Ignite I make a query to selected
node (I have two nodes), in node1 works perfectly but in node2 returns empty
results. Should It return the same results?

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Non Distributed Join between tables

2020-06-08 Thread manueltg89
I have three tables in Apache Ignite, each table has a affinity key to other
table, when I make a join between tables with direct relations this works
perfectly, but if I make a non distributed join between three tables this
return empty, is normal this behaviour?, Could I make in another way?

tbl_a  tbl_b   tbl_c
-  --   -
aff_baff_b

When I make: select * from tbl_a INNER JOIN tbl_b ON tbl_a.id = tbl_a.fk_id
= tbl_b.id -> All OK

When I make: select * from tbl_a INNER JOIN tbl_b ON tbl_a.id = tbl_a.fk_id
= tbl_b.id INNER JOIN tbl_c.fk_id = tbl_b.id -> Return empty results.

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Slow query from PHP PDO with auhentication enabled

2020-05-29 Thread manueltg89
But This problem increases when we've authentication enabled.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Slow query from PHP PDO with auhentication enabled

2020-05-29 Thread manueltg89
As I've said in my previous message the problem is to open connection with
cluster, when I've enabled authentication on cluster this process is more
slow than when I've disabled authentication. After to open connection the
queries take much o less the same time, but, Is normal that to open
connection takes much longer time with enabled authentication?

PD: I've tested with PHP THIN CLIENT and It has the same problem.

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Slow query from PHP PDO with auhentication enabled

2020-05-28 Thread manueltg89
I've attached a example project with the problem.

Thanks in advance. ImportedCluster3-project.rar

  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Slow query from PHP PDO with auhentication enabled

2020-05-28 Thread manueltg89
I've reviewed again and the problem is to open connection with the cluster,
when the auth is enabled it is more slow than if is disabled.

Execute time to Open Connection with MySQL 0.011513948440552 seconds

Execute time to Open Connection with Apache Ignite (with auth enabled)
0.069784879684448 seconds
Execute time to Open Connection with Apache Ignite (with auth disabled)
0.0042431354522705 seconds

*Environment: Windows 10 x64
Apache Ignite: 2.8.0
PHP Version: PHP 7.0
PHP PDO*

Too much difference or not?

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Slow query from PHP with auhentication enabled

2020-05-28 Thread manueltg89
I have a problem with authentication enabled flag, when I active this my
queries are slower than if authentication is disabled, Is it normal?. 

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Change schema on runtime Apache Ignite

2020-05-28 Thread manueltg89
Ok, thanks.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Change schema on runtime Apache Ignite

2020-05-27 Thread manueltg89
Thanks for your response. I update my RDBMS manually also, but the problem is
if for example I added a field called "telephone" Apache Ignite with
write-through activated is not capable of write this field on RDBMS, How I
can do this whitout rebooting?

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Change schema on runtime Apache Ignite

2020-05-23 Thread manueltg89
I want to be able to change schema on runtime to my Apache Ignite app
wiithout restarting it. I've read that for this I need to use BinaryObject
on my store, but when I configure my cache store factory with "JDBC BLOB
store factory" load cache is not working, the process finished correctly but
no data on my cache. I am using "Automatic RDBMS Integration" and with "JDBC
POJO store factory" this works perfectly. I've seen this issue on JIRA 
https://issues.apache.org/jira/browse/IGNITE-12078
   Is there another way
to do this?Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/