<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Never mind, but thank you Hans for offering to help.</div><div><br></div><div>When matching on pid, with the first part of the key unbound, gproc rewrites it to a match on the reverse mapping instead, followed by explicit lookups on the actual objects in the found set.</div><div><br></div><div>A while ago, I changed the representation of the reverse mapping, but forgot to rewrite the qlc query.</div><div><br></div><div>The newly pushed version should fix the problem. I'll remove the compilation warning later. :)</div><div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 20 Apr 2011, at 10:27, Ulf Wiger wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Hi Greg,</div><div><br></div><div>This is interesting - it looks as if QLC doesn't give gproc the chance to rewrite the match specification when there is a '=:=' instead of a '==' in the guard.</div><div><br></div><div>Perhaps there is some subtle option in QLC which could save the day? It would require some digging into manuals, or a helpful tip from Hans Bolinder.</div><div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 20 Apr 2011, at 03:30, Gregory Haskins wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 19, 2011, at 8:21 PM, Gregory Haskins wrote:</div><blockquote type="cite"><div><blockquote type="cite"><font class="Apple-style-span"><br></font></blockquote><br>I updated and added the code, but I ran into a potentially unrelated snag before I could verify if this fixed the issue. That is:<br><br>(agent@linux-mp)23> Pid.<br><0.73.0><br>(agent@linux-mp)24> qlc:e(qlc:q([{P, K, V} || {{p, g, {edist_fact, K}}, P, V} <- gproc:table(props), K =:= "hostname"])).<br>[{<0.73.0>,"hostname","linux-mp"}]<br>(agent@linux-mp)25> qlc:e(qlc:q([{P, K, V} || {{p, g, {edist_fact, K}}, P, V} <- gproc:table(props), P =:= Pid])). <br>[]</div></blockquote><br></div><div>It looks like "P == Pid" does in fact work. I am not clear if the problem with using =:= is gproc, erlang/qlc, or "pilot error" specific, but that does seem the be the problem in this case.</div><div><br></div><div>BTW: I did in fact confirm that the sync() in v0.2.3 seems to be working fine, thanks!</div><div><br></div><div>-Greg</div></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Ulf Wiger, CTO, Erlang Solutions, Ltd.</div><div><a href="http://erlang-solutions.com/">http://erlang-solutions.com</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></div>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Ulf Wiger, CTO, Erlang Solutions, Ltd.</div><div><a href="http://erlang-solutions.com">http://erlang-solutions.com</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>