Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO_MERGE] For CI test - update postgresql branch to the latest master #2467

Closed
wants to merge 334 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
334 commits
Select commit Hold shift + click to select a range
ee4257c
JAMES-2586 Remove unused method in MessageManager
chibenwa Dec 5, 2023
edae72e
JAMES-2586 Enable UniqueID support for PostgresMailboxManager
chibenwa Dec 5, 2023
e538c9e
JAMES-2586 Enable PostgresMailboxManager annotation tests
chibenwa Dec 5, 2023
91f8783
JAMES-2586 Fully drop JPA within mailbox-postgresql
chibenwa Dec 6, 2023
433ebbb
JAMES-2586 [PGSQL] Implement correctly FetchType
vttranlina Dec 4, 2023
1dfa7a7
JAMES-2586 [PGSQL] Optimize getMailboxCounter method
vttranlina Dec 4, 2023
fc43388
JAMES-2586 [PGSQL] Improve PostresMessageManager::getMetadata method
vttranlina Dec 4, 2023
06fc808
JAMES-2586 Fix missing guice binding for Postgres quota module
vttranlina Dec 5, 2023
cc4e16c
JAMES-2586 Fixup - Postgres app - Use junit 5 (replace to junit 4)
vttranlina Dec 5, 2023
834545e
JAMES-2586 Postgres app – Remove server test for authentication datab…
vttranlina Dec 5, 2023
fb7b14b
JAMES-2586 Rename JPAAttachmentContentLoader to PostgresAttachmentCon…
Arsnael Dec 7, 2023
99c3052
JAMES-2586 Add a unit test for recreate RLS column should not fail
quantranhong1999 Dec 7, 2023
bc2e6b1
JAMES-2586 PostgresExecutor: better recognize prepared statement conf…
quantranhong1999 Dec 7, 2023
c612d17
JAMES-2586 PostgresTableManager - Check the existence of RLS column/p…
vttranlina Dec 11, 2023
8b86e71
JAMES-2586 PostgresTableManager - Cleanup
vttranlina Dec 11, 2023
7250a15
JAMES-2586 PostgresRecipientRewriteTableDAO and PostgresRecipientRewr…
Dec 7, 2023
eb4dbc7
JAMES-2586 Fixup compile error after merge master
vttranlina Dec 11, 2023
78de5fb
JAMES-2586 PostgresDelegationStore (#1851)
hungphan227 Dec 13, 2023
adb8bd8
JAMES-2586 Remove JPAHealthCheck.java
chibenwa Dec 12, 2023
f60b487
JAMES-2586 Implement PostgresMailRepositoryUrlStore
chibenwa Dec 12, 2023
586fdaa
JAMES-2586 Remove JPAMailRepositoryUrlStore.java
chibenwa Dec 12, 2023
deba6c5
JAMES-2586 Implement and bind PostgresHealthCheck
chibenwa Dec 12, 2023
4433366
JAMES-3967 Store mails when relay is exceeded
chibenwa Dec 15, 2023
e597fc4
JAMES-2586 ADR for Posgres mailbox tables structure (#1857)
hungphan227 Dec 18, 2023
eb802aa
JAMES-2586 Implement PostgresSieveScriptDAO + PostgresSieveRepository
quantranhong1999 Dec 11, 2023
e69b3fe
JAMES-2586 Delete JPASieveScript.java
chibenwa Dec 12, 2023
5bc7da9
JAMES-2586 Guice binding for PostgresSieveScriptDAO
quantranhong1999 Dec 12, 2023
8fad588
JAMES-2586 Implement PostgresMailRepository
chibenwa Dec 14, 2023
3565bca
JAMES-2586 Guice binding for PostgresMailRepository + remove related …
quantranhong1999 Dec 18, 2023
b0aee61
JAMES-2586 Documentation for PostgresMailRepository
quantranhong1999 Dec 18, 2023
ceb719d
JAMES-2586 Updating postgres-app default configuration to PostgresMai…
quantranhong1999 Dec 18, 2023
de6dc5b
JAMES-2586 Finally remove the rest of JPA in postgres-app
quantranhong1999 Dec 18, 2023
3aa11df
JAMES-2586 Add an `addAdditionalAlterQueries` option when declaring P…
quantranhong1999 Dec 14, 2023
319e540
JAMES-2586 Fix compilation errors
quantranhong1999 Dec 19, 2023
e561f9e
JAMES-2586 Fix repositoryPath in postgres-app mailetcontainer.xml
quantranhong1999 Dec 19, 2023
6caadcf
JAMES-2586 add missing RLS tests
Dec 18, 2023
1c2f435
JAMES-2586 Add an Id for SieveScript (#1863)
chibenwa Dec 19, 2023
cc786b5
JAMES-2586 Fix [PGSQL] Concurrency control for flags updates (#1858)
vttranlina Dec 20, 2023
28b72b9
[PGSQL] ADR on PGSQL flags update concurrency control mechanism (#1867)
vttranlina Dec 20, 2023
e0d0dd4
JAMES-2586 Add search module chooser for Postgres app
Arsnael Dec 19, 2023
76eaa16
JAMES-2586 Add docker compose distributed with OpenSearch for postgre…
Arsnael Dec 20, 2023
e14e2de
JAMES-2586 Rework README for Postgres-app and rework the docker compo…
Arsnael Dec 20, 2023
1b2279b
JAMES-2586 Module chooser: S3, file blobStore
quantranhong1999 Dec 20, 2023
5aabd87
JAMES-2586 Message body deduplication (#1873)
quantranhong1999 Dec 21, 2023
1868cde
JAMES-2586 Remove james-server-cassandra-app direct dependency (#1875)
chibenwa Dec 22, 2023
82109a6
JAMES-2586 Implement AllSearchOverride for Postgresql
Arsnael Dec 21, 2023
e4b3766
JAMES-2586 Implement DeletedSearchOverride for Postgresql
Arsnael Dec 22, 2023
7fcc9f4
JAMES-2586 Implement DeletedWithRangeSearchOverride for Postgresql
Arsnael Dec 22, 2023
d3e5b8a
JAMES-2586 Implement NotDeletedWithRangeSearchOverride for Postgresql
Arsnael Dec 22, 2023
b7e9970
JAMES-2586 Implement UidSearchOverride for Postgresql
Arsnael Dec 22, 2023
d3e3500
JAMES-2586 Implement UnseenSearchOverrideTest for Postgresql
Arsnael Dec 22, 2023
e7b60bc
JAMES-2586 Correct search overrides documentation in opensearch.prope…
Arsnael Dec 22, 2023
c134f93
JAMES-2586 Refactor search overrides tests for postgresql
Arsnael Dec 22, 2023
54b3391
JAMES-2586 Unnecessary join on deleted uid search queries in postgresql
Arsnael Dec 22, 2023
458aa48
JAMES-2586 Moving RabbitMQExtension from distributed-app to queue-rab…
vttranlina Dec 25, 2023
b53a30b
JAMES-2586 Plug RabbitMQ EventBus into Postgres-app
vttranlina Dec 21, 2023
0c6ca33
JAMES-2586 Implement DeleteMessageListener for postgres (#1869)
hungphan227 Dec 25, 2023
e5fb0e9
JAMES-2586 Fixup search overrides - Using Postgres Factory Executor r…
vttranlina Dec 26, 2023
a11913b
JAMES-2586 Implement PostgresEventDeadLetters
quantranhong1999 Dec 25, 2023
e2a2740
JAMES-2586 Fix flaky test DistributedPostgresJamesServerTest.guiceSer…
quantranhong1999 Dec 25, 2023
1052fa3
JAMES-2586 Add missing license
quantranhong1999 Dec 26, 2023
1153279
JAMES-2586 Add a health check integration test
quantranhong1999 Dec 28, 2023
4ea1d6d
JAMES-2586 Implement PostgresBlobStoreDAO
Dec 26, 2023
c00b181
JAMES-2586 Disable concurrent test of PostgresBlobStoreDAO
vttranlina Jan 3, 2024
46b4282
JAMES-2586 [PGSQL] Guice binding Postgres BlobStore & Adapt to BlobSt…
vttranlina Dec 27, 2023
f2f4626
JAMES-2586 Adopt Postgres 16.1 (#1897)
chibenwa Jan 5, 2024
449868d
JAMES-2586 Bump jOOQ to 3.16.23
quantranhong1999 Jan 6, 2024
9ef9931
JAMES-2586 Bump r2dbc-postgresql to 1.0.3.RELEASE
quantranhong1999 Jan 6, 2024
99f82e4
JAMES-2586 - Update test cases for Delete message listener - when ena…
vttranlina Jan 5, 2024
fa545b4
JAMES-2586 - Fix BUG - DeleteMessageListener - not work correctly whe…
vttranlina Jan 5, 2024
28d5328
Guice InitializationOperation support priority when init module
vttranlina Jan 3, 2024
b91eab5
JAMES-2586 Refactor the way initPostgres of PostgresTableManager
vttranlina Jan 3, 2024
2856219
JAMES-2586 Implement PostgresDeletedMessageMetadataVault
quantranhong1999 Jan 2, 2024
e5d4477
JAMES-2586 Guice binding + module chooser + sample config for Postgre…
quantranhong1999 Jan 2, 2024
21ece74
JAMES-2586 Plug DeletedMessageVaultDeletionCallback into DeleteMessag…
quantranhong1999 Jan 8, 2024
b2c09da
JAMES-2586 PostgresDeletedMessageVaultIntegrationTest
quantranhong1999 Jan 8, 2024
b519e91
JAMES-2586 Plug PreDeletionHooks
quantranhong1999 Jan 8, 2024
7a37a16
JAMES-2586 - Set blobStorage implementation is postgres by default
vttranlina Jan 9, 2024
11078dc
JAMES-2586 Implement BlobReferenceSource(s) for postgres-app
Jan 4, 2024
229299b
JAMES-2586 add mailbox para for generateMessageUid method in MapperPr…
Jan 12, 2024
8772db7
JAMES-2586 Implement PostgresMessageIdMapper
Jan 12, 2024
4cbf01a
JAMES-2586 Introduce data-jmap-postgres module
quantranhong1999 Jan 15, 2024
331634d
JAMES-2586 DeleteMessageListener: better concurrency control upon mai…
quantranhong1999 Jan 15, 2024
07a50c8
JAMES-2586 Jenkinsfile: run tests for `server/data/data-jmap-postgres…
quantranhong1999 Jan 15, 2024
72a6c9a
JAMES-2586 - CLEAN CODE - Guice binding for Postgres User Repository…
vttranlina Jan 12, 2024
6260f19
JAMES-2586 Implement PostgresMessageFastViewProjection
quantranhong1999 Jan 16, 2024
de7073b
JAMES-2586 Moving Managers out of the mail package
Arsnael Jan 17, 2024
43c9026
JAMES-2586 Wire StoreMessageIdManager on top of the PostgresMessageId…
Arsnael Jan 17, 2024
707e79a
JAMES-2586 Little refactoring around DeleteMessageListener binding in…
Arsnael Jan 18, 2024
6cef5f3
JAMES-2586 JMAP Guice bindings modules to pg-app
Jan 16, 2024
b90323d
fixup! JAMES-2586 JMAP Guice bindings modules to pg-app
Jan 16, 2024
a9d5873
fixup! JAMES-2586 JMAP Guice bindings modules to pg-app
Jan 16, 2024
cf6155f
JAMES-2586 Implement PostgresAttachmentMapper, DAO and binding
vttranlina Jan 16, 2024
ad089e3
JAMES-2586 Implement Postgres Attachment Blob reference source
vttranlina Jan 18, 2024
0cb80fb
JAMES-2586 - Delete attachment in DeleteMessageListener
vttranlina Jan 18, 2024
1222024
JAMES-2586 Webadmin integration tests for postgres
Jan 19, 2024
0f14fa9
JAMES-2586 Implement PostgresEmailChangeRepository
Jan 17, 2024
3244ce0
JAMES-2586 - Delete Message Listener - add test case when delete mail…
vttranlina Jan 22, 2024
4f6569c
JAMES-2586 - Fixbug - Delete Message Listener - Fix hanging issue
vttranlina Jan 22, 2024
c3472e9
JAMES-2586 - Fixbug hanging issue when Jooq execute delete and return…
vttranlina Jan 22, 2024
b6640e6
JAMES-2586 Implement PostgresEmailChangeRepository - Fixup Guice binding
vttranlina Jan 23, 2024
aac061e
JAMES-2586 Implement Postgres upload repository
vttranlina Jan 24, 2024
f9f0d92
JAMES-2586 Implement Postgres upload usage repository
vttranlina Jan 24, 2024
23959c1
JAMES-2586 Guice binding for Postgres upload
vttranlina Jan 24, 2024
8aeaa00
JAMES-2586: The UploadRepositoryCleanupTask should rely on the Upload…
vttranlina Jan 24, 2024
e8368ef
JAMES-2586: Guice binding JmapUploadCleanupModule for Postgres webadmin
vttranlina Jan 24, 2024
3262507
JAMES-2586 Disable row-level security by default in postgres.properties
vttranlina Jan 29, 2024
01c0aeb
JAMES-2586 Implement Postgres Push subscription
vttranlina Jan 26, 2024
cf94e40
JAMES-2586 Introduce sql script to clean up PGSL data
vttranlina Jan 29, 2024
c1ba449
JAMES-2586 Implement PostgresThreadIdGuessingAlgorithm (#1941)
hungphan227 Jan 31, 2024
7f67236
JAMES-2586 Implement PostgresMailboxChangeRepository
quantranhong1999 Jan 24, 2024
bcfb97c
JAMES-2586 Guice binding PostgresMailboxChangeRepository
quantranhong1999 Jan 25, 2024
2b82392
JAMES-2586 Implement PostgresFilteringProjection
Feb 1, 2024
86ec6f0
JAMES-2586 Implement PostgresCustomIdentityDAO
Jan 29, 2024
9df1f97
JAMES-2586 Handle case when Postgres index/constraint already exists
vttranlina Feb 6, 2024
97efc69
JAMES-2586 More flexible on comparing Vacation's ZonedDateTime
quantranhong1999 Feb 5, 2024
c13bd48
JAMES-2586 Implement PostgresVacationRepository
quantranhong1999 Feb 5, 2024
3e874a5
JAMES-2586 Guice binding PostgresVacationRepository
quantranhong1999 Feb 5, 2024
455414a
JAMES-2586 Improve PostgresVacationRepository
quantranhong1999 Feb 6, 2024
9605940
JAMES-2586 Temporarily disable a flaky PostgresUploadService test
quantranhong1999 Feb 6, 2024
3942699
JAMES-2586 Optimize query increase/decrease for Quota Current Value
vttranlina Feb 7, 2024
edb1022
JAMES-2586 Add Index for Postgres Mailbox table
vttranlina Feb 7, 2024
7a07632
JAMES-2586 Implement PostgresNotificationRegistry
quantranhong1999 Feb 7, 2024
c7eb23b
JAMES-2586 SQL script to clean outdated vacation notifications
quantranhong1999 Feb 7, 2024
2c7e33d
JAMES-2586 Guice binding for PostgresNotificationRegistry
quantranhong1999 Feb 7, 2024
fbbd8bd
JAMES-2586 Fix contract test NotificationRegistryContract::registerSh…
quantranhong1999 Feb 7, 2024
f82756b
JAMES-2586 [Documentation] Using pg_stat_statements extension for tra…
vttranlina Feb 16, 2024
c6a5ca0
JAMES-2586 Avoid Using COUNT() in SQL When You Could Use EXISTS()
vttranlina Feb 18, 2024
2047b69
JAMES-2586 Implement PostgresEventStore
Feb 7, 2024
2d5bda4
JAMES-2586 Implement PostgresEmailQueryView (#2007)
hungphan227 Feb 21, 2024
49660cb
JAMES-2586 - Postgres push subscription - expires value should be sto…
vttranlina Feb 29, 2024
c0adff1
JAMES-2586 Integration tests for JMAP postgres
Feb 20, 2024
5bdaa27
JAMES-2586 Disable some tests in Integration tests JMAP postgres
Feb 21, 2024
d596712
JAMES-2586 Fix PostgresAuthenticationTest
Mar 1, 2024
4fe3666
JAMES 2586 PostgresPushSubscriptionRepository: rely on Postgres uniqu…
quantranhong1999 Mar 10, 2024
c68167b
JAMES-2586 [Postgres] FIXUP when query with IN - should pre-check col…
vttranlina Mar 11, 2024
d0cb353
[Build] Use tmpfs for Postgres db test container
Arsnael Mar 7, 2024
eece20e
JAMES-2586 Fix PostgresPushSubscriptionSetMethodTest, PostgresThreadG…
Feb 25, 2024
bb627ed
JAMES-2586 Replace drop by truncate in PostgresMessageFastViewProjection
Mar 11, 2024
e4d595a
JAMES 2586 Increase timeout to 1 hour for postgres-jmap-integration-t…
quantranhong1999 Mar 14, 2024
17f5e00
JAMES 2586 Try forkCount=2 to see if the tests are faster
quantranhong1999 Mar 14, 2024
12cc9ed
Add sslMode to require in PostgresqlConnectionConfiguration (#2109)
Arsnael Mar 15, 2024
af2f23f
JAMES-2586 Reduce repeat count for some JMAP integration tests
quantranhong1999 Mar 14, 2024
4ef4e93
JAMES-2586 Add PostgresAttachmentMapper to PostgresMessageIdMapper
Mar 14, 2024
586345d
JAMES-2586 Bind PostgresMessageFastViewProjection
Mar 14, 2024
dc8940e
JAMES-2586 Optimize AttachmentLoader
vttranlina Mar 6, 2024
93cbcee
JAMES-2586 Fix PostgresEmailGetMethodTest
Mar 14, 2024
82b8dde
JAMES-2586 Fix PostgresEmailQueryMethodTest
Mar 14, 2024
034540b
JAMES-2586 Fix PostgresMailboxSetMethodTest
Mar 14, 2024
efc2c70
JAMES-2586 remove redundant import in PostgresPushSubscriptionSetMeth…
Mar 14, 2024
e07d61b
JAMES-2586 Remove opensearch in PostgresWebPushTest
Mar 14, 2024
a189017
JAMES-3925 - JMAP Upload - Method delete of Upload Repository should …
vttranlina Feb 29, 2024
8be6939
JAMES-2586 - JMAP Upload - Fix unstable UploadService test
vttranlina Mar 19, 2024
33bdb62
JAMES-2586 Fix Postgres build after rebase on master
Arsnael Mar 20, 2024
b996a8e
JAMES-2586 JMAP Upload - fix precision of uploadDate field
vttranlina Mar 21, 2024
76c9437
JAMES-2586 Refactor the handle way duplicate value on constraint inde…
vttranlina Mar 19, 2024
1e49586
JAMES-2586 [REFACTORING] - PostgresTableManager - fix incorrect log
vttranlina Mar 19, 2024
6ef82dd
JAMES-2586 Avoid sorting PG messages
vttranlina Mar 18, 2024
da730df
JAMES-2586 [REFACTORING] - Extract dedicated class for retrieving Pos…
vttranlina Mar 18, 2024
45dc6e1
JAMES-2586 Fix MailboxSetMethodContract
vttranlina Mar 20, 2024
cfd6b6d
JAMES-2586 Avoid declare jooq and r2dbc-postgresql version in multipl…
quantranhong1999 Mar 21, 2024
93a0e2c
JAMES-2586 Bump jOOQ to 3.19.6
quantranhong1999 Mar 21, 2024
0cd47e8
JAMES-2586 Bump r2dbc-postgresql to 1.0.4
quantranhong1999 Mar 21, 2024
87cd019
JAMES-2586 Adapt jooq 3.19.6 change
quantranhong1999 Mar 22, 2024
994511a
JAMES-2586 Postgres RewriteTablesTest should not fail unstable test p…
quantranhong1999 Mar 22, 2024
3452731
JAMES-2586 Create AttachmentIdFactory
Mar 19, 2024
948388d
JAMES-2586 Add UuidBackedAttachmentIdFactory
Mar 21, 2024
34a0e9b
JAMES-2586 Update Guice binding Postgres (#2154)
vttranlina Mar 26, 2024
90ac337
Duplicated the QuotaDTO event and related classes from quota-mailing-…
vttranlina Mar 27, 2024
6815107
Refactor cassandra-quota-mailing: using the QuotaDTO event and relate…
vttranlina Mar 28, 2024
e492417
JAMES-2586 Postgres - Binding QuotaMailing module for postgres app Tu…
vttranlina Mar 27, 2024
c3c5008
JAMES-2586 Postgres - Guice binding EventDTO for DLP Configuration
vttranlina Mar 27, 2024
c3d430c
JAMES-2586 Postgres - Guice binding EventDTO for FilteringRuleSetDefine
vttranlina Mar 27, 2024
6ff934c
JAMES-2586 - [Revert] Optimize query increase/decrease for Quota Curr…
vttranlina Apr 1, 2024
26426ff
Revert "Provision Current Quota when MailboxAdded event"
vttranlina Apr 1, 2024
5e3c98e
JAMES-2586 Introduce module task-postgres
quantranhong1999 Mar 28, 2024
ee9d05e
JAMES-2586 Implement PostgresTaskExecutionDetailsProjection
quantranhong1999 Mar 29, 2024
f79c800
JAMES-2586 Relax TaskExecutionDetailsProjectionContract: can compare …
quantranhong1999 Mar 29, 2024
57b23af
JAMES-2586 Guice binding Distributed TaskManager for postgres-app
quantranhong1999 Mar 29, 2024
b330e0d
JAMES-2586 Disable DistributedTaskSerializationModule
quantranhong1999 Apr 1, 2024
50994c1
JAMES-2586 Add missing cleanup task webadmin routes
quantranhong1999 Apr 1, 2024
c6c81fe
JAMES-2586 Do not use ActiveMQ mail queue when distributed mode
quantranhong1999 Apr 1, 2024
200225c
JAMES-2586 Add binding for DKIMMailetModule
quantranhong1999 Apr 1, 2024
c16848d
JAMES-2586 - Postgres - Bind DistributedTaskSerializationModule into …
vttranlina Apr 2, 2024
e4f9acb
JAMES-2586 - Postgres - Binding ACLUpdated Event DTO
vttranlina Apr 3, 2024
61f5bb9
JAMES-2586 PopulateEmailQueryViewTask should not hang for postgres-ap…
quantranhong1999 Apr 9, 2024
d613f64
JAMES-2586 Fix flaky tests in EmailQueryMethodTest
Apr 5, 2024
547440e
JAMES-2586 Enable flaky tests in PostgresEmailQueryMethodTest
Apr 5, 2024
c3fe94f
JAMES-2586 Apply reactor timeout for jOOQ
quantranhong1999 Apr 5, 2024
ebf3e9f
JAMES-2586 Mitigate fix for https://github.com/jOOQ/jOOQ/issues/16556
quantranhong1999 Apr 8, 2024
bf5b2ee
JAMES-2586 Create metrics for PostgresExecutor
Apr 10, 2024
e551998
JAMES-2586 Update postgresql guice binding - adapt after rebase maste…
vttranlina Apr 16, 2024
a4c5298
JAMES-2586 [UPDATE] [PGSQL] more javax APIs migrated to jakarta
vttranlina Apr 16, 2024
e51db4d
[BUILD] Jenkinsfile - add module server/blob/blob-postgres
vttranlina Apr 15, 2024
5717190
JAMES-2586 Disable some unstable tests of PostgresBlobStoreDAOTest
vttranlina Apr 15, 2024
cf6eb0c
JAMES-2586 Implement PoolBackedPostgresConnectionFactory
Apr 8, 2024
be93e53
JAMES-2586 Update PostgresCommonModule to use PoolBackedPostgresConne…
Apr 11, 2024
4587d50
JAMES-2586 Add connection pool config to PostgresConfiguration
Apr 17, 2024
427db95
JAMES-2586 Close postgres connections when the app shutdown
Apr 26, 2024
853bec5
JAMES-2586 Fix some disabled tests in PostgresBlobStoreDAOTest by usi…
Apr 26, 2024
6c18887
JAMES-2586 Create rls-bypass instance for PoolBackedPostgresConnectio…
May 2, 2024
fad709b
JAMES-2586 Update PoolBackedPostgresConnectionFactory to avoid runnin…
May 17, 2024
1b289b6
JAMES-2586 Fix sequential issue with updating flags in the reactive p…
Arsnael May 24, 2024
3107310
JAMES-2586 Postgres app should use Java 21 base image (#2277)
quantranhong1999 Jun 6, 2024
7e082fd
JAMES-2586 - Rename class DeletedMessageVaultDeletionCallback -> Post…
vttranlina Jun 6, 2024
4902c8f
[BUILD] Increase jOOQ reactive timeout for testing (#2301)
quantranhong1999 Jun 17, 2024
55abda4
JAMES-3946 Add a DropLists postgresql backend (#2290)
Maxxx873 Jun 18, 2024
1d4546d
JAMES-2586 Clean/Refactor PostgresExtension
vttranlina Jun 10, 2024
ccf3917
JAMES-2586 Drop SinglePostgresConnectionFactory
vttranlina Jun 13, 2024
dc09e20
JAMES-2586 Drop DomainImplPostgresConnectionFactory
vttranlina Jun 13, 2024
18b9f22
JAMES-2586 Refactor JamesPostgresConnectionFactory: distinctly getCon…
vttranlina Jun 13, 2024
73ea806
JAMES-2586 Re naming "non-rls" to "by-pass-rls"
vttranlina Jun 13, 2024
0a7cc56
JAMES-2586 [UPGRADE] jooq 3.19.6 -> 3.19.9
vttranlina Jun 12, 2024
33b9102
JAMES-2586 [UPGRADE] r2dbc.postgresql.version 1.0.4.RELEASE => 1.0.5.…
vttranlina Jun 12, 2024
ced72a3
JAMES-2586 [UPGRADE] org.testcontainers:postgresql 1.19.1 -> 1.19.8
vttranlina Jun 12, 2024
0f784bf
JAMES-2586 [UPGRADE] Postgres docker image 16.1 -> 16.3
vttranlina Jun 12, 2024
aaff40d
JAMES-2586 - Update primaryKey constraint for Postgres mailbox_change…
vttranlina Jun 5, 2024
4019e39
JAMES-2586 (RLS) Optimize findNonPersonalMailboxes method in Postgres…
Jun 18, 2024
c31bb07
JAMES-2586 (NON_RLS) Optimize findNonPersonalMailboxes method in Post…
Jun 18, 2024
6c6ee9e
JAMES-2586 Refactor code after optimizing findNonPersonalMailboxes me…
Jun 20, 2024
39e0bf5
JAMES-2586 Change boolean rlsEnabled to enum RowLevelSecurity
Jun 21, 2024
d03d9ac
JAMES-2586 [PGSQL] Fix checkstyle & adapt code after rebase master
vttranlina Jun 25, 2024
4f3da25
JAMES-2586 Fix sequential issue with updating flags in the reactive p…
vttranlina Jun 25, 2024
12ef925
JAMES-2586 Fix BlobStoreConfigurationTest
vttranlina Jun 26, 2024
b528943
[ENHANCEMENT] Better reactify Identity methods - update for Postgres
vttranlina Jun 26, 2024
e4cc7d8
JAMES-2586 Fixup PostgresPushSubscriptionSetMethodTest - add ClockMQE…
vttranlina Jun 26, 2024
6042de9
Disable test: JamesWithNonCompatibleElasticSearchServerTest
vttranlina Jun 27, 2024
c1e2c48
Fixup - add missing dependencies in apache-james-mpt-smtp-cassandra-r…
vttranlina Jun 27, 2024
35d5825
[Antora] [PGSQL] Setup postgresql James server documentation section
vttranlina Jun 26, 2024
6b10399
[Antora] [PGSQL] Objectives and motivation page for postgres doc
vttranlina Jun 26, 2024
db5f276
[Antora] Make partial for server configure section & clean format
vttranlina Jul 1, 2024
0e3e344
[Antora] [PGSQL] Add Configuration section to postgresql doc
vttranlina Jul 1, 2024
c6f8583
[Antora] [PGSQL] Add Performance benchmarks section to postgresql doc
vttranlina Jul 3, 2024
3539e30
[Antora] Make partial for server Architecture section
vttranlina Jul 1, 2024
d0f5b56
[Antora] [PGSQL] Architecture section for postgres doc
vttranlina Jul 3, 2024
87eb9d5
[Antora] Make partial for server Operate section & clean format
vttranlina Jul 1, 2024
bcf0c0b
[Antora] [PGSQL] Add Operate section to postgresql doc
vttranlina Jul 2, 2024
8d3d542
[Antora] Add run section to postgresql documentation
Arsnael Jun 28, 2024
db928c6
[Antora] Add missing link in run with docker page to james cli comman…
Arsnael Jul 1, 2024
5a631c9
[Antora] [PGSQL] Add Extending to postgresql doc
vttranlina Jul 5, 2024
074272d
JAMES-4054 Remove X-SMIME-Status header in mailetcontainer.xml
Arsnael Aug 20, 2024
27abcf5
Postgres-app: unset JAVA_TOOL_OPTIONS env variable when running james…
quantranhong1999 Sep 9, 2024
b3566a2
Bump jOOQ to 3.19.13
quantranhong1999 Oct 21, 2024
49694cf
Bump r2dbc-postgresql to 1.0.7.RELEASE
quantranhong1999 Oct 21, 2024
25bf45a
[PGSQL] Adapt from new master code - BlobId.Factory
vttranlina Oct 24, 2024
5666104
[PGSQL] Adapt from new master code - TypeStateFactory
vttranlina Oct 24, 2024
a8523bd
[PGSQL] Adapt from new master code - SearchQuery
vttranlina Oct 24, 2024
fec4a91
[PGSQL] Disable PostgresAuthenticatedStateTest.rightsCommandsShouldBe…
vttranlina Oct 24, 2024
50f8b1d
Update Jenkinsfile master (just for ci test)
vttranlina Oct 24, 2024
9ed3c8e
JAMES-2586 - Fixup InMemoryUploadRepository.deleteByUploadDateBefore
vttranlina Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import static org.apache.james.backends.cassandra.components.CassandraQuotaCurrentValueTable.QUOTA_TYPE;
import static org.apache.james.backends.cassandra.components.CassandraQuotaCurrentValueTable.TABLE_NAME;

import java.util.Objects;

import jakarta.inject.Inject;

import org.apache.james.backends.cassandra.utils.CassandraAsyncExecutor;
Expand All @@ -47,66 +45,12 @@
import com.datastax.oss.driver.api.querybuilder.delete.Delete;
import com.datastax.oss.driver.api.querybuilder.select.Select;
import com.datastax.oss.driver.api.querybuilder.update.Update;
import com.google.common.base.MoreObjects;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public class CassandraQuotaCurrentValueDao {

public static class QuotaKey {

public static QuotaKey of(QuotaComponent component, String identifier, QuotaType quotaType) {
return new QuotaKey(component, identifier, quotaType);
}

private final QuotaComponent quotaComponent;
private final String identifier;
private final QuotaType quotaType;

public QuotaComponent getQuotaComponent() {
return quotaComponent;
}

public String getIdentifier() {
return identifier;
}

public QuotaType getQuotaType() {
return quotaType;
}

private QuotaKey(QuotaComponent quotaComponent, String identifier, QuotaType quotaType) {
this.quotaComponent = quotaComponent;
this.identifier = identifier;
this.quotaType = quotaType;
}

@Override
public final int hashCode() {
return Objects.hash(quotaComponent, identifier, quotaType);
}

@Override
public final boolean equals(Object o) {
if (o instanceof QuotaKey) {
QuotaKey other = (QuotaKey) o;
return Objects.equals(quotaComponent, other.quotaComponent)
&& Objects.equals(identifier, other.identifier)
&& Objects.equals(quotaType, other.quotaType);
}
return false;
}

public String toString() {
return MoreObjects.toStringHelper(this)
.add("quotaComponent", quotaComponent)
.add("identifier", identifier)
.add("quotaType", quotaType)
.toString();
}
}

private static final Logger LOGGER = LoggerFactory.getLogger(CassandraQuotaCurrentValueDao.class);

private final CassandraAsyncExecutor queryExecutor;
Expand All @@ -126,7 +70,7 @@ public CassandraQuotaCurrentValueDao(CqlSession session) {
this.deleteQuotaCurrentValueStatement = session.prepare(deleteQuotaCurrentValueStatement().build());
}

public Mono<Void> increase(QuotaKey quotaKey, long amount) {
public Mono<Void> increase(QuotaCurrentValue.Key quotaKey, long amount) {
return queryExecutor.executeVoid(increaseStatement.bind()
.setString(QUOTA_COMPONENT, quotaKey.getQuotaComponent().getValue())
.setString(IDENTIFIER, quotaKey.getIdentifier())
Expand All @@ -139,7 +83,7 @@ public Mono<Void> increase(QuotaKey quotaKey, long amount) {
});
}

public Mono<Void> decrease(QuotaKey quotaKey, long amount) {
public Mono<Void> decrease(QuotaCurrentValue.Key quotaKey, long amount) {
return queryExecutor.executeVoid(decreaseStatement.bind()
.setString(QUOTA_COMPONENT, quotaKey.getQuotaComponent().getValue())
.setString(IDENTIFIER, quotaKey.getIdentifier())
Expand All @@ -152,15 +96,15 @@ public Mono<Void> decrease(QuotaKey quotaKey, long amount) {
});
}

public Mono<QuotaCurrentValue> getQuotaCurrentValue(QuotaKey quotaKey) {
public Mono<QuotaCurrentValue> getQuotaCurrentValue(QuotaCurrentValue.Key quotaKey) {
return queryExecutor.executeSingleRow(getQuotaCurrentValueStatement.bind()
.setString(QUOTA_COMPONENT, quotaKey.getQuotaComponent().getValue())
.setString(IDENTIFIER, quotaKey.getIdentifier())
.setString(QUOTA_TYPE, quotaKey.getQuotaType().getValue()))
.map(row -> convertRowToModel(row));
}

public Mono<Void> deleteQuotaCurrentValue(QuotaKey quotaKey) {
public Mono<Void> deleteQuotaCurrentValue(QuotaCurrentValue.Key quotaKey) {
return queryExecutor.executeVoid(deleteQuotaCurrentValueStatement.bind()
.setString(QUOTA_COMPONENT, quotaKey.getQuotaComponent().getValue())
.setString(IDENTIFIER, quotaKey.getIdentifier())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import static org.apache.james.backends.cassandra.components.CassandraQuotaLimitTable.QUOTA_TYPE;
import static org.apache.james.backends.cassandra.components.CassandraQuotaLimitTable.TABLE_NAME;

import java.util.Objects;

import jakarta.inject.Inject;

import org.apache.james.backends.cassandra.utils.CassandraAsyncExecutor;
Expand All @@ -47,74 +45,11 @@
import com.datastax.oss.driver.api.querybuilder.delete.Delete;
import com.datastax.oss.driver.api.querybuilder.insert.Insert;
import com.datastax.oss.driver.api.querybuilder.select.Select;
import com.google.common.base.MoreObjects;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public class CassandraQuotaLimitDao {

public static class QuotaLimitKey {

public static QuotaLimitKey of(QuotaComponent component, QuotaScope scope, String identifier, QuotaType quotaType) {
return new QuotaLimitKey(component, scope, identifier, quotaType);
}

private final QuotaComponent quotaComponent;
private final QuotaScope quotaScope;
private final String identifier;
private final QuotaType quotaType;

public QuotaComponent getQuotaComponent() {
return quotaComponent;
}

public QuotaScope getQuotaScope() {
return quotaScope;
}

public String getIdentifier() {
return identifier;
}

public QuotaType getQuotaType() {
return quotaType;
}

private QuotaLimitKey(QuotaComponent quotaComponent, QuotaScope quotaScope, String identifier, QuotaType quotaType) {
this.quotaComponent = quotaComponent;
this.quotaScope = quotaScope;
this.identifier = identifier;
this.quotaType = quotaType;
}

@Override
public final int hashCode() {
return Objects.hash(quotaComponent, quotaScope, identifier, quotaType);
}

@Override
public final boolean equals(Object o) {
if (o instanceof QuotaLimitKey) {
QuotaLimitKey other = (QuotaLimitKey) o;
return Objects.equals(quotaComponent, other.quotaComponent)
&& Objects.equals(quotaScope, other.quotaScope)
&& Objects.equals(identifier, other.identifier)
&& Objects.equals(quotaType, other.quotaType);
}
return false;
}

public String toString() {
return MoreObjects.toStringHelper(this)
.add("quotaComponent", quotaComponent)
.add("quotaScope", quotaScope)
.add("identifier", identifier)
.add("quotaType", quotaType)
.toString();
}
}

private final CassandraAsyncExecutor queryExecutor;
private final PreparedStatement getQuotaLimitStatement;
private final PreparedStatement getQuotaLimitsStatement;
Expand All @@ -130,7 +65,7 @@ public CassandraQuotaLimitDao(CqlSession session) {
this.deleteQuotaLimitStatement = session.prepare((deleteQuotaLimitStatement().build()));
}

public Mono<QuotaLimit> getQuotaLimit(QuotaLimitKey quotaKey) {
public Mono<QuotaLimit> getQuotaLimit(QuotaLimit.QuotaLimitKey quotaKey) {
return queryExecutor.executeSingleRow(getQuotaLimitStatement.bind()
.setString(QUOTA_COMPONENT, quotaKey.getQuotaComponent().getValue())
.setString(QUOTA_SCOPE, quotaKey.getQuotaScope().getValue())
Expand All @@ -156,7 +91,7 @@ public Mono<Void> setQuotaLimit(QuotaLimit quotaLimit) {
.set(QUOTA_LIMIT, quotaLimit.getQuotaLimit().orElse(null), Long.class));
}

public Mono<Void> deleteQuotaLimit(QuotaLimitKey quotaKey) {
public Mono<Void> deleteQuotaLimit(QuotaLimit.QuotaLimitKey quotaKey) {
return queryExecutor.executeVoid(deleteQuotaLimitStatement.bind()
.setString(QUOTA_COMPONENT, quotaKey.getQuotaComponent().getValue())
.setString(QUOTA_SCOPE, quotaKey.getQuotaScope().getValue())
Expand Down Expand Up @@ -203,7 +138,8 @@ private QuotaLimit convertRowToModel(Row row) {
.quotaScope(QuotaScope.of(row.get(QUOTA_SCOPE, String.class)))
.identifier(row.get(IDENTIFIER, String.class))
.quotaType(QuotaType.of(row.get(QUOTA_TYPE, String.class)))
.quotaLimit(row.get(QUOTA_LIMIT, Long.class)).build();
.quotaLimit(row.get(QUOTA_LIMIT, Long.class))
.build();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.apache.james.backends.cassandra.CassandraClusterExtension;
import org.apache.james.backends.cassandra.components.CassandraMutualizedQuotaModule;
import org.apache.james.backends.cassandra.components.CassandraQuotaCurrentValueDao;
import org.apache.james.backends.cassandra.components.CassandraQuotaCurrentValueDao.QuotaKey;
import org.apache.james.core.quota.QuotaComponent;
import org.apache.james.core.quota.QuotaCurrentValue;
import org.apache.james.core.quota.QuotaType;
Expand All @@ -36,7 +35,7 @@
import org.junit.jupiter.api.extension.RegisterExtension;

public class CassandraQuotaCurrentValueDaoTest {
private static final QuotaKey QUOTA_KEY = QuotaKey.of(QuotaComponent.MAILBOX, "[email protected]", QuotaType.SIZE);
private static final QuotaCurrentValue.Key QUOTA_KEY = QuotaCurrentValue.Key.of(QuotaComponent.MAILBOX, "[email protected]", QuotaType.SIZE);

private CassandraQuotaCurrentValueDao cassandraQuotaCurrentValueDao;

Expand Down Expand Up @@ -92,7 +91,7 @@ void decreaseQuotaCurrentValueShouldDecreaseValueSuccessfully() {

@Test
void deleteQuotaCurrentValueShouldDeleteSuccessfully() {
QuotaKey quotaKey = QuotaKey.of(QuotaComponent.MAILBOX, "[email protected]", QuotaType.SIZE);
QuotaCurrentValue.Key quotaKey = QuotaCurrentValue.Key.of(QuotaComponent.MAILBOX, "[email protected]", QuotaType.SIZE);
cassandraQuotaCurrentValueDao.increase(quotaKey, 100L).block();
cassandraQuotaCurrentValueDao.deleteQuotaCurrentValue(quotaKey).block();

Expand Down Expand Up @@ -125,7 +124,7 @@ void decreaseQuotaCurrentValueShouldNotThrowExceptionWhenQueryExecutorThrowExcep

@Test
void getQuotasByComponentShouldGetAllQuotaTypesSuccessfully() {
QuotaKey countQuotaKey = QuotaKey.of(QuotaComponent.MAILBOX, "[email protected]", QuotaType.COUNT);
QuotaCurrentValue.Key countQuotaKey = QuotaCurrentValue.Key.of(QuotaComponent.MAILBOX, "[email protected]", QuotaType.COUNT);

QuotaCurrentValue expectedQuotaSize = QuotaCurrentValue.builder().quotaComponent(QUOTA_KEY.getQuotaComponent())
.identifier(QUOTA_KEY.getIdentifier()).quotaType(QUOTA_KEY.getQuotaType()).currentValue(100L).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void setQuotaLimitShouldSaveObjectSuccessfully() {
QuotaLimit expected = QuotaLimit.builder().quotaComponent(QuotaComponent.MAILBOX).quotaScope(QuotaScope.DOMAIN).identifier("A").quotaType(QuotaType.COUNT).quotaLimit(100L).build();
cassandraQuotaLimitDao.setQuotaLimit(expected).block();

assertThat(cassandraQuotaLimitDao.getQuotaLimit(CassandraQuotaLimitDao.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
assertThat(cassandraQuotaLimitDao.getQuotaLimit(QuotaLimit.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
.isEqualTo(expected);
}

Expand All @@ -70,7 +70,7 @@ void setQuotaLimitWithEmptyQuotaLimitValueShouldNotThrowNullPointerException() {
QuotaLimit emptyQuotaLimitValue = QuotaLimit.builder().quotaComponent(QuotaComponent.MAILBOX).quotaScope(QuotaScope.DOMAIN).identifier("A").quotaType(QuotaType.COUNT).build();
cassandraQuotaLimitDao.setQuotaLimit(emptyQuotaLimitValue).block();

assertThat(cassandraQuotaLimitDao.getQuotaLimit(CassandraQuotaLimitDao.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
assertThat(cassandraQuotaLimitDao.getQuotaLimit(QuotaLimit.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
.isEqualTo(emptyQuotaLimitValue);
}

Expand All @@ -79,17 +79,17 @@ void setQuotaLimitShouldSaveObjectSuccessfullyWhenLimitIsMinusOne() {
QuotaLimit expected = QuotaLimit.builder().quotaComponent(QuotaComponent.MAILBOX).quotaScope(QuotaScope.DOMAIN).identifier("A").quotaType(QuotaType.COUNT).quotaLimit(-1L).build();
cassandraQuotaLimitDao.setQuotaLimit(expected).block();

assertThat(cassandraQuotaLimitDao.getQuotaLimit(CassandraQuotaLimitDao.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
assertThat(cassandraQuotaLimitDao.getQuotaLimit(QuotaLimit.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
.isEqualTo(expected);
}

@Test
void deleteQuotaLimitShouldDeleteObjectSuccessfully() {
QuotaLimit quotaLimit = QuotaLimit.builder().quotaComponent(QuotaComponent.MAILBOX).quotaScope(QuotaScope.DOMAIN).identifier("A").quotaType(QuotaType.COUNT).quotaLimit(100L).build();
cassandraQuotaLimitDao.setQuotaLimit(quotaLimit).block();
cassandraQuotaLimitDao.deleteQuotaLimit(CassandraQuotaLimitDao.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block();
cassandraQuotaLimitDao.deleteQuotaLimit(QuotaLimit.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block();

assertThat(cassandraQuotaLimitDao.getQuotaLimit(CassandraQuotaLimitDao.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
assertThat(cassandraQuotaLimitDao.getQuotaLimit(QuotaLimit.QuotaLimitKey.of(QuotaComponent.MAILBOX, QuotaScope.DOMAIN, "A", QuotaType.COUNT)).block())
.isNull();
}

Expand Down
1 change: 1 addition & 0 deletions backends-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<module>cassandra</module>
<module>jpa</module>
<module>opensearch</module>
<module>postgres</module>
<module>pulsar</module>
<module>rabbitmq</module>
<module>redis</module>
Expand Down
Loading