diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-02-26 14:54:29 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2013-02-26 14:54:29 +1100 |
commit | fc9b6445c48746a6a284f73c0a15b3896904bd95 (patch) | |
tree | 483cb99928181815cf02d43c53df14095a02f6c2 /src/include/schema.h | |
parent | 1dde6b081ce1702d913debfb626ecfc7eaa1d60b (diff) | |
download | mongo-fc9b6445c48746a6a284f73c0a15b3896904bd95.tar.gz |
Add a reference count to tables, only free if the table is not in use.
Diffstat (limited to 'src/include/schema.h')
-rw-r--r-- | src/include/schema.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/include/schema.h b/src/include/schema.h index 20bdcb82b86..68eb046e815 100644 --- a/src/include/schema.h +++ b/src/include/schema.h @@ -5,12 +5,12 @@ * See the file LICENSE for redistribution information. */ -/* Character constants for projection plans. */ -#define WT_PROJ_KEY 'k' /* Go to key in cursor <arg>. */ -#define WT_PROJ_NEXT 'n' /* Process the next item (<arg> repeats). */ -#define WT_PROJ_REUSE 'r' /* Reuse the previous item (<arg> repeats). */ -#define WT_PROJ_SKIP 's' /* Skip a column in the cursor (<arg> repeats). */ -#define WT_PROJ_VALUE 'v' /* Go to the value in cursor <arg>. */ +/* Character constants for projection plans */ +#define WT_PROJ_KEY 'k' /* Go to key in cursor <arg> */ +#define WT_PROJ_NEXT 'n' /* Process the next item (<arg> repeats) */ +#define WT_PROJ_REUSE 'r' /* Reuse the previous item (<arg> repeats) */ +#define WT_PROJ_SKIP 's' /* Skip a column in the cursor (<arg> repeats) */ +#define WT_PROJ_VALUE 'v' /* Go to the value in cursor <arg> */ struct __wt_colgroup { const char *name; /* Logical name */ @@ -32,7 +32,7 @@ struct __wt_index { const char *key_plan; /* Key projection plan */ const char *value_plan; /* Value projection plan */ - int need_value; /* Index must have a non-empty value. */ + int need_value; /* Index must have a non-empty value */ }; /* @@ -57,7 +57,8 @@ struct __wt_table { int cg_complete, idx_complete, is_simple; u_int ncolgroups, nindices, nkey_columns; - uint32_t schema_gen; /* Cached schema generation number. */ + uint32_t refcnt; /* Number of open cursors */ + uint32_t schema_gen; /* Cached schema generation number */ }; /* |