Merge lp://staging/~olafvdspek/drizzle/refactor11 into lp://staging/~drizzle-trunk/drizzle/development

Proposed by Olaf van der Spek
Status: Work in progress
Proposed branch: lp://staging/~olafvdspek/drizzle/refactor11
Merge into: lp://staging/~drizzle-trunk/drizzle/development
Diff against target: 329 lines (+48/-100)
4 files modified
drizzled/atomic/gcc_traits.h (+0/-4)
drizzled/atomic/pthread_traits.h (+0/-6)
drizzled/atomics.h (+39/-53)
unittests/pthread_atomics_test.cc (+9/-37)
To merge this branch: bzr merge lp://staging/~olafvdspek/drizzle/refactor11
Reviewer Review Type Date Requested Status
Monty Taylor Needs Information
Review via email: mp+82055@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Mark Atwood (fallenpegasus) wrote :

Hi. Touching the atomics and the trait constructors needs to be reviewed by Brian. I'm asking him to review this before merging.

Revision history for this message
Monty Taylor (mordred) wrote :

I would be interested in an explanation of what your refactor is doing in the atomic classes. I'm not saying that it's wrong, but the template code in there isn't exactly friendly, so I'd like to know what it is you're shooting for here.

review: Needs Information
Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Tue, Nov 15, 2011 at 7:48 PM, Monty Taylor <email address hidden> wrote:
> Review: Needs Information
>
> I would be interested in an explanation of what your refactor is doing in the atomic classes. I'm not saying that it's wrong, but the template code in there isn't exactly friendly, so I'd like to know what it is you're shooting for here.

I removed emptry constructors and destructors.
Moved atomic_base into atomic_impl.
Removed a type.

--
Olaf

Revision history for this message
Monty Taylor (mordred) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/15/2011 05:04 PM, Olaf van der Spek wrote:
> On Tue, Nov 15, 2011 at 7:48 PM, Monty Taylor
> <email address hidden> wrote:
>> Review: Needs Information
>>
>> I would be interested in an explanation of what your refactor is
>> doing in the atomic classes. I'm not saying that it's wrong, but
>> the template code in there isn't exactly friendly, so I'd like to
>> know what it is you're shooting for here.
>
> I removed emptry constructors and destructors. Moved atomic_base
> into atomic_impl. Removed a type.

So - more specifically:

What are you accomplishing with the atomic_base -> atomic_impl move.
(not saying it's bad - I just want to know what you wanted to do here)

Why did you remove the empty constructors? They were preventing
default constructors from writing data to memory locations that we
didn't want them to write to?

Additionally - the pthread_atomics_test was there specifically to test
that the pthread-based atomic class worked, even if you happened to be
running the tests on a machine that happened to have real atomic
support. With the change to use the top-level atomic class, the test
no longer tests that.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7CvGEACgkQ2Jv7/VK1RgHwjwCg7Z+H8fbm8sVVA2T+EJjpEXgm
T2gAnRewAHJ/sEOshwZj1DlyXazdE02s
=aVWw
-----END PGP SIGNATURE-----

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Tue, Nov 15, 2011 at 8:28 PM, Monty Taylor <email address hidden> wrote:
> What are you accomplishing with the atomic_base -> atomic_impl move.
> (not saying it's bad - I just want to know what you wanted to do here)

Simpler code.

> Why did you remove the empty constructors? They were preventing
> default constructors from writing data to memory locations that we
> didn't want them to write to?

Eh, to what memory would default constructors write?

> Additionally - the pthread_atomics_test was there specifically to test
> that the pthread-based atomic class worked, even if you happened to be
> running the tests on a machine that happened to have real atomic
> support. With the change to use the top-level atomic class, the test
> no longer tests that.

Ah. Does it make sense to test code you're not going to use though?

--
Olaf

Revision history for this message
Brian Aker (brianaker) wrote :

@Olaf I'd leave the atomic implementation alone. This is an area where in the future someone could want what you are removing (and what has tests).

re: query_id
Right now it is one step closer to being encapsulated for catalogs, why remove that?

For if(), go on and put { } around what you expect it to execute. Over the years I've found just too many unintended bugs based on code getting shuffled, and no one realizing that the behavior of the branch had changed.

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Wed, Nov 16, 2011 at 10:08 AM, Brian Aker <email address hidden> wrote:
> @Olaf I'd leave the atomic implementation alone. This is an area where in the future someone could want what you are removing (and what has tests).

I'll restore the tests to test the pthread implementation.
But what removed code could someone want in the future?

> re: query_id
> Right now it is one step closer to being encapsulated for catalogs, why remove that?

How does it relate to catalogs?

Olaf

2462. By Olaf van der Spek

Merge trunk

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Tue, Nov 15, 2011 at 8:37 PM, Olaf van der Spek <email address hidden> wrote:
> On Tue, Nov 15, 2011 at 8:28 PM, Monty Taylor <email address hidden> wrote:
>> What are you accomplishing with the atomic_base -> atomic_impl move.
>> (not saying it's bad - I just want to know what you wanted to do here)
>
> Simpler code.
>
>> Why did you remove the empty constructors? They were preventing
>> default constructors from writing data to memory locations that we
>> didn't want them to write to?
>
> Eh, to what memory would default constructors write?
>
>> Additionally - the pthread_atomics_test was there specifically to test
>> that the pthread-based atomic class worked, even if you happened to be
>> running the tests on a machine that happened to have real atomic
>> support. With the change to use the top-level atomic class, the test
>> no longer tests that.
>
> Ah. Does it make sense to test code you're not going to use though?

Monty?

--
Olaf

2463. By Olaf van der Spek

Merge trunk

2464. By Olaf van der Spek

Merge trunk

Unmerged revisions

2464. By Olaf van der Spek

Merge trunk

2463. By Olaf van der Spek

Merge trunk

2462. By Olaf van der Spek

Merge trunk

2461. By Olaf van der Spek

Refactor

2460. By Olaf van der Spek

Refactor

2459. By Olaf van der Spek

Refactor

2458. By Olaf van der Spek

Refactor

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.