Skip to content

always unlock jval#3791

Merged
mattdowle merged 5 commits intomasterfrom
j_lock_sd
Aug 27, 2019
Merged

always unlock jval#3791
mattdowle merged 5 commits intomasterfrom
j_lock_sd

Conversation

@MichaelChirico
Copy link
Copy Markdown
Member

@MichaelChirico MichaelChirico commented Aug 27, 2019

Closes #2245
follow-up to #3768

@mattdowle mattdowle changed the title Closes #2245 -- always unlock jval always unlock jval Aug 27, 2019
@mattdowle mattdowle added this to the 1.12.4 milestone Aug 27, 2019
Comment thread R/data.table.R Outdated
}

jval = eval(jsub, SDenv, parent.frame())
.Call(Csetattrib, jval, '.data.table.locked', NULL) # in case jval inherits .SD's lock, #1341 #2245. Use .Call not setattr() to avoid bumping jval's MAYBE_REFERENCED.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh thanks. i was just scratching my head about what's going on here, would've taken me quite some time to figure it out 👍

Comment thread src/assign.c Outdated
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 27, 2019

Codecov Report

Merging #3791 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3791      +/-   ##
==========================================
- Coverage   99.41%   99.41%   -0.01%     
==========================================
  Files          71       71              
  Lines       13224    13222       -2     
==========================================
- Hits        13147    13145       -2     
  Misses         77       77
Impacted Files Coverage Δ
src/assign.c 100% <100%> (ø) ⬆️
R/data.table.R 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f39178...f6eda8c. Read the comment docs.

Comment thread R/data.table.R Outdated
@@ -1280,11 +1282,6 @@ replace_order = function(isub, verbose, env) {
Copy link
Copy Markdown
Member

@mattdowle mattdowle Aug 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit (b13fdb4) also removed this alloc.col() which seems redundant. But it must have been covered since we have 100% R coverage, and the R coverage detects uncovered branches on the same line. So to find how it was covered I added it back with a stop() in commit b30e0cf. One test 2074.05 hit that stop. Which was a coverage test added fairly recently thanks to Michael. That coverage test does trigger the alloc.col but there isn't any need for the alloc.col in that test. So let's remove it for now since I don't see why the alloc.col is needed. Returning a data.table should already be over allocated which is why the coverage test needed to manually construct an invalid data.table to return.

@mattdowle mattdowle merged commit d5eb590 into master Aug 27, 2019
@mattdowle mattdowle deleted the j_lock_sd branch August 27, 2019 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

table retain's SD's locked attribute outside [

2 participants