You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "hungphan227 (via GitHub)" <gi...@apache.org> on 2023/12/26 13:52:45 UTC
[PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
hungphan227 opened a new pull request, #1882:
URL: https://github.com/apache/james-project/pull/1882
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1869938807
caught it,
`PostgresBlobStoreDAO` using default `postgresExecutor` (single `Connection`) -> We can not insert parallel blob data with a "single" connection.
**First my idea:**
- Using a "pool" connection to replace a "single" connection. I tried to pool with size = 50, It takes ~ 30 sec to complete. (at least it is faster than a few minutes)
(Note that: the Cassandra test needs 10 sec, and S3 needs 3 sec to complete)
**Second idea:**
- I'm thinking of chunk upload or optimizing somewhere in the Postgresql configuration. (Not sure it is possible, need to research)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1874939116
> I want you @vttranlina to create a ticket on connection pooling first ;-)
yes, ticket for it https://github.com/linagora/james-project/issues/5020
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1870032202
> Any chance Postgres locks the whole table while inserting the blob then?
For sure, I tried to remove the Index for the blob_storage table,
But the result is not different (still takes 5 minutes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1874932324
I want you @vttranlina to create a ticket on connection pooling first ;-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1870102970
I created a new pr (continue on it) https://github.com/apache/james-project/pull/1883
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "hungphan227 (via GitHub)" <gi...@apache.org>.
hungphan227 commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1869566599
```
@ParameterizedTest(name = "[{index}] {0}")
@MethodSource("blobs")
default void concurrentSaveInputStreamShouldReturnConsistentValues(String description, byte[] bytes) throws ExecutionException, InterruptedException {
Mono.from(testee().save(TEST_BUCKET_NAME, TEST_BLOB_ID, bytes)).block();
ConcurrentTestRunner.builder()
.randomlyDistributedReactorOperations(
(threadNumber, step) -> testee().save(TEST_BUCKET_NAME, TEST_BLOB_ID, new ByteArrayInputStream(bytes)),
(threadNumber, step) -> checkConcurrentSaveOperation(bytes)
)
.threadCount(10)
.operationCount(20)
.runSuccessfullyWithin(Duration.ofMinutes(2));
}
```
this test failed because it took PostgresBlobStoreDAO 5 mins to complete. Is this acceptable?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "quantranhong1999 (via GitHub)" <gi...@apache.org>.
quantranhong1999 commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1869949677
> I tried it first, but no different
Any chance Postgres locks the whole table while inserting the blob then? Otherwise, maybe it is actually the Postgres connection limit: only allow uploading 1 blob once.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1874919505
we can close it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1869948549
> FYI, by default (in that test), Cassandra just uses 1 connection to 1 node:
I remember @chibenwa said that Cassandra, 1 connection, but "pool/ multi/ parallel" inside.
> Maybe we can try to insert different BlobId(s).
I tried it first, but no different
> I do not think we override the same blobId in the real world BTW.
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael closed pull request #1882: JAMES-2586 Implement PostgresBlobStoreDAO
URL: https://github.com/apache/james-project/pull/1882
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "quantranhong1999 (via GitHub)" <gi...@apache.org>.
quantranhong1999 commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1869947329
FYI, by default (in that test), Cassandra just uses 1 connection to 1 node:
https://docs.datastax.com/en/developer/java-driver/4.10/manual/core/pooling/#configuration
Any chance Postgres locks the row during the insert? I see that the concurrent test trying the insert the blob to the same primary key `TEST_BUCKET_NAME + TEST_BLOB_ID`.
Maybe we can try to insert different BlobId(s).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1869985985
Pooling connections is a good idea anyway.
Something like 1 core -> one connection would seem like a good design to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] JAMES-2586 Implement PostgresBlobStoreDAO [james-project]
Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on PR #1882:
URL: https://github.com/apache/james-project/pull/1882#issuecomment-1869877592
> this test (in ReadSaveBlobStoreDAOContract) failed because it took PostgresBlobStoreDAO 5 mins to complete. Is this acceptable?
It looks un-normal, the "BIG" blob has 12MB, I don't think it takes 5 minutes for that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org