Changed file name limits to adapt to system limits + minor changes

This commit is contained in:
Celine Mercier
2016-09-22 18:05:07 +02:00
parent b083745f56
commit b408a4f6eb
6 changed files with 43 additions and 23 deletions

View File

@ -30,7 +30,7 @@
#include "encode.h"
#define MAX_NB_OF_AVLS_IN_GROUP (100) /**< The maximum number of AVL trees in a group. // TODO discuss
#define MAX_NB_OF_AVLS_IN_GROUP (1000) /**< The maximum number of AVL trees in a group. // TODO discuss
*/
#define MAX_NODE_COUNT_PER_AVL (10000000) /**< The maximum number of nodes in an AVL tree.
* Only used to decide when to create a new AVL in a group, and to initialize the bloom filter // TODO discuss.
@ -42,7 +42,7 @@
*/
#define AVL_MAX_DEPTH (1024) /**< The maximum depth of an AVL tree. Used to save paths through the tree.
*/
#define AVL_MAX_NAME (1024) /**< The maximum length of an AVL tree name.
#define AVL_MAX_NAME (250) /**< The maximum length of an AVL tree name.
*/
#define AVL_GROWTH_FACTOR (2) /**< The growth factor when an AVL tree is enlarged.
*/

View File

@ -26,7 +26,7 @@
#include "obitypes.h"
#define OBIDMS_MAX_NAME (2048) /**< The maximum length of an OBIDMS name.
#define OBIDMS_MAX_NAME (247) /**< The maximum length of an OBIDMS name.
*/
#define INDEXER_DIR_NAME "OBIBLOB_INDEXERS" /**< The name of the Obiblob indexer directory.
*/
@ -34,11 +34,11 @@
*/
#define TAXONOMY_DIR_NAME "TAXONOMY" /**< The name of the taxonomy directory.
*/
#define MAX_NB_OPENED_COLUMNS (100) /**< The maximum number of columns open at the same time.
#define MAX_NB_OPENED_COLUMNS (1000) /**< The maximum number of columns open at the same time.
*/
#define MAX_NB_OPENED_INDEXERS (100) /**< The maximum number of indexers open at the same time.
#define MAX_NB_OPENED_INDEXERS (1000) /**< The maximum number of indexers open at the same time.
*/
#define MAX_PATH_LEN 4096 /**< Maximum length for the character string defining a
#define MAX_PATH_LEN (1024) /**< Maximum length for the character string defining a
* file or directory path.
*/

View File

@ -28,7 +28,7 @@
#include "obiblob_indexer.h"
#define ELEMENTS_NAMES_MAX (2048) /**< The maximum length of the list of elements names.
#define ELEMENTS_NAMES_MAX (2048) /**< The maximum length of the list of elements names. // TODO Discuss
*/
#define COLUMN_GROWTH_FACTOR (2) /**< The growth factor when a column is enlarged.
*/

View File

@ -1645,7 +1645,6 @@ int obi_view_add_column(Obiview_p view,
int i;
OBIDMS_column_p column;
OBIDMS_column_p column_buffer;
OBIDMS_column_p current_line_selection;
// Check that the view is not read-only
if (view->read_only)
@ -1702,19 +1701,24 @@ int obi_view_add_column(Obiview_p view,
if (create)
{ // Create column
column = obi_create_column(view->dms, column_name, data_type, nb_lines, nb_elements_per_line, elements_names, indexer_name, associated_column_name, associated_column_version, comments);
if (column == NULL)
{
obidebug(1, "\nError creating a column to add to a view");
return -1;
}
(column->header)->lines_used = nb_lines;
}
else
{ // Open column
// TODO do we require that the column's line count is equal to the view's line count?
// or do we enlarge the column or the view as needed?
column = obi_open_column(view->dms, column_name, version_number);
}
if (column == NULL)
{
obidebug(1, "\nError creating or opening a column to add to a view");
return -1;
if (column == NULL)
{
obidebug(1, "\nError opening a column to add to a view");
return -1;
}
// Check that the column's line count is equal to the view's line count if there is no line selection.
// TODO But what if there is a line selection ??? imo should just check that col_line_count > line_selection_count
//if ()
}
// Store column pointer in the view structure

View File

@ -28,7 +28,7 @@
#include "hashtable.h"
#define OBIVIEW_NAME_MAX_LENGTH (255) /**< The maximum length of an OBIDMS view name.
#define OBIVIEW_NAME_MAX_LENGTH (249) /**< The maximum length of an OBIDMS view name, without the extension.
*/
#define VIEW_TYPE_MAX_LENGTH (1024) /**< The maximum length of the type name of a view.
*/