This is an automated email from the ASF dual-hosted git repository.

chewbranca pushed a commit to branch cache-io-priority-encoding
in repository https://gitbox.apache.org/repos/asf/couchdb-ioq.git


The following commit(s) were added to refs/heads/cache-io-priority-encoding by 
this push:
     new f1b3078  Fixup pdict usage
f1b3078 is described below

commit f1b30789afc87f173e0935e14390d979706a3f7f
Author: Russell Branca <[email protected]>
AuthorDate: Fri Jun 6 13:37:36 2025 -0700

    Fixup pdict usage
---
 src/ioq_server2.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ioq_server2.erl b/src/ioq_server2.erl
index ce15b2b..85db268 100644
--- a/src/ioq_server2.erl
+++ b/src/ioq_server2.erl
@@ -547,12 +547,13 @@ add_request_dimensions(Request, undefined) ->
 
 
 extract_shard_info(Shard0) ->
-    case erlang:get({io_priority_cache, Shard0}, undefined) of
+    Key = {io_priority_cache, Shard0},
+    case erlang:get(Key) of
         undefined ->
             Shard1 = filename:rootname(Shard0),
             {User, Dbname} = shard_info(Shard1),
             Info = {Shard1, User, Dbname},
-            erlang:put({io_priority_cache, Shard0}, Info),
+            erlang:put(Key, Info),
             Info;
         Info ->
             Info

Reply via email to