-
Notifications
You must be signed in to change notification settings - Fork 32
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
ManagedObjectBackends for HSM #149
base: master
Are you sure you want to change the base?
Conversation
bcb85fd
to
308b5bb
Compare
include/core/jmanagedbackends.h
Outdated
**/ | ||
gboolean (*process_access)(gpointer policy_data, const gchar* namespace, const gchar* path, guint obj_id, guint tier, JObjectBackendAccessTypes access, gconstpointer data); | ||
|
||
/// short processing period to match new object to a storage tier |
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.
Please fix documentation style.
include/core/jmanagedbackends.h
Outdated
|
||
/** | ||
* Fetches backend where a given object is stored. Also blocks migration for that object. | ||
* Use j_backend_managed_object_open() to allow migration again. If the object not already exists |
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.
Did you mean j_backend_managed_close
?
include/core/jmanagedbackends.h
Outdated
gboolean j_backend_managed_object_migrate(JManagedBackends* this, const gchar* namespace, const gchar* path, guint dest); | ||
|
||
/** | ||
* If resources a free migrates the specified object to the destination tier, if not return. |
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.
are free
include/core/jmanagedbackends.h
Outdated
|
||
/** | ||
* Stops all migrations at all backends, used for maintenance. | ||
* use j_backend_stack_unlock() to re-enable migration |
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.
j_backend_managed_unlock
include/core/jmanagedbackends.h
Outdated
* Stops all migrations at all backends, used for maintenance. | ||
* use j_backend_stack_unlock() to re-enable migration | ||
* | ||
* \attention changing object locations or editing them might crashes the policy! |
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.
might crash
lib/core/jmanagedbackends.c
Outdated
#include <sys/select.h> | ||
#include <sys/time.h> | ||
|
||
#define EXE(cmd, ...) \ |
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 would like to have error checking macros on a global level instead of per module. It's probably better to move this one?
gint write_access; ///< true if a write operation is scheduled or running | ||
} RWSpinLock; | ||
|
||
/// acquired a read 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.
Please check doxygen comment style. (Also for following functions in this file.)
} | ||
|
||
/// proxy function | ||
gchar const* const* j_configuration_get_object_tiers(JConfiguration* config); |
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.
Style
lib/core/jmanagedbackends.c
Outdated
"failed to init kv for backend manager!"); | ||
this->kv_semantics = j_semantics_new(J_SEMANTICS_TEMPLATE_DEFAULT); | ||
|
||
// this->log.filename = j_configuration_get_object_policy_log_file(config); |
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.
Why is this line commented?
g_array_unref(this->rw_spin_locks); | ||
g_module_close(this->module); | ||
free(this); | ||
|
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.
There was a KV server module loaded in init. Should this one be freed as well?
lib/core/jmanagedbackends.c
Outdated
return TRUE; | ||
} | ||
|
||
/// \todo doku |
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.
Please add documentation (also below).
include/core/jmanagedbackends.h
Outdated
/** | ||
* Fetches backend where a given object is stored. Also blocks migration for that object. | ||
* Use j_backend_managed_object_open() to allow migration again. If the object not already exists | ||
* use j_backend_managed_object_create() to create it |
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.
open does also create if non-existent as implemented in *.c. Maybe this should be mentioned here. Otherwise someone could think open would fail on non-existant objects (and in worst-case use it as existence check).
EXE(kv_get(this, namespace, path, &entry), | ||
"failed to fetch kventry"); | ||
return entry->backend_id; | ||
end: |
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.
Other parts of JULEA use _error
as name for error handling label. Please change to prepare some unified error handling in JULEA.
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 in cases below.
Looks good to me, overall. Some remarks:
|
One general question: |
This module makes different ObjectBackends on one server appear to the outside as one ObjectServer, for distributed objects, they will be stripped between the servers as before, and are not effected by this module. |
46934e2
to
ae005e6
Compare
Add JManagedBackends a Object Backeand which is at runtime composeble of multiple Object Backends.
JManagedBacends uses a policy module which can be used for HSM on that different object backends.