view docs/figures/figure-sg01-ab.svg @ 6023:6c67219ce779 stable

topic: don't cache topic of e.g. memctx in _topiccache (issue6500) _topiccache exists to make us hit the storage less often when we want to look at topics for any reason. It doesn't make much sense to cache something that is memory-only and is cheap to access however. Caching things like that was also a source of a bug where creating multiple memctx instances in one process would cache topic of the first one and ignore actual content of .extra() of the others. That was happening because the cache is keyed by .rev(), but all memctx instances have the same .rev() = None.
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 29 Aug 2021 14:41:23 +0300
parents 0d1893c1044c
children
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
 -->
<!-- Title: Mercurial graph Pages: 1 -->
<svg width="224pt" height="116pt"
 viewBox="0.00 0.00 224.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
<title>Mercurial graph</title>
<!-- 0 -->
<g id="node1" class="node">
<title>0</title>
<polygon fill="none" stroke="#000000" stroke-width="4" points="72,-108 0,-108 0,-72 72,-72 72,-108"/>
<text text-anchor="middle" x="36" y="-86.3" font-family="mono" font-size="14.00" fill="#000000">0:0dc9</text>
</g>
<!-- 1 -->
<g id="node2" class="node">
<title>1</title>
<polygon fill="none" stroke="#000000" stroke-width="2" points="216,-108 144,-108 144,-72 216,-72 216,-108"/>
<text text-anchor="middle" x="180" y="-86.3" font-family="mono" font-size="14.00" fill="#000000">1:f649</text>
</g>
<!-- 0&#45;&gt;1 -->
<g id="edge1" class="edge">
<title>0&#45;&gt;1</title>
<path fill="none" stroke="#000000" stroke-width="2" d="M72.3373,-90C90.9973,-90 113.9327,-90 133.8329,-90"/>
<polygon fill="#000000" stroke="#000000" stroke-width="2" points="133.9241,-93.5001 143.924,-90 133.924,-86.5001 133.9241,-93.5001"/>
</g>
<!-- T0 -->
<g id="node3" class="node">
<title>T0</title>
<text text-anchor="start" x="11" y="-15.3" font-family="mono" font-style="italic" font-size="14.00" fill="#000000">public</text>
</g>
<!-- T0&#45;&gt;0 -->
<g id="edge2" class="edge">
<title>T0&#45;&gt;0</title>
<path fill="none" stroke="#c0c0c0" stroke-width="2" d="M36,-36.1686C36,-43.869 36,-53.0257 36,-61.5834"/>
<polygon fill="#c0c0c0" stroke="#c0c0c0" stroke-width="2" points="32.5001,-61.5867 36,-71.5867 39.5001,-61.5868 32.5001,-61.5867"/>
</g>
<!-- T1 -->
<g id="node4" class="node">
<title>T1</title>
<text text-anchor="start" x="159" y="-15.3" font-family="mono" font-style="italic" font-size="14.00" fill="#000000">draft</text>
</g>
<!-- T1&#45;&gt;1 -->
<g id="edge3" class="edge">
<title>T1&#45;&gt;1</title>
<path fill="none" stroke="#c0c0c0" stroke-width="2" d="M180,-36.1686C180,-43.869 180,-53.0257 180,-61.5834"/>
<polygon fill="#c0c0c0" stroke="#c0c0c0" stroke-width="2" points="176.5001,-61.5867 180,-71.5867 183.5001,-61.5868 176.5001,-61.5867"/>
</g>
</g>
</svg>