Skip to content

Commit

Permalink
Use ConcurrentHashMap when serializing tags.
Browse files Browse the repository at this point in the history
fix #1055
  • Loading branch information
BhaaVast authored and manolama committed Jul 10, 2023
1 parent db28637 commit fd78f0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tsd/HttpJsonSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.Set;
import java.util.LinkedHashSet;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;

import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferOutputStream;
Expand Down Expand Up @@ -673,7 +674,7 @@ class DPsResolver implements Callback<Deferred<Object>, Object> {
/** Has to be final to be shared with the nested classes */
final StringBuilder metric = new StringBuilder(256);
/** Resolved tags */
final Map<String, String> tags = new HashMap<String, String>();
final Map<String, String> tags = new ConcurrentHashMap<String, String>();
/** Resolved aggregated tags */
final List<String> agg_tags = new ArrayList<String>();
/** A list storing the metric and tag resolve calls */
Expand Down

0 comments on commit fd78f0e

Please sign in to comment.