Ignore:
Timestamp:
04/01/15 17:52:53 (9 years ago)
Author:
mhnguyen
Message:

Implementing new hash algorithm and fixing bug related to zoom

+) Replace boost hash with hash algorithm of Jenkins
+) Domain, if an attribute is non-empty for one client, it should also be non-empty for others inspite of zoom
+) Replace the way to find the number of client connecting to a server to make sure every server receive a message

Test
+) On Curie
+) test_client: passed and results are same like before
+) test_complete: passed, results are partially the same, the different part comes from added working operation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/context.cpp

    r583 r584  
    220220} 
    221221 
    222 //   //---------------------------------------------------------------- 
    223 // 
    224 //   void CContext::solveFieldRefInheritance(bool apply) 
    225 //   { 
    226 //      if (!this->hasId()) return; 
    227 //      vector<CField*> allField = CField::getAll(); 
    228 ////              = CObjectTemplate<CField>::GetAllVectobject(this->getId()); 
    229 //      std::vector<CField*>::iterator 
    230 //         it = allField.begin(), end = allField.end(); 
    231 // 
    232 //      for (; it != end; it++) 
    233 //      { 
    234 //         CField* field = *it; 
    235 //         field->solveRefInheritance(apply); 
    236 //      } 
    237 //   } 
    238  
    239222   //---------------------------------------------------------------- 
    240223 
     
    258241     if (hasClient) 
    259242     { 
    260        size_t bufferSizeMin = 1; 
     243       size_t bufferSizeMin = 10*sizeof(size_t)*1024; 
    261244#define DECLARE_NODE(Name_, name_)    \ 
    262245   bufferSizeMin = (bufferSizeMin < sizeof(C##Name_##Definition)) ?  sizeof(C##Name_##Definition) : bufferSizeMin; 
     
    264247#include "node_type.conf" 
    265248       std::map<int, StdSize> bufferSize = getDataSize(); 
     249       if (bufferSize.empty()) 
     250       { 
     251         if (client->isServerLeader()) 
     252         { 
     253           bufferSize[client->getServerLeader()] = bufferSizeMin; 
     254         } 
     255         else 
     256          return; 
     257       } 
     258 
    266259       std::map<int, StdSize>::iterator  it = bufferSize.begin(), 
    267260                                        ite = bufferSize.end(); 
     
    315308   void CContext::closeDefinition(void) 
    316309   { 
    317  
     310     // There is nothing client need to send to server 
    318311     if (hasClient) 
    319312     { 
    320313       // After xml is parsed, there are some more works with post processing 
    321314       postProcessing(); 
    322 // 
     315 
    323316       setClientServerBuffer(); 
    324317     } 
     
    353346 
    354347    // There are some processings that should be done after all of above. For example: check mask or index 
    355 //    if (hasClient && !hasServer) 
    356348    if (hasClient) 
    357349    { 
     
    361353 
    362354 
    363  
    364 //      if (hasClient) 
    365 //      { 
    366 //        //solveCalendar(); 
    367 // 
    368 //        // Résolution des héritages pour le context actuel. 
    369 ////        this->solveAllInheritance(); 
    370 // 
    371 // 
    372 ////        //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers à sortir. 
    373 ////        this->findEnabledFiles(); 
    374 // 
    375 //        this->processEnabledFiles(); 
    376 // 
    377 //        this->solveAllGridRef(); 
    378 //      } 
    379  
    380  
    381  
    382  
    383 //      solveCalendar(); 
    384 // 
    385 //      // Résolution des héritages pour le context actuel. 
    386 //      this->solveAllInheritance(); 
    387 // 
    388 //      //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers à sortir. 
    389 //      this->findEnabledFiles(); 
    390 // 
    391 // 
    392 //      this->processEnabledFiles(); 
    393  
    394 /* 
    395       //Recherche des champs à sortir (enable à true + niveau de sortie correct) 
    396       // pour chaque fichier précédemment listé. 
    397       this->findAllEnabledFields(); 
    398  
    399       // Résolution des références de grilles pour chacun des champs. 
    400       this->solveAllGridRef(); 
    401  
    402       // Traitement des opérations. 
    403       this->solveAllOperation(); 
    404  
    405       // Traitement des expressions. 
    406       this->solveAllExpression(); 
    407 */ 
    408       // Nettoyage de l'arborescence 
    409       if (hasClient && !hasServer) CleanTree(); // Only on client side?? 
    410 //      if (hasClient) CleanTree(); 
    411       if (hasClient) sendCreateFileHeader(); 
     355    // Nettoyage de l'arborescence 
     356    if (hasClient && !hasServer) CleanTree(); // Only on client side?? 
     357 
     358    if (hasClient) sendCreateFileHeader(); 
    412359   } 
    413360 
     
    509456             return true; 
    510457             break; 
    511            case EVENT_ID_UPDATE_CALENDAR : 
     458           case EVENT_ID_UPDATE_CALENDAR: 
    512459             recvUpdateCalendar(event); 
    513460             return true; 
     
    521468             return true; 
    522469             break; 
     470 
    523471           default : 
    524472             ERROR("bool CContext::dispatchEvent(CEventServer& event)", 
Note: See TracChangeset for help on using the changeset viewer.