You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "vttranlina (via GitHub)" <gi...@apache.org> on 2023/12/19 11:07:37 UTC

[PR] [PGSQL] ADR on PGSQL flags update concurrency control mechanism [james-project]

vttranlina opened a new pull request, #1867:
URL: https://github.com/apache/james-project/pull/1867

   resolve https://github.com/linagora/james-project/issues/4956


-- 
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] [PGSQL] ADR on PGSQL flags update concurrency control mechanism [james-project]

Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael merged PR #1867:
URL: https://github.com/apache/james-project/pull/1867


-- 
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] [PGSQL] ADR on PGSQL flags update concurrency control mechanism [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #1867:
URL: https://github.com/apache/james-project/pull/1867#discussion_r1432320267


##########
src/adr/0072-postgresql-flags-update-concurrency-control.md:
##########
@@ -41,10 +41,18 @@ Cons:
 However, this may increase the complexity of the code and require careful management of data versions.
 The chosen solution using PostgreSQL functions was preferred for its simplicity and direct support for array operations.
 
+- Read-Then-Write Logic into Transactions: Transactions come with associated costs, including extra locking, coordination overhead, 
+and dependency on connection pooling. By avoiding the use of transactions, we aim to reduce these potential drawbacks 
+and explore other mechanisms for ensuring data consistency.
+
+- Semantic Alignment with CRDT Principles: Considering a re-implementation of the logic with a semantic alignment to CRDT (commutative replicated data types) principles.
+This alternative explores a different paradigm for addressing concurrency challenges without resorting to traditional transactions.

Review Comment:
   Move this into context. This is some context we did draw inspiration from...



-- 
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] [PGSQL] ADR on PGSQL flags update concurrency control mechanism [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #1867:
URL: https://github.com/apache/james-project/pull/1867#discussion_r1431449026


##########
src/adr/0072-postgresql-flags-update-concurrency-control.md:
##########
@@ -0,0 +1,50 @@
+# 72.  Postgresql flags update concurrency control mechanism
+
+Date: 2023-12-19
+
+## Status
+
+Not-Implemented
+
+## Context
+
+When IMAP server support THREAD_SAFE_FLAGS_UPDATE capability, it means that the server can update flags concurrently.

Review Comment:
   No. We do not get the choice.
   
   To get a working IMAP server we need to support concurrency races upon flag updates and get a decent behaviour.



-- 
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] [PGSQL] ADR on PGSQL flags update concurrency control mechanism [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #1867:
URL: https://github.com/apache/james-project/pull/1867#discussion_r1432425317


##########
src/adr/0072-postgresql-flags-update-concurrency-control.md:
##########
@@ -13,6 +13,9 @@ The multiple queries from clients simultaneously access the `user_flags` column
 Currently, the James fetches the current data, performs changes, and then updates to database.
 However, this approach does not ensure thread safety and may lead to concurrency issues.
 
+Considering a re-implementation of the logic with a semantic alignment to CRDT (conflict-free replicated data types) principles.
+This alternative explores a different paradigm for addressing concurrency challenges without resorting to traditional transactions.

Review Comment:
   ```suggestion
   CRDT (conflict-free replicated data types) principles semantic can lay the ground to solving concurrency issues in a lock-free manner, and could thus be used for the problem at hand. This explores a different paradigm for addressing concurrency challenges without resorting to traditional transactions.
   ```



-- 
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