You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/02/18 18:40:57 UTC

[GitHub] [couchdb] nickva commented on a change in pull request #2568: change couch_jobs ?COUCH_JOBS_CURRENT to ?PDICT_CHECKED_MD_IS_CURRENT

nickva commented on a change in pull request #2568: change couch_jobs ?COUCH_JOBS_CURRENT to ?PDICT_CHECKED_MD_IS_CURRENT
URL: https://github.com/apache/couchdb/pull/2568#discussion_r380861369
 
 

 ##########
 File path: src/couch_jobs/src/couch_jobs_fdb.erl
 ##########
 @@ -631,12 +631,12 @@ init_jtx({erlfdb_transaction, _} = Tx) ->
 
 
 ensure_current(#{jtx := true, tx := Tx} = JTx) ->
-    case get(?COUCH_JOBS_CURRENT) of
+    case get(?PDICT_CHECKED_MD_IS_CURRENT) of
         Tx ->
             JTx;
         _ ->
             JTx1 = update_current(JTx),
-            put(?COUCH_JOBS_CURRENT, Tx),
+            put(?PDICT_CHECKED_MD_IS_CURRENT, Tx),
 
 Review comment:
   `PDICT_CHECKED_MD_IS_CURRENT` is `true|false`
   
   Also I think maybe we shouldn't set `put(?PDICT_CHECKED_MD_IS_CURRENT` here and maybe `check(?COUCH_JOBS_CURRENT)` and `get(?PDICT_CHECKED_MD_IS_CURRENT)` and if either is set we skip it...
   
   However,  I wonder until we have a common `couch_fdb` if it maybe simpler to just use a separate metadata key. Thinking some more here we could get in trouble overwriting the pdict keys here. Since we don't necessarily share the Db handle. We do want them to separately perform the metadata validation instead of bypassing.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services