/[LeafOK_CVS]/lbbs/src/section_list.c
ViewVC logotype

Diff of /lbbs/src/section_list.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 by sysadm, Sun May 25 10:43:27 2025 UTC Revision 1.23 by sysadm, Mon May 26 03:20:39 2025 UTC
# Line 41  union semun Line 41  union semun
41  };  };
42  #endif // #ifdef _SEM_SEMUN_UNDEFINED  #endif // #ifdef _SEM_SEMUN_UNDEFINED
43    
44    #define SECTION_TRY_LOCK_WAIT_TIME 1 // second
45    #define SECTION_TRY_LOCK_TIMES 10
46    
47  #define ARTICLE_BLOCK_PER_SHM 400                 // sizeof(ARTICLE_BLOCK) * ARTICLE_BLOCK_PER_SHM is the size of each shm segment to allocate  #define ARTICLE_BLOCK_PER_SHM 400                 // sizeof(ARTICLE_BLOCK) * ARTICLE_BLOCK_PER_SHM is the size of each shm segment to allocate
48  #define ARTICLE_BLOCK_SHM_COUNT_LIMIT 200 // limited by length (8-bit) of proj_id in ftok(path, proj_id)  #define ARTICLE_BLOCK_SHM_COUNT_LIMIT 200 // limited by length (8-bit) of proj_id in ftok(path, proj_id)
49  #define ARTICLE_BLOCK_PER_POOL (ARTICLE_BLOCK_PER_SHM * ARTICLE_BLOCK_SHM_COUNT_LIMIT)  #define ARTICLE_BLOCK_PER_POOL (ARTICLE_BLOCK_PER_SHM * ARTICLE_BLOCK_SHM_COUNT_LIMIT)
# Line 52  union semun Line 55  union semun
55  struct article_block_t  struct article_block_t
56  {  {
57          ARTICLE articles[ARTICLE_PER_BLOCK];          ARTICLE articles[ARTICLE_PER_BLOCK];
58          int32_t article_count;          int article_count;
59          struct article_block_t *p_next_block;          struct article_block_t *p_next_block;
60  };  };
61  typedef struct article_block_t ARTICLE_BLOCK;  typedef struct article_block_t ARTICLE_BLOCK;
62    
 struct article_block_shm_t  
 {  
         int shmid;  
         void *p_shm;  
 };  
 typedef struct article_block_shm_t ARTICLE_BLOCK_SHM;  
   
63  struct article_block_pool_t  struct article_block_pool_t
64  {  {
65          ARTICLE_BLOCK_SHM shm_pool[ARTICLE_BLOCK_SHM_COUNT_LIMIT];          int shmid;
66            struct
67            {
68                    int shmid;
69                    void *p_shm;
70            } shm_pool[ARTICLE_BLOCK_SHM_COUNT_LIMIT];
71          int shm_count;          int shm_count;
72          ARTICLE_BLOCK *p_block_free_list;          ARTICLE_BLOCK *p_block_free_list;
73          ARTICLE_BLOCK *p_block[ARTICLE_BLOCK_PER_POOL];          ARTICLE_BLOCK *p_block[ARTICLE_BLOCK_PER_POOL];
74          int32_t block_count;          int block_count;
75  };  };
76  typedef struct article_block_pool_t ARTICLE_BLOCK_POOL;  typedef struct article_block_pool_t ARTICLE_BLOCK_POOL;
77    
 static int article_block_pool_shmid;  
78  static ARTICLE_BLOCK_POOL *p_article_block_pool = NULL;  static ARTICLE_BLOCK_POOL *p_article_block_pool = NULL;
79    
80  static int section_list_pool_semid;  struct section_list_pool_t
81  static int section_list_pool_shmid;  {
82  static SECTION_LIST *p_section_list_pool = NULL;          int shmid;
83            SECTION_LIST sections[BBS_max_section];
84  static int section_list_count = 0;          int section_count;
85  static TRIE_NODE *p_trie_dict_section_by_name = NULL;          int semid;
86  static TRIE_NODE *p_trie_dict_section_by_sid = NULL;          TRIE_NODE *p_trie_dict_section_by_name;
87            TRIE_NODE *p_trie_dict_section_by_sid;
88    };
89    typedef struct section_list_pool_t SECTION_LIST_POOL;
90    
91    static SECTION_LIST_POOL *p_section_list_pool = NULL;
92    
93  int article_block_init(const char *filename, int block_count)  int article_block_init(const char *filename, int block_count)
94  {  {
# Line 132  int article_block_init(const char *filen Line 137  int article_block_init(const char *filen
137                  return -3;                  return -3;
138          }          }
139    
         article_block_pool_shmid = shmid;  
140          p_article_block_pool = p_shm;          p_article_block_pool = p_shm;
141            p_article_block_pool->shmid = shmid;
142    
143          p_article_block_pool->shm_count = 0;          p_article_block_pool->shm_count = 0;
144          pp_block_next = &(p_article_block_pool->p_block_free_list);          pp_block_next = &(p_article_block_pool->p_block_free_list);
# Line 196  int article_block_init(const char *filen Line 201  int article_block_init(const char *filen
201    
202  void article_block_cleanup(void)  void article_block_cleanup(void)
203  {  {
204            int shmid;
205    
206          if (p_article_block_pool == NULL)          if (p_article_block_pool == NULL)
207          {          {
208                  return;                  return;
# Line 214  void article_block_cleanup(void) Line 221  void article_block_cleanup(void)
221                  }                  }
222          }          }
223    
224            shmid = p_article_block_pool->shmid;
225    
226          if (shmdt(p_article_block_pool) == -1)          if (shmdt(p_article_block_pool) == -1)
227          {          {
228                  log_error("shmdt(shmid = %d) error (%d)\n", article_block_pool_shmid, errno);                  log_error("shmdt(shmid = %d) error (%d)\n", shmid, errno);
229          }          }
230    
231          if (shmctl(article_block_pool_shmid, IPC_RMID, NULL) == -1)          if (shmctl(shmid, IPC_RMID, NULL) == -1)
232          {          {
233                  log_error("shmctl(shmid = %d, IPC_RMID) error (%d)\n", article_block_pool_shmid, errno);                  log_error("shmctl(shmid = %d, IPC_RMID) error (%d)\n", shmid, errno);
234          }          }
235    
236          p_article_block_pool = NULL;          p_article_block_pool = NULL;
# Line 372  extern int section_list_init(const char Line 381  extern int section_list_init(const char
381          union semun arg;          union semun arg;
382          int i;          int i;
383    
384          if (p_section_list_pool == NULL || p_trie_dict_section_by_name == NULL || p_trie_dict_section_by_sid == NULL)          if (p_section_list_pool != NULL)
385          {          {
386                  section_list_cleanup();                  section_list_cleanup();
387          }          }
# Line 385  extern int section_list_init(const char Line 394  extern int section_list_init(const char
394                  return -3;                  return -3;
395          }          }
396    
397            // Allocate shared memory
398            size = sizeof(SECTION_LIST_POOL);
399            shmid = shmget(key, size, IPC_CREAT | IPC_EXCL | 0600);
400            if (shmid == -1)
401            {
402                    log_error("shmget(section_list_pool_shm, size = %d) error (%d)\n", size, errno);
403                    return -3;
404            }
405            p_shm = shmat(shmid, NULL, 0);
406            if (p_shm == (void *)-1)
407            {
408                    log_error("shmat(shmid = %d) error (%d)\n", shmid, errno);
409                    return -3;
410            }
411    
412            p_section_list_pool = p_shm;
413            p_section_list_pool->shmid = shmid;
414            p_section_list_pool->section_count = 0;
415    
416            // Allocate semaphore as section locks
417          size = 2 * (BBS_max_section + 1); // r_sem and w_sem per section, the last pair for all sections          size = 2 * (BBS_max_section + 1); // r_sem and w_sem per section, the last pair for all sections
418          semid = semget(key, (int)size, IPC_CREAT | IPC_EXCL | 0600);          semid = semget(key, (int)size, IPC_CREAT | IPC_EXCL | 0600);
419          if (semid == -1)          if (semid == -1)
# Line 404  extern int section_list_init(const char Line 433  extern int section_list_init(const char
433                  }                  }
434          }          }
435    
436          section_list_pool_semid = semid;          p_section_list_pool->semid = semid;
437    
438          size = sizeof(SECTION_LIST) * BBS_max_section;          p_section_list_pool->p_trie_dict_section_by_name = trie_dict_create();
439          shmid = shmget(key, size, IPC_CREAT | IPC_EXCL | 0600);          if (p_section_list_pool->p_trie_dict_section_by_name == NULL)
         if (shmid == -1)  
         {  
                 log_error("shmget(section_list_pool_shm, size = %d) error (%d)\n", size, errno);  
                 return -3;  
         }  
         p_shm = shmat(shmid, NULL, 0);  
         if (p_shm == (void *)-1)  
         {  
                 log_error("shmat(shmid = %d) error (%d)\n", shmid, errno);  
                 return -3;  
         }  
   
         section_list_pool_shmid = shmid;  
         p_section_list_pool = p_shm;  
         section_list_count = 0;  
   
         p_trie_dict_section_by_name = trie_dict_create();  
         if (p_trie_dict_section_by_name == NULL)  
440          {          {
441                  log_error("trie_dict_create() OOM\n", BBS_max_section);                  log_error("trie_dict_create() OOM\n", BBS_max_section);
442                  return -2;                  return -2;
443          }          }
444    
445          p_trie_dict_section_by_sid = trie_dict_create();          p_section_list_pool->p_trie_dict_section_by_sid = trie_dict_create();
446          if (p_trie_dict_section_by_sid == NULL)          if (p_section_list_pool->p_trie_dict_section_by_sid == NULL)
447          {          {
448                  log_error("trie_dict_create() OOM\n", BBS_max_section);                  log_error("trie_dict_create() OOM\n", BBS_max_section);
449                  return -2;                  return -2;
# Line 460  SECTION_LIST *section_list_create(int32_ Line 471  SECTION_LIST *section_list_create(int32_
471          SECTION_LIST *p_section;          SECTION_LIST *p_section;
472          char sid_str[SID_STR_LEN];          char sid_str[SID_STR_LEN];
473    
474          if (p_section_list_pool == NULL || p_trie_dict_section_by_name == NULL || p_trie_dict_section_by_sid == NULL)          if (p_section_list_pool == NULL)
475          {          {
476                  log_error("session_list_pool not initialized\n");                  log_error("session_list_pool not initialized\n");
477                  return NULL;                  return NULL;
478          }          }
479    
480          if (section_list_count >= BBS_max_section)          if (p_section_list_pool->section_count >= BBS_max_section)
481          {          {
482                  log_error("section_list_count exceed limit %d >= %d\n", section_list_count, BBS_max_section);                  log_error("section_count reach limit %d >= %d\n", p_section_list_pool->section_count, BBS_max_section);
483                  return NULL;                  return NULL;
484          }          }
485    
486          sid_to_str(sid, sid_str);          sid_to_str(sid, sid_str);
487    
488          p_section = p_section_list_pool + section_list_count;          p_section = p_section_list_pool->sections + p_section_list_pool->section_count;
489    
490          p_section->sid = sid;          p_section->sid = sid;
491    
# Line 487  SECTION_LIST *section_list_create(int32_ Line 498  SECTION_LIST *section_list_create(int32_
498          strncpy(p_section->master_name, master_name, sizeof(p_section->master_name - 1));          strncpy(p_section->master_name, master_name, sizeof(p_section->master_name - 1));
499          p_section->master_name[sizeof(p_section->master_name - 1)] = '\0';          p_section->master_name[sizeof(p_section->master_name - 1)] = '\0';
500    
501          if (trie_dict_set(p_trie_dict_section_by_name, sname, section_list_count) != 1)          if (trie_dict_set(p_section_list_pool->p_trie_dict_section_by_name, sname, p_section_list_pool->section_count) != 1)
502          {          {
503                  log_error("trie_dict_set(section, %s, %d) error\n", sname, section_list_count);                  log_error("trie_dict_set(section, %s, %d) error\n", sname, p_section_list_pool->section_count);
504                  return NULL;                  return NULL;
505          }          }
506    
507          if (trie_dict_set(p_trie_dict_section_by_sid, sid_str, section_list_count) != 1)          if (trie_dict_set(p_section_list_pool->p_trie_dict_section_by_sid, sid_str, p_section_list_pool->section_count) != 1)
508          {          {
509                  log_error("trie_dict_set(section, %d, %d) error\n", sid, section_list_count);                  log_error("trie_dict_set(section, %d, %d) error\n", sid, p_section_list_pool->section_count);
510                  return NULL;                  return NULL;
511          }          }
512    
513          section_list_reset_articles(p_section);          section_list_reset_articles(p_section);
514    
515          section_list_count++;          p_section_list_pool->section_count++;
516    
517          return p_section;          return p_section;
518  }  }
# Line 521  void section_list_reset_articles(SECTION Line 532  void section_list_reset_articles(SECTION
532    
533  void section_list_cleanup(void)  void section_list_cleanup(void)
534  {  {
535          if (p_trie_dict_section_by_name != NULL)          int shmid;
536    
537            if (p_section_list_pool == NULL)
538          {          {
539                  trie_dict_destroy(p_trie_dict_section_by_name);                  return;
                 p_trie_dict_section_by_name = NULL;  
540          }          }
541    
542          if (p_trie_dict_section_by_sid != NULL)          if (p_section_list_pool->p_trie_dict_section_by_name != NULL)
543          {          {
544                  trie_dict_destroy(p_trie_dict_section_by_sid);                  trie_dict_destroy(p_section_list_pool->p_trie_dict_section_by_name);
545                  p_trie_dict_section_by_sid = NULL;                  p_section_list_pool->p_trie_dict_section_by_name = NULL;
546            }
547    
548            if (p_section_list_pool->p_trie_dict_section_by_sid != NULL)
549            {
550                    trie_dict_destroy(p_section_list_pool->p_trie_dict_section_by_sid);
551                    p_section_list_pool->p_trie_dict_section_by_sid = NULL;
552          }          }
553    
554          if (p_section_list_pool != NULL)          if (p_section_list_pool != NULL)
555          {          {
556                  if (shmdt(p_section_list_pool) == -1)                  if (semctl(p_section_list_pool->semid, 0, IPC_RMID) == -1)
557                  {                  {
558                          log_error("shmdt(shmid = %d) error (%d)\n", section_list_pool_shmid, errno);                          log_error("semctl(semid = %d, IPC_RMID) error (%d)\n", p_section_list_pool->semid, errno);
559                  }                  }
                 p_section_list_pool = NULL;  
560    
561                  if (shmctl(section_list_pool_shmid, IPC_RMID, NULL) == -1)                  shmid = p_section_list_pool->shmid;
562    
563                    if (shmdt(p_section_list_pool) == -1)
564                  {                  {
565                          log_error("shmctl(shmid = %d, IPC_RMID) error (%d)\n", section_list_pool_shmid, errno);                          log_error("shmdt(shmid = %d) error (%d)\n", shmid, errno);
566                  }                  }
567    
568                  if (semctl(section_list_pool_semid, 0, IPC_RMID) == -1)                  if (shmctl(shmid, IPC_RMID, NULL) == -1)
569                  {                  {
570                          log_error("semctl(semid = %d, IPC_RMID) error (%d)\n", section_list_pool_semid, errno);                          log_error("shmctl(shmid = %d, IPC_RMID) error (%d)\n", shmid, errno);
571                  }                  }
         }  
572    
573          section_list_count = 0;                  p_section_list_pool = NULL;
574            }
575  }  }
576    
577  SECTION_LIST *section_list_find_by_name(const char *sname)  SECTION_LIST *section_list_find_by_name(const char *sname)
578  {  {
579          int64_t index;          int64_t index;
580    
581          if (p_section_list_pool == NULL || p_trie_dict_section_by_name == NULL)          if (p_section_list_pool == NULL)
582          {          {
583                  log_error("section_list not initialized\n");                  log_error("section_list not initialized\n");
584                  return NULL;                  return NULL;
585          }          }
586    
587          if (trie_dict_get(p_trie_dict_section_by_name, sname, &index) != 1)          if (trie_dict_get(p_section_list_pool->p_trie_dict_section_by_name, sname, &index) != 1)
588          {          {
589                  log_error("trie_dict_get(section, %s) error\n", sname);                  log_error("trie_dict_get(section, %s) error\n", sname);
590                  return NULL;                  return NULL;
591          }          }
592    
593          return (p_section_list_pool + index);          return (p_section_list_pool->sections + index);
594  }  }
595    
596  SECTION_LIST *section_list_find_by_sid(int32_t sid)  SECTION_LIST *section_list_find_by_sid(int32_t sid)
# Line 579  SECTION_LIST *section_list_find_by_sid(i Line 598  SECTION_LIST *section_list_find_by_sid(i
598          int64_t index;          int64_t index;
599          char sid_str[SID_STR_LEN];          char sid_str[SID_STR_LEN];
600    
601          if (p_section_list_pool == NULL || p_trie_dict_section_by_sid == NULL)          if (p_section_list_pool == NULL)
602          {          {
603                  log_error("section_list not initialized\n");                  log_error("section_list not initialized\n");
604                  return NULL;                  return NULL;
# Line 587  SECTION_LIST *section_list_find_by_sid(i Line 606  SECTION_LIST *section_list_find_by_sid(i
606    
607          sid_to_str(sid, sid_str);          sid_to_str(sid, sid_str);
608    
609          if (trie_dict_get(p_trie_dict_section_by_sid, sid_str, &index) != 1)          if (trie_dict_get(p_section_list_pool->p_trie_dict_section_by_sid, sid_str, &index) != 1)
610          {          {
611                  log_error("trie_dict_get(section, %d) error\n", sid);                  log_error("trie_dict_get(section, %d) error\n", sid);
612                  return NULL;                  return NULL;
613          }          }
614    
615          return (p_section_list_pool + index);          return (p_section_list_pool->sections + index);
616  }  }
617    
618  int section_list_append_article(SECTION_LIST *p_section, const ARTICLE *p_article_src)  int section_list_append_article(SECTION_LIST *p_section, const ARTICLE *p_article_src)
# Line 1074  int section_list_move_topic(SECTION_LIST Line 1093  int section_list_move_topic(SECTION_LIST
1093          move_article_count = article_count_of_topic(aid);          move_article_count = article_count_of_topic(aid);
1094          if (move_article_count <= 0)          if (move_article_count <= 0)
1095          {          {
1096                  log_error("section_list_count_of_topic_articles(aid = %d) <= 0\n", aid);                  log_error("article_count_of_topic(aid = %d) <= 0\n", aid);
1097                  return -2;                  return -2;
1098          }          }
1099    
# Line 1240  int get_section_index(SECTION_LIST *p_se Line 1259  int get_section_index(SECTION_LIST *p_se
1259          }          }
1260          else          else
1261          {          {
1262                  index = (int)(p_section - p_section_list_pool);                  index = (int)(p_section - p_section_list_pool->sections);
1263                  if (index < 0 || index >= BBS_max_section)                  if (index < 0 || index >= BBS_max_section)
1264                  {                  {
1265                          log_error("get_section_index(%d) error: index out of range\n", index);                          log_error("get_section_index(%d) error: index out of range\n", index);
# Line 1289  int section_list_try_rd_lock(SECTION_LIS Line 1308  int section_list_try_rd_lock(SECTION_LIS
1308          timeout.tv_sec = wait_sec;          timeout.tv_sec = wait_sec;
1309          timeout.tv_nsec = 0;          timeout.tv_nsec = 0;
1310    
1311          ret = semtimedop(section_list_pool_semid, sops, (index == BBS_max_section ? 2 : 4), &timeout);          ret = semtimedop(p_section_list_pool->semid, sops, (index == BBS_max_section ? 2 : 4), &timeout);
1312          if (ret == -1 && errno != EAGAIN && errno != EINTR)          if (ret == -1 && errno != EAGAIN && errno != EINTR)
1313          {          {
1314                  log_error("semtimedop(index = %d, lock read) error %d\n", index, errno);                  log_error("semtimedop(index = %d, lock read) error %d\n", index, errno);
# Line 1326  int section_list_try_rw_lock(SECTION_LIS Line 1345  int section_list_try_rw_lock(SECTION_LIS
1345          timeout.tv_sec = wait_sec;          timeout.tv_sec = wait_sec;
1346          timeout.tv_nsec = 0;          timeout.tv_nsec = 0;
1347    
1348          ret = semtimedop(section_list_pool_semid, sops, 3, &timeout);          ret = semtimedop(p_section_list_pool->semid, sops, 3, &timeout);
1349          if (ret == -1 && errno != EAGAIN && errno != EINTR)          if (ret == -1 && errno != EAGAIN && errno != EINTR)
1350          {          {
1351                  log_error("semtimedop(index = %d, lock write) error %d\n", index, errno);                  log_error("semtimedop(index = %d, lock write) error %d\n", index, errno);
# Line 1358  int section_list_rd_unlock(SECTION_LIST Line 1377  int section_list_rd_unlock(SECTION_LIST
1377                  sops[1].sem_flg = IPC_NOWAIT | SEM_UNDO; // no wait                  sops[1].sem_flg = IPC_NOWAIT | SEM_UNDO; // no wait
1378          }          }
1379    
1380          ret = semop(section_list_pool_semid, sops, (index == BBS_max_section ? 1 : 2));          ret = semop(p_section_list_pool->semid, sops, (index == BBS_max_section ? 1 : 2));
1381          if (ret == -1 && errno != EAGAIN && errno != EINTR)          if (ret == -1 && errno != EAGAIN && errno != EINTR)
1382          {          {
1383                  log_error("semop(index = %d, unlock read) error %d\n", index, errno);                  log_error("semop(index = %d, unlock read) error %d\n", index, errno);
# Line 1383  int section_list_rw_unlock(SECTION_LIST Line 1402  int section_list_rw_unlock(SECTION_LIST
1402          sops[0].sem_op = -1;                                                       // unlock          sops[0].sem_op = -1;                                                       // unlock
1403          sops[0].sem_flg = IPC_NOWAIT | SEM_UNDO;                   // no wait          sops[0].sem_flg = IPC_NOWAIT | SEM_UNDO;                   // no wait
1404    
1405          ret = semop(section_list_pool_semid, sops, 1);          ret = semop(p_section_list_pool->semid, sops, 1);
1406          if (ret == -1 && errno != EAGAIN && errno != EINTR)          if (ret == -1 && errno != EAGAIN && errno != EINTR)
1407          {          {
1408                  log_error("semop(index = %d, unlock write) error %d\n", index, errno);                  log_error("semop(index = %d, unlock write) error %d\n", index, errno);
1409          }          }
1410    
1411          return ret;          return ret;
1412    }
1413    
1414    int section_list_rd_lock(SECTION_LIST *p_section)
1415    {
1416            int timer = 0;
1417            int sid = (p_section == NULL ? 0 : p_section->sid);
1418            int ret = -1;
1419    
1420            while (!SYS_server_exit)
1421            {
1422                    ret = section_list_try_rd_lock(p_section, SECTION_TRY_LOCK_WAIT_TIME);
1423                    if (ret == 0) // success
1424                    {
1425                            break;
1426                    }
1427                    else if (errno == EAGAIN || errno == EINTR) // retry
1428                    {
1429                            timer++;
1430                            if (timer % SECTION_TRY_LOCK_TIMES == 0)
1431                            {
1432                                    log_error("section_list_rd_lock() tried %d times on section %d\n", sid, timer);
1433                            }
1434                    }
1435                    else // failed
1436                    {
1437                            log_error("section_list_rd_lock() failed on section %d\n", sid);
1438                            break;
1439                    }
1440            }
1441    
1442            return ret;
1443    }
1444    
1445    int section_list_rw_lock(SECTION_LIST *p_section)
1446    {
1447            int timer = 0;
1448            int sid = (p_section == NULL ? 0 : p_section->sid);
1449            int ret = -1;
1450    
1451            while (!SYS_server_exit)
1452            {
1453                    ret = section_list_try_rw_lock(p_section, SECTION_TRY_LOCK_WAIT_TIME);
1454                    if (ret == 0) // success
1455                    {
1456                            break;
1457                    }
1458                    else if (errno == EAGAIN || errno == EINTR) // retry
1459                    {
1460                            timer++;
1461                            if (timer % SECTION_TRY_LOCK_TIMES == 0)
1462                            {
1463                                    log_error("acquire_section_rw_lock() tried %d times on section %d\n", sid, timer);
1464                            }
1465                    }
1466                    else // failed
1467                    {
1468                            log_error("acquire_section_rw_lock() failed on section %d\n", sid);
1469                            break;
1470                    }
1471            }
1472    
1473            return ret;
1474  }  }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1