schema: Enable shared_from_this()
This commit is contained in:
@@ -322,7 +322,7 @@ extern template class serializer<column_mapping>;
|
||||
* Effectively immutable.
|
||||
* Not safe to access across cores because of shared_ptr's.
|
||||
*/
|
||||
class schema final {
|
||||
class schema final : public enable_lw_shared_from_this<schema> {
|
||||
private:
|
||||
// More complex fields are derived from these inside rebuild().
|
||||
// Contains only fields which can be safely default-copied.
|
||||
|
||||
@@ -93,7 +93,7 @@ class scylla_column_families(gdb.Command):
|
||||
cfs = db['_column_families']
|
||||
for (key, value) in list_unordered_map(cfs):
|
||||
value = value['_p']['_value'] # it's a lw_shared_ptr
|
||||
schema = value['_schema']['_p']['_value']
|
||||
schema = value['_schema']['_p'].reinterpret_cast(gdb.lookup_type('schema').pointer())
|
||||
name = str(schema['_raw']['_ks_name']) + '/' + str(schema['_raw']['_cf_name'])
|
||||
schema_version = str(schema['_raw']['_version'])
|
||||
gdb.write('{:5} {} v={} {:45} (column_family*){}\n'.format(shard, key, schema_version, name, value.address))
|
||||
|
||||
Reference in New Issue
Block a user