-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pva links to pvxs #57
Conversation
❌ Build pvxs 1.0.942 failed (commit 7f9f4b70a8 by @simon-ess) |
f913c73
to
8c60a84
Compare
❌ Build pvxs 1.0.946 failed (commit 939c51a120 by @simon-ess) |
✅ Build pvxs 1.0.947 completed (commit c0a961e4da by @simon-ess) |
❌ Build pvxs 1.0.949 failed (commit e565a11af6 by @simon-ess) |
❌ Build pvxs 1.0.951 failed (commit 90447de627 by @simon-ess) |
I have pushed some additional changes. Including a possible workaround for epics-base/epics-base#423 with older Base (currently all released versions...). I have also reworked the test synchronization code. However, I am still seeing some intermittent test failures in GHA runs. |
❌ Build pvxs 1.0.957 failed (commit dd5698dd47 by @mdavidsaver) |
b5a2fa3
to
75df3a5
Compare
Another update. At this point all tests are passing for me. Although, coverage.sh shows there are a couple of cases which I think need testing. wrt. the The other lingering issue was an intermittent failure in |
✅ Build pvxs 1.0.960 completed (commit be6492fe26 by @mdavidsaver) |
@simon-ess I think I have this PR is a more or less final form. At this point, the blocker to merging is a resolution of epics-base/epics-base#423, which causes As a remaining task, I am working on some logic to detect when |
❌ Build pvxs 1.0.964 failed (commit 5ab45fc0df by @mdavidsaver) |
✅ Build pvxs 1.0.965 completed (commit ffe5261180 by @mdavidsaver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, one other oddity I noticed: if you have the following as a db file:
record(ai, "FOO") {
field(INP, {pva: {pv: "BAR", proc: "CPP"}})
}
record(aai, "BAR") {
field(NELM, 10)
}
then running pvput BAR "[1,2,3]"
with an IOC running softIocPVA the linked ai
record fetches the first value. However, with softIocPVX
it does not.
atomic_lock = ioc::DBManyLock(atomicrecs); | ||
atomic_records = std::move(atomic); | ||
nonatomic_records = std::move(nonatomic); | ||
|
||
links_changed = false; | ||
} | ||
|
||
update_seq++; | ||
update_evt.signal(); | ||
log_debug_printf(_logger, "%s Sequence point %u\n", key.first.c_str(), update_seq); | ||
} | ||
// unlock link | ||
|
||
if(!atomic_records.empty()) { | ||
ioc::DBManyLocker L(atomic_lock); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is perhaps an odd pedantic point, and probably out of scope... but aren't these names semantically backwards? It seems to me that DBManyLock
should be doing the action, while DBManyLocker
is the thing that does the action.
Not that this affects the code, but it gives me a bit of a hiccup on reading, as it looks like the lock is taken on line 416 (and not obviously ever let go), but it is in fact taken on line 430 (and let go shortly thereafter).
Looking at the Git Blame, it seems that we can blame @george-mcintyre...
Comments interspersed below.
On 6 Nov 2023, at 17:09, Simon Rose ***@***.***> wrote:
@simon-ess commented on this pull request.
Also, one other oddity I noticed: if you have the following as a db file:
record(ai, "FOO") {
field(INP, {pva: {pv: "BAR", proc: "CPP"}})
}
record(aai, "BAR") {
field(NELM, 10)
}
then running pvput BAR "[1,2,3]" with an IOC running softIocPVA the linked ai record fetches the first value. However, with softIocPVX it does not.
In ioc/pvalink_link.cpp <#57 (comment)>:
> + log_debug_printf(_logger, "%s type change V=%c S=%c N=%c S=%c M=%c\n",
+ plink->precord->name,
+ fld_value ? 'Y' : 'N',
+ fld_seconds ? 'Y' : 'N',
+ fld_nanoseconds ? 'Y' : 'N',
+ fld_severity ? 'Y' : 'N',
+ fld_meta ? 'Y' : 'N');
I'm a bit confused by this debug statement: isn't root["value"] the actual value? This debug message seems to be trying to say that the value/timestamp/etc. are being modified, but that's not how I read the code...
In ioc/pvalink_channel.cpp <#57 (comment)>:
> + atomic_lock = ioc::DBManyLock(atomicrecs);
+ atomic_records = std::move(atomic);
+ nonatomic_records = std::move(nonatomic);
+
+ links_changed = false;
+ }
+
+ update_seq++;
+ update_evt.signal();
+ log_debug_printf(_logger, "%s Sequence point %u\n", key.first.c_str(), update_seq);
+ }
+ // unlock link
+
+ if(!atomic_records.empty()) {
+ ioc::DBManyLocker L(atomic_lock);
This is perhaps an odd pedantic point, and probably out of scope... but aren't these names semantically backwards? It seems to me that DBManyLock should be doing the action, while DBManyLocker is the thing that does the action.
Not that this affects the code, but it gives me a bit of a hiccup on reading, as it looks like the lock is taken on line 416 (and not obviously ever let go), but it is in fact taken on line 430 (and let go shortly thereafter).
Looking at the Git Blame, it seems that we can blame @george-mcintyre <https://github.com/george-mcintyre>...
Yeah, like employee and employer, DBManyLock is the actual subject/object - the actual lock object, and DBManyLocker is the think that does the locking. Though I can see how it looks confusing.
… —
Reply to this email directly, view it on GitHub <#57 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJQ2YXNBLL2AFW6FKIDQTDYDEDTXAVCNFSM6AAAAAA4U5MWA6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMJVGI2DGNZZGQ>.
You are receiving this because you were mentioned.
|
You may have meant to set |
Another update. Adds At this point, I have no more major TODOs. |
I have found an issue where input links with CPP don't get an initial scan if the associated Channel is already connected and idle. This is annoyingly similar to a previous issue with onTypeChange() (#57 (comment)). |
❌ Build pvxs 1.0.967 failed (commit bf8f7fd85f by @mdavidsaver) |
@george-mcintyre I think that part of my confusion comes from the code in PVXS using the |
I think my question is more that I would have expected softIovPVA and softIocPVX to behave the same with the same .db file, but they do not. |
This is the expectation I would like you to have. I was only making a point about why the were different. (this difference should be fixed) Maybe I am the only one who keeps forgetting that |
... the established and oft demonstrated fact the I am not as attuned to the subtitles and nuisances of naming ;) |
Ah, of course I meant nuances... |
❌ Build pvxs 1.0.972 failed (commit 5548c3f716 by @mdavidsaver) |
❌ Build pvxs 1.0.976 failed (commit a35b8cf25e by @mdavidsaver) |
For some reason
These counts point to a |
✅ Build pvxs 1.0.977 completed (commit a1d0d2ee59 by @mdavidsaver) |
The (re)initialization issue which was causing leaks and (sometimes) test failures should now be fixed. |
The default seems to copy the shared_ptr member?
from pva2pva f1a3db44158a239a44d14b99b7823f340e95d7e0
Fix pvaGetValue for string scalars Remove pvaLink* variables Move close() call to pvaGlobal_t from worker queue Removed latch state Update .gitignore to ignore VS code configuration Add lset(pva) support for base 7.x Remove pvalink support for base 3.x Update cached value object in pvaLinkChannel::run Removing queued state from pvaLikeChannel Add debug functionality Rename internal fields to match json spec prepare for puts Fix array response size Add tests for pvalink properties
add pvalink json schema avoid JSON5 in testpvalink for portability. fixup build with pvalink trap bad_weak_ptr open during dtor Not sure why this is happening, but need not be CRIT. c++11, cleanup, and notes fix pvalink test sync fix test cleanup on exit pvalink disconnected link is always INVALID pvalink logging pvalink capture Disconnect time pvalink eliminate providerName restrict local to dbChannelTest() aka. no qsrv groups pvalink onTypeChange when attaching link to existing channel pvalink eliminate unused Connecting state pvalink add InstCounter pvalink AfterPut can be const pvalink add atomic jlif flag include epicsStdio.h later avoid #define printf troubles assert cleanup state on exit pvalink add newer lset functions test link disconnect testpvalink redo testPutAsync() pvalink fill out meta-data fetch pvalink fix FLNK pvalink cache putReq pvalink test atomic monitor pvalink test enum handling pvalink handle scalar read of empty array make it well defined anyway... pvalink test array of strings handle db_add_event() failure handle record._options.DBE
also consolidates initHook and epicsAtExit() hooks into a single sequence.
Ok. I think this is good enough. Thanks @simon-ess . |
Port PVA links from pva2pva.
TODO
atomic
as link option.pvxs.*
.pvxs/iochooks.h
.