-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
The ObjectRegistry class replaces the Registrar and NewCustomObjects.… #5293
Conversation
eca7264
to
9be32d9
Compare
9be32d9
to
2d87f30
Compare
Thanks @mrambacher for this PR. Can you rebase it as well? I will take a look at this one first. |
2d87f30
to
a662502
Compare
Should be fixed now. Let me know if there are any issues.
…On Fri, Jun 21, 2019 at 12:17 PM Yanqin Jin ***@***.***> wrote:
Thanks @mrambacher <https://github.com/mrambacher> for this PR. Can you
rebase it as well? I will take a look at this one first.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5293?email_source=notifications&email_token=AABCTBDM6P3PFGD2AFZOTMLP3T5JZA5CNFSM4HL4365KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYI5BNI#issuecomment-504484021>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABCTBDK36UTOIGURJJ6RA3P3T5JZANCNFSM4HL4365A>
.
|
a662502
to
73c06fe
Compare
Any progress? Let me know if there is anything I can do to help.
I will be at the Meetup next week if you want to meet in person before
or after that. I will be presenting what we are trying to do with these
changes during the meetup. Let m know if you are available and want to
talk.
…On Fri, Jun 21, 2019 at 3:45 PM Mark Rambacher ***@***.***> wrote:
Should be fixed now. Let me know if there are any issues.
On Fri, Jun 21, 2019 at 12:17 PM Yanqin Jin ***@***.***>
wrote:
> Thanks @mrambacher <https://github.com/mrambacher> for this PR. Can you
> rebase it as well? I will take a look at this one first.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#5293?email_source=notifications&email_token=AABCTBDM6P3PFGD2AFZOTMLP3T5JZA5CNFSM4HL4365KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYI5BNI#issuecomment-504484021>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABCTBDK36UTOIGURJJ6RA3P3T5JZANCNFSM4HL4365A>
> .
>
|
@mrambacher . sorry I was unable to review it last week because something else came up and got in my way. I will try to take a look this week. |
73c06fe
to
3957068
Compare
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.
Thanks @mrambacher for the PR. I took a pass and left some comments.
Could you fix Travis and AppVeyor errors, please? @mrambacher |
I pushed out a new changeset that should resolve all of the issues you have brought up. Let me know if there is anything further. If you need me to, I can squash the branch, but thought it might be easier for you if the changes were not for the next round of review. |
Thanks for fixing the tests. I am going to take a look today. |
2be7d7b
to
cc7e583
Compare
I pushed out a second changeset in this branch (to add a Env::LoadEnv). If you are okay with these two changes, I will merge them into one prior to final approval. |
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.
@riversand963 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
I think the overall design LGTM. However I have a few questions. Furthermore, have you run make all && make check
? It still fails on my devserver. I may have time to take a look this week, but it would be great if you can give it a try.
src.mk
Outdated
@@ -184,6 +184,7 @@ LIB_SOURCES = \ | |||
utilities/debug.cc \ | |||
utilities/env_mirror.cc \ | |||
utilities/env_timed.cc \ | |||
utilities/object_registry.cc \ |
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, these lines should be sorted in alphabetic order.
I have been testing by doing a "make dbg" and running all of those tests, which passes. When I try a "make check", I see an error but cannot tell what is failing. How do I determine what is failing from make check? |
Will take a look at the failure. I think it is very close to the finishing line. |
here is a repro:
|
cc7e583
to
569d0b4
Compare
@mrambacher has updated the pull request. Re-import the pull request |
This should now be fixed. I rebased and pushed the changes back out. Can you tell me how/where you tracked down what was failing? I could not find that information in the logs to determine what was going wrong. |
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.
@riversand963 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@mrambacher has updated the pull request. Re-import the pull request |
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.
@riversand963 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I have nothing further to add here. If you want me to rebase, I can but need to know where you want me to rebase from. |
@mrambacher , cool! I think I can take from here. |
@mrambacher has updated the pull request. Re-import the pull request |
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.
@riversand963 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
644ad6f
to
85650da
Compare
@mrambacher has updated the pull request. Re-import the pull request |
1 similar comment
@mrambacher has updated the pull request. Re-import the pull request |
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.
@riversand963 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…t error Fix bench tool to build in LITE mode on MAC Unused local variable warning
The ObjectRegistry class replaces the Registrar and NewCustomObjects. Objects are registered with the registry by Type (the class must implement the static const char *Type() method). This change is necessary for a few reasons: By having a class (rather than static template instances), the class can be passed between compilation units, meaning that objects could be registered and shared from a dynamic library with an executable. By having a class with instances, different units could have different objects registered. This could be useful if, for example, one Option allowed for a dynamic library and one did not. This change is necessary for a few reasons: By having a class (rather than static template instances), the class can be passed between compilation units, meaning that objects could be registered and shared from a dynamic library with an executable. By having a class with instances, different units could have different objects registered. This could be useful if, for example, one Option allowed for a dynamic library and one did not. When combined with some other PRs (being able to load shared libraries, a Configurable interface to configure objects to/from string), this code will allow objects in external shared libraries to be added to a RocksDB image at run-time, rather than requiring every new extension to be built into the main library and called explicitly by every program.
a48855e
to
9355b22
Compare
@mrambacher has updated the pull request. Re-import the pull request |
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.
@riversand963 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@riversand963 merged this pull request in cfcf045. |
facebook#5293) Summary: The ObjectRegistry class replaces the Registrar and NewCustomObjects. Objects are registered with the registry by Type (the class must implement the static const char *Type() method). This change is necessary for a few reasons: - By having a class (rather than static template instances), the class can be passed between compilation units, meaning that objects could be registered and shared from a dynamic library with an executable. - By having a class with instances, different units could have different objects registered. This could be useful if, for example, one Option allowed for a dynamic library and one did not. When combined with some other PRs (being able to load shared libraries, a Configurable interface to configure objects to/from string), this code will allow objects in external shared libraries to be added to a RocksDB image at run-time, rather than requiring every new extension to be built into the main library and called explicitly by every program. Test plan (on riversand963's devserver) ``` $COMPILE_WITH_ASAN=1 make -j32 all && sleep 1 && make check ``` All tests pass. Pull Request resolved: facebook#5293 Differential Revision: D16363396 Pulled By: riversand963 fbshipit-source-id: fbe4acb615bfc11103eef40a0b288845791c0180
…… (#5293) Summary: The ObjectRegistry class replaces the Registrar and NewCustomObjects. Objects are registered with the registry by Type (the class must implement the static const char *Type() method). This change is necessary for a few reasons: - By having a class (rather than static template instances), the class can be passed between compilation units, meaning that objects could be registered and shared from a dynamic library with an executable. - By having a class with instances, different units could have different objects registered. This could be useful if, for example, one Option allowed for a dynamic library and one did not. When combined with some other PRs (being able to load shared libraries, a Configurable interface to configure objects to/from string), this code will allow objects in external shared libraries to be added to a RocksDB image at run-time, rather than requiring every new extension to be built into the main library and called explicitly by every program. Test plan (on riversand963's devserver) ``` $COMPILE_WITH_ASAN=1 make -j32 all && sleep 1 && make check ``` All tests pass. Pull Request resolved: facebook/rocksdb#5293 Differential Revision: D16363396 Pulled By: riversand963 fbshipit-source-id: fbe4acb615bfc11103eef40a0b288845791c0180 Signed-off-by: Changlong Chen <levisonchen@live.cn>
…… (#5293) Summary: The ObjectRegistry class replaces the Registrar and NewCustomObjects. Objects are registered with the registry by Type (the class must implement the static const char *Type() method). This change is necessary for a few reasons: - By having a class (rather than static template instances), the class can be passed between compilation units, meaning that objects could be registered and shared from a dynamic library with an executable. - By having a class with instances, different units could have different objects registered. This could be useful if, for example, one Option allowed for a dynamic library and one did not. When combined with some other PRs (being able to load shared libraries, a Configurable interface to configure objects to/from string), this code will allow objects in external shared libraries to be added to a RocksDB image at run-time, rather than requiring every new extension to be built into the main library and called explicitly by every program. Test plan (on riversand963's devserver) ``` $COMPILE_WITH_ASAN=1 make -j32 all && sleep 1 && make check ``` All tests pass. Pull Request resolved: facebook/rocksdb#5293 Differential Revision: D16363396 Pulled By: riversand963 fbshipit-source-id: fbe4acb615bfc11103eef40a0b288845791c0180 Signed-off-by: Changlong Chen <levisonchen@live.cn>
The ObjectRegistry class replaces the Registrar and NewCustomObjects. Objects are registered with the registry by Type (the class must implement the static const char *Type() method).
This change is necessary for a few reasons:
When combined with some other PRs (being able to load shared libraries, a Configurable interface to configure objects to/from string), this code will allow objects in external shared libraries to be added to a RocksDB image at run-time, rather than requiring every new extension to be built into the main library and called explicitly by every program.
Test plan (on @riversand963's devserver)
All tests pass.